文本模板编辑通用组件
npm install --save flag-ui-texttemplate
1. vue
2. element-ui
import TextTemplate from 'flag-ui-texttemplate'
传入参数 | 类型 | 是否必填 | 默认 | 说明 |
---|---|---|---|---|
config |
Object | 是 | 基本信息配置 | 发送内容基本信息具体见下表 |
|
{
//基本信息
config: {
/*
此处配置参考element-ui中el-input组件配置
网址:http: //element-cn.eleme.io/#/zh-CN/component/input#input-attributes
*/
}
}
参数 | 类型 | 是否必填 | 默认 | 说明 |
---|---|---|---|---|
v-model |
Object | 是 | {} | 双向绑定传出内容对象 |
{
text: "尊敬的{姓名,3}",
length: 6
}
<template>
<div id="send-cmp">
<text-template v-model="textTemplate" :config="config"></text-template>
</div>
</template>
<script>
import TextTemplate from 'flag-ui-texttemplate'
export default {
components: {
TextTemplate
},
data() {
return {
textTemplate: {
text: '尊敬的{姓名,3}'
},
config: {
rows: 10,
placeholder: '请输入内容',
maxlength: 10
}
}
},
}
</script>
-v0.0.1版本发布