tms-form-vant
v0.0.5
Published
基于Vant的自定义表单组件库
Downloads
10
Readme
tms-form-vant
设置
yarn install
运行演示程序
yarn serve
编译和打包
yarn build\build-lib
Customize configuration
需要配置支持jsx
cnpm install @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props -D
修改 babel 配置文件(babel.config.js/.babelrc),如下:
module.exports = {
presets: [
['@vue/app', {
useBuiltIns: 'entry'
}],
['@vue/babel-preset-jsx',
{
"injectH": false
}]
]
};
参考:vue/jsx
支持过滤用户输入内容
初始化过滤规则,例如:允许包含图片
import sanitizeHtml from 'sanitize-html'
sanitizeHtml.defaults.allowedTags.push('img')