cnhis-design-vue 2.1.23 → 2.1.25
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/CHANGELOG.md +2287 -2280
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +164 -164
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +61 -54
- package/es/button/style.css +1 -1
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +30 -25
- package/es/editor/style.css +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +65 -49
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +93 -87
- package/es/form-table/style.css +1 -1
- package/es/index/index.js +877 -823
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +92 -92
- package/es/multi-chat-client/index.js +86 -86
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +27 -27
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-view/index.js +33 -33
- package/es/select/index.js +11 -11
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +20 -20
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +286 -259
- package/es/table-filter/style.css +1 -1
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +918 -864
- package/lib/cui.umd.js +918 -864
- package/lib/cui.umd.min.js +29 -29
- package/package.json +107 -107
- package/packages/big-table/src/BigTable.vue +3044 -3044
- package/packages/big-table/src/assets/style/table-base.less +370 -370
- package/packages/big-table/src/components/AutoLayoutButton.vue +270 -270
- package/packages/big-table/src/utils/batchEditing.js +610 -610
- package/packages/big-table/src/utils/bigTableProps.js +95 -95
- package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +181 -181
- package/packages/button/src/ButtonPrint/index.vue +739 -728
- package/packages/editor/src/Editor.vue +13 -4
- package/packages/fabric-chart/src/components/TimeScaleValue.vue +113 -113
- package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +1079 -1066
- package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +135 -135
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +558 -558
- package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +172 -172
- package/packages/form-table/src/FormTable.vue +5 -1
- package/packages/multi-chat/chat/chatFooter.vue +1594 -1594
- package/packages/multi-chat/chat/chatMain.vue +1466 -1466
- package/packages/multi-chat/chat/quickReply.vue +439 -439
- package/packages/multi-chat/chat/scrollList.vue +1232 -1232
- package/packages/multi-chat/setting/baseInfo/index.vue +1316 -1316
- package/packages/multi-chat/store/actions.js +448 -448
- package/packages/multi-chat/store/state.js +112 -112
- package/packages/scale-view/formitem/r-choice.vue +714 -714
- package/packages/scale-view/scaleView.vue +2010 -2010
- package/packages/select-person/select-person.vue +1680 -1680
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +2468 -2462
- package/packages/table-filter/src/components/c-tree-select/tree-select.vue +336 -336
- package/packages/table-filter/src/components/multi-select/multi-select.vue +219 -219
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +340 -340
- package/packages/table-filter/src/components/search-condition/SearchCondition.vue +1825 -1825
- package/packages/table-filter/src/const/dataOptions.js +43 -43
- package/packages/table-filter/src/mixins/mixins.js +692 -695
- package/packages/table-filter/src/quick-search/QuickSearch.vue +2116 -2109
- package/src/directive/preventReClick.js +12 -12
|
@@ -1,219 +1,219 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-select
|
|
3
|
-
:mode="mode"
|
|
4
|
-
v-if="item.com == 'SelectMui'"
|
|
5
|
-
:placeholder="`请选择${item.alias || item.title}`"
|
|
6
|
-
:style="{width: `${item.advanceColWidth||160}px`}"
|
|
7
|
-
:dropdownMatchSelectWidth="false"
|
|
8
|
-
:maxTagCount="handleMaxTagCount(item)"
|
|
9
|
-
:maxTagPlaceholder="handleMaxTag(item)"
|
|
10
|
-
showSearch
|
|
11
|
-
:filterOption="false"
|
|
12
|
-
v-model="item.value"
|
|
13
|
-
@search="handleWordBookSearch($event, item)"
|
|
14
|
-
@dropdownVisibleChange="dropdownVisibleChange($event, item)"
|
|
15
|
-
class="quick-input-select"
|
|
16
|
-
:allowClear="item.explicitRequired != 1"
|
|
17
|
-
ref="quickInputSelect"
|
|
18
|
-
:class="{ 'quick-input-select-mul': handleMaxTagCount > 0 }"
|
|
19
|
-
:notFoundContent="fetchingWordbook ? undefined : '暂无数据'"
|
|
20
|
-
>
|
|
21
|
-
<!-- <a-spin v-if="fetchingWordbook" slot="notFoundContent" size="small" /> -->
|
|
22
|
-
<span v-if="fetchingWordbook" slot="notFoundContent" size="small" />
|
|
23
|
-
<template v-if="item.comType == 'SelectMuiWordBook'">
|
|
24
|
-
<a-select-option
|
|
25
|
-
v-for="(sea, k) in item.dataSource"
|
|
26
|
-
:key="item.sid + sea.myName"
|
|
27
|
-
:value="sea.myName"
|
|
28
|
-
:title="sea._show_title || sea.showKeys || sea.myName"
|
|
29
|
-
:disabled="(k === 0 && hasShowKeys && item.hasFieldList || (!showRemoveIcon && item.value && item.value.includes(sea.myName)))"
|
|
30
|
-
>
|
|
31
|
-
<div
|
|
32
|
-
v-if="item.hasFieldList && sea.showKeys"
|
|
33
|
-
:class="{
|
|
34
|
-
'c-s-title-line': k === 0,
|
|
35
|
-
}"
|
|
36
|
-
style="display: flex;"
|
|
37
|
-
>
|
|
38
|
-
<span style="flex: 1;" v-for="(v1, k1) in sea.showKeys.split('<&=&>')" :key="k1" class="c-s-content-item">{{ v1 }}</span>
|
|
39
|
-
</div>
|
|
40
|
-
<span v-else>
|
|
41
|
-
{{sea._show_title || sea.showKeys || sea.myName }}
|
|
42
|
-
</span>
|
|
43
|
-
</a-select-option>
|
|
44
|
-
</template>
|
|
45
|
-
<template v-else>
|
|
46
|
-
<a-select-option v-for="(i, d) in item.labelList" :key="d" :value="d" :disabled="(!showRemoveIcon && item.value && item.value.includes(d))">
|
|
47
|
-
{{ i.labelName || '' }}
|
|
48
|
-
</a-select-option>
|
|
49
|
-
</template>
|
|
50
|
-
|
|
51
|
-
<div slot="dropdownRender" class="c-m-sdrop-down-container" slot-scope="menu">
|
|
52
|
-
<a-spin :spinning="fetchingWordbook" :tip="`加载中...`" >
|
|
53
|
-
<v-nodes :vnodes="menu" />
|
|
54
|
-
<select-pages v-if="!isnoPages" :searchPageConfig="item.searchPageConfig" :handleSearchChangePage="handleSearchChangePage" />
|
|
55
|
-
</a-spin>
|
|
56
|
-
</div>
|
|
57
|
-
<span slot="removeIcon">
|
|
58
|
-
<a-icon v-if="showRemoveIcon" type="close" />
|
|
59
|
-
<span v-else></span>
|
|
60
|
-
</span>
|
|
61
|
-
</a-select>
|
|
62
|
-
</template>
|
|
63
|
-
<script>
|
|
64
|
-
import { Select, Spin, Icon,Button } from 'ant-design-vue';
|
|
65
|
-
import utils from '@/utils/utils-map';
|
|
66
|
-
import selectPages from '@/component/select-pages';
|
|
67
|
-
export default {
|
|
68
|
-
name: 'multiSelect',
|
|
69
|
-
components: {
|
|
70
|
-
[Select.name]: Select,
|
|
71
|
-
[Select.Option.name]: Select.Option,
|
|
72
|
-
[Spin.name]: Spin,
|
|
73
|
-
[Button.name]:Button,
|
|
74
|
-
[Icon.name]: Icon,
|
|
75
|
-
selectPages,
|
|
76
|
-
VNodes: {
|
|
77
|
-
functional: true,
|
|
78
|
-
render: (h, ctx) => ctx.props.vnodes
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
props: ['item', 'maxTagPlaceholder', 'outFilterChange', 'handleWordBookSearch', 'dropdownVisibleChange', 'source', 'fetchingWordbook',],
|
|
82
|
-
data() {
|
|
83
|
-
return {};
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
computed: {
|
|
87
|
-
handleMaxTagCount() {
|
|
88
|
-
return function(item) {
|
|
89
|
-
let len = this.maxTagPlaceholder(item);
|
|
90
|
-
if (len <= 1) return 1;
|
|
91
|
-
return 0;
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
handleMaxTag() {
|
|
95
|
-
return function(item) {
|
|
96
|
-
let len = this.maxTagPlaceholder(item);
|
|
97
|
-
if (len <= 1) return '';
|
|
98
|
-
return `已选${this.maxTagPlaceholder(item)}个${item.alias || item.title}`;
|
|
99
|
-
};
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
// 有没有分页配置
|
|
103
|
-
isnoPages(){
|
|
104
|
-
const { searchPageConfig } = this.item || {};
|
|
105
|
-
if(!searchPageConfig) return true;
|
|
106
|
-
|
|
107
|
-
return searchPageConfig.page <= 1 && !searchPageConfig.hasNextPage;
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
hasShowKeys(){
|
|
111
|
-
let showKeys = this?.item?.setting?.wordbook?.showKeys || [];
|
|
112
|
-
return showKeys.length > 0
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
showRemoveIcon(){
|
|
116
|
-
let v = this.item.value;
|
|
117
|
-
let f = 1 == this?.item?.filterExplicit
|
|
118
|
-
if(Array.isArray(v) && f){
|
|
119
|
-
let l = v.length;
|
|
120
|
-
if(this.item.explicitRequired == 1){
|
|
121
|
-
return l > 1
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return true;
|
|
126
|
-
},
|
|
127
|
-
mode(){
|
|
128
|
-
return String(this?.item?.advanceOptionSetting) == '0'? 'default' : 'multiple'
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
watch: {},
|
|
132
|
-
// 生命周期
|
|
133
|
-
created() {},
|
|
134
|
-
mounted() {
|
|
135
|
-
this.createSuffixIcon();
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
// 方法
|
|
139
|
-
methods: {
|
|
140
|
-
createSuffixIcon() {
|
|
141
|
-
if(this.mode === 'default') return;
|
|
142
|
-
let refDom = this.$refs.quickInputSelect;
|
|
143
|
-
if (!refDom) return;
|
|
144
|
-
let selectDom = refDom.$el;
|
|
145
|
-
if(!selectDom) return;
|
|
146
|
-
|
|
147
|
-
let pDom = selectDom.querySelector('.ant-select-selection--multiple');
|
|
148
|
-
let hasTag = pDom.querySelector('.quick-input-select-span');
|
|
149
|
-
if (!hasTag) {
|
|
150
|
-
let tag = document.createElement('span');
|
|
151
|
-
tag.className = 'quick-input-select-span';
|
|
152
|
-
let icon = `<i aria-label="图标: down" class="anticon anticon-down ant-select-arrow-icon"><svg viewBox="64 64 896 896" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></i>`;
|
|
153
|
-
tag.innerHTML = icon;
|
|
154
|
-
pDom.appendChild(tag);
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
filterOption(...arg) {
|
|
159
|
-
return utils.filterOption(...arg);
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
handleSearchChangePage(type) {
|
|
163
|
-
let cType = type || 'next';
|
|
164
|
-
let { page, keyword = undefined } = this?.item?.searchPageConfig;
|
|
165
|
-
page = cType === 'next' ? page + 1 : page - 1;
|
|
166
|
-
this.handleWordBookSearch(keyword, this.item, { page });
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
</script>
|
|
171
|
-
<style lang="less">
|
|
172
|
-
.ant-select-dropdown--empty {
|
|
173
|
-
.ant-select-dropdown-menu-item-disabled {
|
|
174
|
-
text-align: center;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
.quick-input-select {
|
|
178
|
-
&.quick-input-select-mul {
|
|
179
|
-
.ant-select-selection--multiple {
|
|
180
|
-
max-height: unset !important;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
.ant-select-selection--multiple {
|
|
184
|
-
position: relative;
|
|
185
|
-
max-height: 32px !important;
|
|
186
|
-
.quick-input-select-span {
|
|
187
|
-
position: absolute;
|
|
188
|
-
right: 2px;
|
|
189
|
-
top: 4px;
|
|
190
|
-
top: 50%;
|
|
191
|
-
right: 11px;
|
|
192
|
-
transform-origin: 50% 50%;
|
|
193
|
-
margin-top: -7px;
|
|
194
|
-
line-height: 1;
|
|
195
|
-
.quick-input-select-icon {
|
|
196
|
-
font-size: 12px;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
margin-bottom: 8px;
|
|
201
|
-
margin-right: 8px;
|
|
202
|
-
height: 32px;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.c-s-title-line {
|
|
206
|
-
font-weight: 700;
|
|
207
|
-
color: #000;
|
|
208
|
-
font-size: 14px;
|
|
209
|
-
}
|
|
210
|
-
.c-s-content-item {
|
|
211
|
-
padding: 0 5px;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.c-m-sdrop-down-container {
|
|
215
|
-
.ant-select-dropdown-menu-item-disabled {
|
|
216
|
-
min-height: 42px;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-select
|
|
3
|
+
:mode="mode"
|
|
4
|
+
v-if="item.com == 'SelectMui'"
|
|
5
|
+
:placeholder="`请选择${item.alias || item.title}`"
|
|
6
|
+
:style="{width: `${item.advanceColWidth||160}px`}"
|
|
7
|
+
:dropdownMatchSelectWidth="false"
|
|
8
|
+
:maxTagCount="handleMaxTagCount(item)"
|
|
9
|
+
:maxTagPlaceholder="handleMaxTag(item)"
|
|
10
|
+
showSearch
|
|
11
|
+
:filterOption="false"
|
|
12
|
+
v-model="item.value"
|
|
13
|
+
@search="handleWordBookSearch($event, item)"
|
|
14
|
+
@dropdownVisibleChange="dropdownVisibleChange($event, item)"
|
|
15
|
+
class="quick-input-select"
|
|
16
|
+
:allowClear="item.explicitRequired != 1"
|
|
17
|
+
ref="quickInputSelect"
|
|
18
|
+
:class="{ 'quick-input-select-mul': handleMaxTagCount > 0 }"
|
|
19
|
+
:notFoundContent="fetchingWordbook ? undefined : '暂无数据'"
|
|
20
|
+
>
|
|
21
|
+
<!-- <a-spin v-if="fetchingWordbook" slot="notFoundContent" size="small" /> -->
|
|
22
|
+
<span v-if="fetchingWordbook" slot="notFoundContent" size="small" />
|
|
23
|
+
<template v-if="item.comType == 'SelectMuiWordBook'">
|
|
24
|
+
<a-select-option
|
|
25
|
+
v-for="(sea, k) in item.dataSource"
|
|
26
|
+
:key="item.sid + sea.myName"
|
|
27
|
+
:value="sea.myName"
|
|
28
|
+
:title="sea._show_title || sea.showKeys || sea.myName"
|
|
29
|
+
:disabled="(k === 0 && hasShowKeys && item.hasFieldList || (!showRemoveIcon && item.value && item.value.includes(sea.myName)))"
|
|
30
|
+
>
|
|
31
|
+
<div
|
|
32
|
+
v-if="item.hasFieldList && sea.showKeys"
|
|
33
|
+
:class="{
|
|
34
|
+
'c-s-title-line': k === 0,
|
|
35
|
+
}"
|
|
36
|
+
style="display: flex;"
|
|
37
|
+
>
|
|
38
|
+
<span style="flex: 1;" v-for="(v1, k1) in sea.showKeys.split('<&=&>')" :key="k1" class="c-s-content-item">{{ v1 }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<span v-else>
|
|
41
|
+
{{sea._show_title || sea.showKeys || sea.myName }}
|
|
42
|
+
</span>
|
|
43
|
+
</a-select-option>
|
|
44
|
+
</template>
|
|
45
|
+
<template v-else>
|
|
46
|
+
<a-select-option v-for="(i, d) in item.labelList" :key="d" :value="d" :disabled="(!showRemoveIcon && item.value && item.value.includes(d))">
|
|
47
|
+
{{ i.labelName || '' }}
|
|
48
|
+
</a-select-option>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<div slot="dropdownRender" class="c-m-sdrop-down-container" slot-scope="menu">
|
|
52
|
+
<a-spin :spinning="fetchingWordbook" :tip="`加载中...`" >
|
|
53
|
+
<v-nodes :vnodes="menu" />
|
|
54
|
+
<select-pages v-if="!isnoPages" :searchPageConfig="item.searchPageConfig" :handleSearchChangePage="handleSearchChangePage" />
|
|
55
|
+
</a-spin>
|
|
56
|
+
</div>
|
|
57
|
+
<span slot="removeIcon">
|
|
58
|
+
<a-icon v-if="showRemoveIcon" type="close" />
|
|
59
|
+
<span v-else></span>
|
|
60
|
+
</span>
|
|
61
|
+
</a-select>
|
|
62
|
+
</template>
|
|
63
|
+
<script>
|
|
64
|
+
import { Select, Spin, Icon,Button } from 'ant-design-vue';
|
|
65
|
+
import utils from '@/utils/utils-map';
|
|
66
|
+
import selectPages from '@/component/select-pages';
|
|
67
|
+
export default {
|
|
68
|
+
name: 'multiSelect',
|
|
69
|
+
components: {
|
|
70
|
+
[Select.name]: Select,
|
|
71
|
+
[Select.Option.name]: Select.Option,
|
|
72
|
+
[Spin.name]: Spin,
|
|
73
|
+
[Button.name]:Button,
|
|
74
|
+
[Icon.name]: Icon,
|
|
75
|
+
selectPages,
|
|
76
|
+
VNodes: {
|
|
77
|
+
functional: true,
|
|
78
|
+
render: (h, ctx) => ctx.props.vnodes
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
props: ['item', 'maxTagPlaceholder', 'outFilterChange', 'handleWordBookSearch', 'dropdownVisibleChange', 'source', 'fetchingWordbook',],
|
|
82
|
+
data() {
|
|
83
|
+
return {};
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
computed: {
|
|
87
|
+
handleMaxTagCount() {
|
|
88
|
+
return function(item) {
|
|
89
|
+
let len = this.maxTagPlaceholder(item);
|
|
90
|
+
if (len <= 1) return 1;
|
|
91
|
+
return 0;
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
handleMaxTag() {
|
|
95
|
+
return function(item) {
|
|
96
|
+
let len = this.maxTagPlaceholder(item);
|
|
97
|
+
if (len <= 1) return '';
|
|
98
|
+
return `已选${this.maxTagPlaceholder(item)}个${item.alias || item.title}`;
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// 有没有分页配置
|
|
103
|
+
isnoPages(){
|
|
104
|
+
const { searchPageConfig } = this.item || {};
|
|
105
|
+
if(!searchPageConfig) return true;
|
|
106
|
+
|
|
107
|
+
return searchPageConfig.page <= 1 && !searchPageConfig.hasNextPage;
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
hasShowKeys(){
|
|
111
|
+
let showKeys = this?.item?.setting?.wordbook?.showKeys || [];
|
|
112
|
+
return showKeys.length > 0
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
showRemoveIcon(){
|
|
116
|
+
let v = this.item.value;
|
|
117
|
+
let f = 1 == this?.item?.filterExplicit
|
|
118
|
+
if(Array.isArray(v) && f){
|
|
119
|
+
let l = v.length;
|
|
120
|
+
if(this.item.explicitRequired == 1){
|
|
121
|
+
return l > 1
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return true;
|
|
126
|
+
},
|
|
127
|
+
mode(){
|
|
128
|
+
return String(this?.item?.advanceOptionSetting) == '0'? 'default' : 'multiple'
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
watch: {},
|
|
132
|
+
// 生命周期
|
|
133
|
+
created() {},
|
|
134
|
+
mounted() {
|
|
135
|
+
this.createSuffixIcon();
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
// 方法
|
|
139
|
+
methods: {
|
|
140
|
+
createSuffixIcon() {
|
|
141
|
+
if(this.mode === 'default') return;
|
|
142
|
+
let refDom = this.$refs.quickInputSelect;
|
|
143
|
+
if (!refDom) return;
|
|
144
|
+
let selectDom = refDom.$el;
|
|
145
|
+
if(!selectDom) return;
|
|
146
|
+
|
|
147
|
+
let pDom = selectDom.querySelector('.ant-select-selection--multiple');
|
|
148
|
+
let hasTag = pDom.querySelector('.quick-input-select-span');
|
|
149
|
+
if (!hasTag) {
|
|
150
|
+
let tag = document.createElement('span');
|
|
151
|
+
tag.className = 'quick-input-select-span';
|
|
152
|
+
let icon = `<i aria-label="图标: down" class="anticon anticon-down ant-select-arrow-icon"><svg viewBox="64 64 896 896" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></i>`;
|
|
153
|
+
tag.innerHTML = icon;
|
|
154
|
+
pDom.appendChild(tag);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
filterOption(...arg) {
|
|
159
|
+
return utils.filterOption(...arg);
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
handleSearchChangePage(type) {
|
|
163
|
+
let cType = type || 'next';
|
|
164
|
+
let { page, keyword = undefined } = this?.item?.searchPageConfig;
|
|
165
|
+
page = cType === 'next' ? page + 1 : page - 1;
|
|
166
|
+
this.handleWordBookSearch(keyword, this.item, { page });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
</script>
|
|
171
|
+
<style lang="less">
|
|
172
|
+
.ant-select-dropdown--empty {
|
|
173
|
+
.ant-select-dropdown-menu-item-disabled {
|
|
174
|
+
text-align: center;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
.quick-input-select {
|
|
178
|
+
&.quick-input-select-mul {
|
|
179
|
+
.ant-select-selection--multiple {
|
|
180
|
+
max-height: unset !important;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
.ant-select-selection--multiple {
|
|
184
|
+
position: relative;
|
|
185
|
+
max-height: 32px !important;
|
|
186
|
+
.quick-input-select-span {
|
|
187
|
+
position: absolute;
|
|
188
|
+
right: 2px;
|
|
189
|
+
top: 4px;
|
|
190
|
+
top: 50%;
|
|
191
|
+
right: 11px;
|
|
192
|
+
transform-origin: 50% 50%;
|
|
193
|
+
margin-top: -7px;
|
|
194
|
+
line-height: 1;
|
|
195
|
+
.quick-input-select-icon {
|
|
196
|
+
font-size: 12px;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
margin-bottom: 8px;
|
|
201
|
+
margin-right: 8px;
|
|
202
|
+
height: 32px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.c-s-title-line {
|
|
206
|
+
font-weight: 700;
|
|
207
|
+
color: #000;
|
|
208
|
+
font-size: 14px;
|
|
209
|
+
}
|
|
210
|
+
.c-s-content-item {
|
|
211
|
+
padding: 0 5px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.c-m-sdrop-down-container {
|
|
215
|
+
.ant-select-dropdown-menu-item-disabled {
|
|
216
|
+
min-height: 42px;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
</style>
|