vue3的element的日期组件添加prefix
const customPrefix = shallowRef({
render() {
return h(‘div’, {
class: “date-search-icon”,
style: {
cursor: ‘pointer’
},
onClick: (event) => {
console.log(‘—’)
event.stopPropagation();
searchBtn()
}
}, [
// 这里this是可以取到setup中的返回值的
h(‘svg’, {
xmlns: “http://www.w3.org/2000/svg”,
viewBox: “0 0 1024 1024”,
},
[
h(‘path’, {
d: ‘m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704’,
fill: ‘currentColor’,
}),
])
]
)
}
})