import {TimelineMax} from "gsap";
export default {
props: [],
data () {
return {
blocks: [
{title: 'one', content: 'lorem three...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...', show: false},
{title: 'two', content: 'lorem three...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...', show: false},
{title: 'three', content: 'lorem three...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...lorem two...', show: false}
]
}
},
methods: {
switchBlock (n) {
if (this.blocks[n].show === true) {
this.blocks[n].show = false;
}
else {
this.blocks.forEach(function(block) {
block.show = false;
});
this.blocks[n].show = true;
}
},
enter (el, done) {
new TimelineMax()
.from(el, .5, {
height: 0
});
},
leave (el, done) {
new TimelineMax()
.to(el, .5, {
height: 0
});
}
}
}
export default {
render(h) {
return h('ul', this.$slots['list-item'].map(n => h('li', [ n ])));
},
};
components: {
SlotWrapper: {
functional: true,
render: (h, context) => context.props.node,
},
},
<li v-for="n in $slots['list-item']">
<slot-wrapper :node="n"></slot-wrapper>
</li>
Встречаю в примерах кода, что люди хранят в базе помимо самого хеша, значение соли. Зачем?