1.0.6 • Published 2 years ago

vue-template-ast v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 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

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago