vue-tpl
v0.0.2
Published
## 安装 ``` npm install vue-tpl --save
Downloads
4
Readme
vue-tpl
安装
npm install vue-tpl --save
or
yarn add vue-tpl
全局注册
import Vue from 'vue'
import VueTpl from 'vue-tpl'
// 全局注册
Vue.component('VueTpl', VueTpl)
示例
<template>
<vue-tpl class="vue-tpl" :data="data" :tpl="tpl" />
</template>
<script>
export default {
data () {
return {
data: {
name: '张三',
age: 19
},
tpl: '名字:<b>{{data.name}}</b>,年龄{{data.age}}'
}
}
}
</script>