提交 d6524720 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 99224d09
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
{ {
"name": "@ezijing/vue-form", "name": "@ezijing/vue-form",
"version": "2.0.9", "version": "2.0.10",
"private": false, "private": false,
"description": "基于Vue Element-UI的表单", "description": "基于Vue Element-UI的表单",
"scripts": { "scripts": {
......
<template> <template>
<el-input v-model.trim="data[options.model]" v-bind="$attrs" clearable style="width: 300px" /> <el-input v-model="data[options.model]" v-bind="$attrs" clearable @blur="onBlur" style="width: 300px" />
</template> </template>
<script> <script>
...@@ -18,6 +18,16 @@ export default { ...@@ -18,6 +18,16 @@ export default {
return {} return {}
} }
} }
},
computed: {
currentValue() {
return this.data[this.options.model]
}
},
methods: {
onBlur() {
this.data[this.options.model] = this.currentValue.trim()
}
} }
} }
</script> </script>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论