Commit 07f47fc 1 parent 29cb41f commit 07f47fc Copy full SHA for 07f47fc
File tree 2 files changed +8
-3
lines changed
front-end/h5/src/components
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,12 @@ export default {
38
38
props : {
39
39
...item . prop ,
40
40
// https://vuejs.org/v2/guide/render-function.html#v-model
41
- value : editingElement . pluginProps [ propKey ] || item . defaultPropValue
41
+
42
+ // #!zh:不设置默认值的原因(下一行的代码,注释的代码):
43
+ // 比如表单 input,如果用户手动删除了 placeholder的内容,程序会用defaultPropValue填充,
44
+ // 表现在UI上就是:用户永远无法彻底删掉默认值(必须保留至少一个字符)
45
+ // value: editingElement.pluginProps[propKey] || item.defaultPropValue
46
+ value : editingElement . pluginProps [ propKey ]
42
47
} ,
43
48
on : {
44
49
// https://vuejs.org/v2/guide/render-function.html#v-model
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export default {
35
35
} ,
36
36
placeholder : {
37
37
type : String ,
38
- default : '请填写提示文字 '
38
+ default : '姓名 '
39
39
} ,
40
40
required : {
41
41
type : Boolean ,
@@ -89,7 +89,7 @@ export default {
89
89
type : 'a-input' ,
90
90
label : '提示文字' ,
91
91
require : true ,
92
- defaultPropValue : '请填写提示文字 '
92
+ defaultPropValue : '姓名 '
93
93
} ,
94
94
fontSize : {
95
95
type : 'a-input-number' ,
You can’t perform that action at this time.
0 commit comments