1.0.6 • Published 3 years ago

vue-template-ast v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

vue-template-ast

安装

npm install vue-template-ast

使用

const tplAst=require("vue-template-ast")

let tpl="<template><div>hello</div></template>"
//处理标签节点
let resolveTpl= tplAst.resolve(tpl,o=>{
    //为input标签增加 属性 key='value'
    if(o.name==='input'){
        o.attrs.push({
            type:"string", // string or boolean
            name:"key", 
            value:"'value'"
        })
    }

})
1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago