Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想写1个能够修改vue组件源码的插件 #14

Open
jieyuming opened this issue Jan 20, 2025 · 0 comments
Open

想写1个能够修改vue组件源码的插件 #14

jieyuming opened this issue Jan 20, 2025 · 0 comments

Comments

@jieyuming
Copy link

现在在vue组件里面,使用jsx语法,发现如果是返回1个字符串就没问题,能够渲染成功,

         title: (h, { colIndex }) => {
            return item.name  + `(${item.unit})`
         },

但渲染是包含dom元素就无法识别了:
title: (h, { colIndex }) => (


{item.name}

{item.unit}


),

希望可以帮忙写个插件示例,仅仅能让我读取到vue组件内容打印字符串出来即可,后续匹配字符串的逻辑自己来完善

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant