render: h => {
return h(CountTo, {
props: {
endVal: 5000
},
style: {
color: 'pink',
fontSize: '50px'
},
'class': {'count-to': true},
on: {
'on-animation-end': (val) => {
console.log('end')
}
},
nativeOn: {
'click': () => {
console.log('clicked!')
}
},
domProps: {
},
directives: [],
slot: '',
scopedSlots: {},
key: '',
ref: ''
})
render: h => h('div', [
h('ul', {}, getListArr(h))
])
render: h => h('ul', getListArr(h))
}
const handleClick = function (event) {
console.log(event)
console.log(event.target)
}
let list = [
{ name: 'denglun' },
{ name: 'denglun' }
]
const getListArr = (h) => {
return list.map(item => h('li', {
on: {
'click': handleClick
},
style: {
fontSize: '30px',
color: 'lightblue'
}
}, item.name))
}