@weitutech/by-components 1.1.113 → 1.1.115
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/lib/by-components.common.js +18 -11
- package/lib/by-components.umd.js +18 -11
- package/lib/by-components.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -77604,8 +77604,8 @@ ByDialogService.install = function (Vue) {
|
|
|
77604
77604
|
Vue.prototype.$byDialog = ByDialogService;
|
|
77605
77605
|
};
|
|
77606
77606
|
/* harmony default export */ var by_dialog_ByDialogService = (ByDialogService);
|
|
77607
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cascader-panel/ByCascaderPanel.vue?vue&type=template&id=
|
|
77608
|
-
var
|
|
77607
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cascader-panel/ByCascaderPanel.vue?vue&type=template&id=e2abb98c
|
|
77608
|
+
var ByCascaderPanelvue_type_template_id_e2abb98c_render = function render() {
|
|
77609
77609
|
var _vm = this,
|
|
77610
77610
|
_c = _vm._self._c;
|
|
77611
77611
|
return _c('div', {
|
|
@@ -77858,7 +77858,7 @@ var ByCascaderPanelvue_type_template_id_222274a6_render = function render() {
|
|
|
77858
77858
|
staticClass: "empty-state"
|
|
77859
77859
|
}, [_vm._v("暂无选中项")]) : _vm._e()], 2)])])])]);
|
|
77860
77860
|
};
|
|
77861
|
-
var
|
|
77861
|
+
var ByCascaderPanelvue_type_template_id_e2abb98c_staticRenderFns = [];
|
|
77862
77862
|
|
|
77863
77863
|
;// ./src/utils/cascaderUtils.js
|
|
77864
77864
|
|
|
@@ -79192,19 +79192,26 @@ class CascaderUtils {
|
|
|
79192
79192
|
this.batchSearchVisible = false;
|
|
79193
79193
|
this.batchSearchContent = '';
|
|
79194
79194
|
},
|
|
79195
|
-
//
|
|
79195
|
+
// 在级联数据中搜索匹配的名称(全匹配,忽略空格,排除禁用项)
|
|
79196
79196
|
searchNamesInCascader(names) {
|
|
79197
79197
|
const matchedPaths = [];
|
|
79198
79198
|
const labelKey = this.cascaderProps.label || 'label';
|
|
79199
79199
|
const searchInOptions = (options, currentPath = []) => {
|
|
79200
79200
|
for (const option of options) {
|
|
79201
79201
|
const newPath = [...currentPath, option[this.cascaderProps.value]];
|
|
79202
|
-
const optionLabel = String(option[labelKey] || '');
|
|
79202
|
+
const optionLabel = String(option[labelKey] || '').replace(/\s+/g, ''); // 去掉所有空格
|
|
79203
79203
|
|
|
79204
|
-
//
|
|
79205
|
-
const isMatched = names.some(name =>
|
|
79206
|
-
|
|
79207
|
-
|
|
79204
|
+
// 检查是否全匹配任何输入的名称(去掉空格后比较)
|
|
79205
|
+
const isMatched = names.some(name => {
|
|
79206
|
+
const cleanName = name.replace(/\s+/g, ''); // 去掉输入名称中的空格
|
|
79207
|
+
return optionLabel.toLowerCase() === cleanName.toLowerCase();
|
|
79208
|
+
});
|
|
79209
|
+
|
|
79210
|
+
// 检查是否为叶子节点且匹配且未禁用
|
|
79211
|
+
const isLeafNode = !option[this.cascaderProps.children];
|
|
79212
|
+
const isNotDisabled = !this.isItemDisabled(option);
|
|
79213
|
+
if (isMatched && isLeafNode && isNotDisabled) {
|
|
79214
|
+
// 如果是叶子节点、匹配且未禁用,添加到结果中
|
|
79208
79215
|
matchedPaths.push(newPath);
|
|
79209
79216
|
}
|
|
79210
79217
|
|
|
@@ -79231,8 +79238,8 @@ class CascaderUtils {
|
|
|
79231
79238
|
;
|
|
79232
79239
|
var ByCascaderPanel_component = normalizeComponent(
|
|
79233
79240
|
cascader_panel_ByCascaderPanelvue_type_script_lang_js,
|
|
79234
|
-
|
|
79235
|
-
|
|
79241
|
+
ByCascaderPanelvue_type_template_id_e2abb98c_render,
|
|
79242
|
+
ByCascaderPanelvue_type_template_id_e2abb98c_staticRenderFns,
|
|
79236
79243
|
false,
|
|
79237
79244
|
null,
|
|
79238
79245
|
null,
|
package/lib/by-components.umd.js
CHANGED
|
@@ -77614,8 +77614,8 @@ ByDialogService.install = function (Vue) {
|
|
|
77614
77614
|
Vue.prototype.$byDialog = ByDialogService;
|
|
77615
77615
|
};
|
|
77616
77616
|
/* harmony default export */ var by_dialog_ByDialogService = (ByDialogService);
|
|
77617
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cascader-panel/ByCascaderPanel.vue?vue&type=template&id=
|
|
77618
|
-
var
|
|
77617
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cascader-panel/ByCascaderPanel.vue?vue&type=template&id=e2abb98c
|
|
77618
|
+
var ByCascaderPanelvue_type_template_id_e2abb98c_render = function render() {
|
|
77619
77619
|
var _vm = this,
|
|
77620
77620
|
_c = _vm._self._c;
|
|
77621
77621
|
return _c('div', {
|
|
@@ -77868,7 +77868,7 @@ var ByCascaderPanelvue_type_template_id_222274a6_render = function render() {
|
|
|
77868
77868
|
staticClass: "empty-state"
|
|
77869
77869
|
}, [_vm._v("暂无选中项")]) : _vm._e()], 2)])])])]);
|
|
77870
77870
|
};
|
|
77871
|
-
var
|
|
77871
|
+
var ByCascaderPanelvue_type_template_id_e2abb98c_staticRenderFns = [];
|
|
77872
77872
|
|
|
77873
77873
|
;// ./src/utils/cascaderUtils.js
|
|
77874
77874
|
|
|
@@ -79202,19 +79202,26 @@ class CascaderUtils {
|
|
|
79202
79202
|
this.batchSearchVisible = false;
|
|
79203
79203
|
this.batchSearchContent = '';
|
|
79204
79204
|
},
|
|
79205
|
-
//
|
|
79205
|
+
// 在级联数据中搜索匹配的名称(全匹配,忽略空格,排除禁用项)
|
|
79206
79206
|
searchNamesInCascader(names) {
|
|
79207
79207
|
const matchedPaths = [];
|
|
79208
79208
|
const labelKey = this.cascaderProps.label || 'label';
|
|
79209
79209
|
const searchInOptions = (options, currentPath = []) => {
|
|
79210
79210
|
for (const option of options) {
|
|
79211
79211
|
const newPath = [...currentPath, option[this.cascaderProps.value]];
|
|
79212
|
-
const optionLabel = String(option[labelKey] || '');
|
|
79212
|
+
const optionLabel = String(option[labelKey] || '').replace(/\s+/g, ''); // 去掉所有空格
|
|
79213
79213
|
|
|
79214
|
-
//
|
|
79215
|
-
const isMatched = names.some(name =>
|
|
79216
|
-
|
|
79217
|
-
|
|
79214
|
+
// 检查是否全匹配任何输入的名称(去掉空格后比较)
|
|
79215
|
+
const isMatched = names.some(name => {
|
|
79216
|
+
const cleanName = name.replace(/\s+/g, ''); // 去掉输入名称中的空格
|
|
79217
|
+
return optionLabel.toLowerCase() === cleanName.toLowerCase();
|
|
79218
|
+
});
|
|
79219
|
+
|
|
79220
|
+
// 检查是否为叶子节点且匹配且未禁用
|
|
79221
|
+
const isLeafNode = !option[this.cascaderProps.children];
|
|
79222
|
+
const isNotDisabled = !this.isItemDisabled(option);
|
|
79223
|
+
if (isMatched && isLeafNode && isNotDisabled) {
|
|
79224
|
+
// 如果是叶子节点、匹配且未禁用,添加到结果中
|
|
79218
79225
|
matchedPaths.push(newPath);
|
|
79219
79226
|
}
|
|
79220
79227
|
|
|
@@ -79241,8 +79248,8 @@ class CascaderUtils {
|
|
|
79241
79248
|
;
|
|
79242
79249
|
var ByCascaderPanel_component = normalizeComponent(
|
|
79243
79250
|
cascader_panel_ByCascaderPanelvue_type_script_lang_js,
|
|
79244
|
-
|
|
79245
|
-
|
|
79251
|
+
ByCascaderPanelvue_type_template_id_e2abb98c_render,
|
|
79252
|
+
ByCascaderPanelvue_type_template_id_e2abb98c_staticRenderFns,
|
|
79246
79253
|
false,
|
|
79247
79254
|
null,
|
|
79248
79255
|
null,
|