cloud-web-corejs 1.0.313 → 1.0.314
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +28 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/suffixIconClickable-editor.vue +23 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/lang/en-US.js +1 -0
- package/src/components/xform/lang/zh-CN.js +1 -0
package/package.json
CHANGED
|
@@ -11,16 +11,23 @@
|
|
|
11
11
|
:clearable="field.options.clearable"
|
|
12
12
|
:minlength="field.options.minLength" :maxlength="field.options.maxLength"
|
|
13
13
|
:show-word-limit="field.options.showWordLimit"
|
|
14
|
-
:prefix-icon="field.options.prefixIcon" :suffix-icon="field.options.suffixIcon"
|
|
14
|
+
:prefix-icon="field.options.prefixIcon" :suffix-icon="clickableSuffix ? '' : field.options.suffixIcon"
|
|
15
15
|
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent" @input="handleInputCustomEvent"
|
|
16
16
|
@change="handleChangeEvent"
|
|
17
17
|
:style="'width:'+field.options.widgetWidth+' !important;'"
|
|
18
18
|
:class="{'custom-width':field.options.widgetWidth!=null}">
|
|
19
19
|
<el-button slot="append" v-if="field.options.appendButton" :disabled="field.options.disabled || field.options.appendButtonDisabled"
|
|
20
20
|
:class="field.options.buttonIcon" @click.native="emitAppendButtonClick"></el-button>
|
|
21
|
+
<i v-if="clickableSuffix" slot="suffix"
|
|
22
|
+
:class="field.options.suffixIcon"
|
|
23
|
+
class="el-input__icon suffix-icon-clickable"
|
|
24
|
+
@click.stop="handleSuffixIconClick"></i>
|
|
21
25
|
</el-input>
|
|
22
26
|
<template v-if="isReadMode">
|
|
23
27
|
<span class="readonly-mode-field pre-wrap" :title="contentForReadMode">{{contentForReadMode}}</span>
|
|
28
|
+
<i v-if="readModeSuffix" :class="field.options.suffixIcon"
|
|
29
|
+
class="el-input__icon suffix-icon-clickable"
|
|
30
|
+
@click.stop="handleSuffixIconClick"></i>
|
|
24
31
|
</template>
|
|
25
32
|
</form-item-wrapper>
|
|
26
33
|
</template>
|
|
@@ -82,6 +89,18 @@
|
|
|
82
89
|
contentForReadMode() {
|
|
83
90
|
return this.fieldModel ? this.fieldModel : ''
|
|
84
91
|
},
|
|
92
|
+
clickableSuffix() {
|
|
93
|
+
//尾部图标可点击(编辑态):开关开启且已配置suffixIcon;开启后suffix-icon改由slot渲染,避免图标重复
|
|
94
|
+
return !!this.field.options.suffixIconClickable
|
|
95
|
+
&& !!this.field.options.suffixIcon
|
|
96
|
+
&& !this.isReadMode
|
|
97
|
+
},
|
|
98
|
+
readModeSuffix() {
|
|
99
|
+
//只读模式:el-input不渲染,图标单独补充在只读文本旁
|
|
100
|
+
return !!this.field.options.suffixIconClickable
|
|
101
|
+
&& !!this.field.options.suffixIcon
|
|
102
|
+
&& this.isReadMode
|
|
103
|
+
},
|
|
85
104
|
|
|
86
105
|
},
|
|
87
106
|
beforeCreate() {
|
|
@@ -108,7 +127,11 @@
|
|
|
108
127
|
},
|
|
109
128
|
|
|
110
129
|
methods: {
|
|
111
|
-
|
|
130
|
+
handleSuffixIconClick() {
|
|
131
|
+
if (this.designState) return
|
|
132
|
+
//复用后置按钮的点击链:onAppendButtonClick脚本 → dispatch('appendButtonClick') → handleCustomClickEvent
|
|
133
|
+
this.emitAppendButtonClick()
|
|
134
|
+
}
|
|
112
135
|
}
|
|
113
136
|
}
|
|
114
137
|
</script>
|
|
@@ -116,4 +139,7 @@
|
|
|
116
139
|
<style lang="scss" scoped>
|
|
117
140
|
@import "~@base/styles/theme-variables.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
|
118
141
|
|
|
142
|
+
.suffix-icon-clickable {
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
119
145
|
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.suffixIconClickable')">
|
|
3
|
+
<el-switch v-model="optionModel.suffixIconClickable"></el-switch>
|
|
4
|
+
</el-form-item>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import i18n from "../../../../../components/xform/utils/i18n"
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: "suffixIconClickable-editor",
|
|
12
|
+
mixins: [i18n],
|
|
13
|
+
props: {
|
|
14
|
+
designer: Object,
|
|
15
|
+
selectedWidget: Object,
|
|
16
|
+
optionModel: Object,
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -209,6 +209,7 @@ const ADVANCED_PROPERTIES = {
|
|
|
209
209
|
// 'showWordLimit': 'showWordLimit-editor',
|
|
210
210
|
prefixIcon: "prefixIcon-editor",
|
|
211
211
|
suffixIcon: "suffixIcon-editor",
|
|
212
|
+
suffixIconClickable: "suffixIconClickable-editor",
|
|
212
213
|
switchWidth: "switchWidth-editor",
|
|
213
214
|
activeText: "activeText-editor",
|
|
214
215
|
inactiveText: "inactiveText-editor",
|
|
@@ -295,6 +295,7 @@ export default {
|
|
|
295
295
|
showWordLimit: "Show Word Limit",
|
|
296
296
|
prefixIcon: "Prefix Icon",
|
|
297
297
|
suffixIcon: "Suffix Icon",
|
|
298
|
+
suffixIconClickable: "Clickable Suffix Icon",
|
|
298
299
|
inputButton: "Input Button Setting",
|
|
299
300
|
appendButton: "Append Button",
|
|
300
301
|
appendButtonDisabled: "Button Disabled",
|