1 Star 0 Fork 0

夜琉璃君/vue-mdi-svg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
v2.js 749 Bytes
一键复制 编辑 原始数据 按行查看 历史
夜琉璃君 提交于 2021-11-23 01:44 +08:00 . initial commit
import { getAttrs, getClasses, getInstaller } from './src/shared.js'
const renderV2 = () =>
function render(h, { data, props, attrs, children }) {
const { spanAttrs, svgAttrs, pathAttrs } = getAttrs(props, attrs, children, false)
return h(
'span',
{
attrs: spanAttrs,
class: {
...getClasses(props, data),
...data.class,
},
},
[
h(
'svg',
{
attrs: svgAttrs,
},
[
...[props.title ? h('title', [props.title]) : undefined],
h('path', {
attrs: pathAttrs,
}),
]
),
]
)
}
export default getInstaller(renderV2, {
functional: true,
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yeliulee/vue-mdi-svg.git
git@gitee.com:yeliulee/vue-mdi-svg.git
yeliulee
vue-mdi-svg
vue-mdi-svg
main

搜索帮助