ct-component-plus 2.2.8 → 2.2.10
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/README.md
CHANGED
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
v-bind="rawAttr"
|
|
9
9
|
:multiple="multiple"
|
|
10
10
|
:filterable="filterable"
|
|
11
|
+
:filter-method="filterMethod"
|
|
11
12
|
:clear-icon="clearIcon"
|
|
12
13
|
:suffix-icon="suffixIcon"
|
|
13
14
|
:fit-input-width="fitInputWidth"
|
|
@@ -200,7 +201,7 @@ watch(
|
|
|
200
201
|
(newVal) => {
|
|
201
202
|
if (!selectRef.value) return;
|
|
202
203
|
selectRef.value.selectedLabel = newVal;
|
|
203
|
-
}
|
|
204
|
+
},
|
|
204
205
|
);
|
|
205
206
|
watch(optionsByApi, () => {
|
|
206
207
|
const arr = optionsByApi.value || [];
|
|
@@ -245,7 +246,7 @@ const watchServiceHandle = async (reset = false) => {
|
|
|
245
246
|
pageNo.value = 1;
|
|
246
247
|
optionsByApi.value = [];
|
|
247
248
|
}
|
|
248
|
-
params.
|
|
249
|
+
params[props.keywordParam] = keyword.value;
|
|
249
250
|
params.page_no = pageNo.value;
|
|
250
251
|
params.page_size = pageSize.value;
|
|
251
252
|
if (isFunction(cbs.beforeSearch)) {
|
|
@@ -258,7 +259,7 @@ const watchServiceHandle = async (reset = false) => {
|
|
|
258
259
|
.then((res) => {
|
|
259
260
|
const mapObj = props.mapObj || {};
|
|
260
261
|
const {
|
|
261
|
-
list,
|
|
262
|
+
list = "list",
|
|
262
263
|
label = "label",
|
|
263
264
|
value = "value",
|
|
264
265
|
self,
|
|
@@ -298,7 +299,7 @@ const watchServiceHandle = async (reset = false) => {
|
|
|
298
299
|
try {
|
|
299
300
|
const defineSearchHandle = await cbs.defineSearch(
|
|
300
301
|
optionsByApi,
|
|
301
|
-
valueModel
|
|
302
|
+
valueModel,
|
|
302
303
|
);
|
|
303
304
|
if (defineSearchHandle === false) return;
|
|
304
305
|
if (defineSearchHandle) {
|
|
@@ -319,7 +320,7 @@ watch(
|
|
|
319
320
|
},
|
|
320
321
|
{
|
|
321
322
|
immediate: true,
|
|
322
|
-
}
|
|
323
|
+
},
|
|
323
324
|
);
|
|
324
325
|
// watch(
|
|
325
326
|
// () => keyword.value,
|
|
@@ -384,6 +385,14 @@ useBuriedParams(props, emit, {
|
|
|
384
385
|
},
|
|
385
386
|
});
|
|
386
387
|
|
|
388
|
+
function filterMethod(val) {
|
|
389
|
+
if (props.multiple) {
|
|
390
|
+
return; //多选走原有搜索逻辑
|
|
391
|
+
}
|
|
392
|
+
keyword.value = val;
|
|
393
|
+
changeKeyword();
|
|
394
|
+
}
|
|
395
|
+
|
|
387
396
|
onMounted(() => {
|
|
388
397
|
if (!baseDao) {
|
|
389
398
|
console.error("请先配置baseDao");
|
|
@@ -156,8 +156,8 @@ const selectText = computed(() => {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
nextTick(() => {
|
|
159
|
-
selectRef.value
|
|
160
|
-
|
|
159
|
+
if (!selectRef.value) return;
|
|
160
|
+
selectRef.value.$refs.reference.input.value = result;
|
|
161
161
|
});
|
|
162
162
|
return result;
|
|
163
163
|
});
|