@weitutech/by-components 1.1.218 → 1.1.220
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 +114 -15
- package/lib/by-components.umd.js +114 -15
- package/lib/by-components.umd.min.js +10 -10
- package/lib/index.css +1 -1
- package/package.json +1 -1
|
@@ -91275,8 +91275,8 @@ var ByCommonSelector_component = normalizeComponent(
|
|
|
91275
91275
|
)
|
|
91276
91276
|
|
|
91277
91277
|
/* harmony default export */ var ByCommonSelector = (ByCommonSelector_component.exports);
|
|
91278
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=
|
|
91279
|
-
var
|
|
91278
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=58a92f32
|
|
91279
|
+
var BatchQuerySelectorvue_type_template_id_58a92f32_render = function render() {
|
|
91280
91280
|
var _vm = this,
|
|
91281
91281
|
_c = _vm._self._c;
|
|
91282
91282
|
return _c('div', {
|
|
@@ -91284,9 +91284,18 @@ var BatchQuerySelectorvue_type_template_id_240853ac_render = function render() {
|
|
|
91284
91284
|
style: _vm.containerStyle
|
|
91285
91285
|
}, [_c('div', {
|
|
91286
91286
|
staticClass: "selector-container"
|
|
91287
|
+
}, [_c('div', {
|
|
91288
|
+
staticClass: "selector-input-wrap",
|
|
91289
|
+
class: {
|
|
91290
|
+
'has-batch-suffix': _vm.multiple,
|
|
91291
|
+
'is-clearable': _vm.multiple && _vm.clearable
|
|
91292
|
+
}
|
|
91287
91293
|
}, [_c('el-select', {
|
|
91288
91294
|
ref: "elSelect",
|
|
91289
91295
|
staticClass: "selector-input",
|
|
91296
|
+
class: {
|
|
91297
|
+
'has-batch-suffix': _vm.multiple
|
|
91298
|
+
},
|
|
91290
91299
|
attrs: {
|
|
91291
91300
|
"placeholder": _vm.placeholder,
|
|
91292
91301
|
"disabled": _vm.disabled || _vm.loading,
|
|
@@ -91361,7 +91370,9 @@ var BatchQuerySelectorvue_type_template_id_240853ac_render = function render() {
|
|
|
91361
91370
|
staticClass: "el-icon-loading"
|
|
91362
91371
|
}) : _vm._e(), _c('span', [_vm._v(_vm._s(_vm.loadingMore ? '加载中...' : '点击加载更多'))]), _c('div', {
|
|
91363
91372
|
staticClass: "load-more-info"
|
|
91364
|
-
}, [_vm._v("已显示 " + _vm._s(_vm.visibleOptions.length) + " / " + _vm._s(_vm.filteredOptions.length) + " 条")])])]) : _vm._e()], 2), _vm.multiple ? _c('
|
|
91373
|
+
}, [_vm._v("已显示 " + _vm._s(_vm.visibleOptions.length) + " / " + _vm._s(_vm.filteredOptions.length) + " 条")])])]) : _vm._e()], 2), _vm.multiple ? _c('div', {
|
|
91374
|
+
staticClass: "batch-input-suffix"
|
|
91375
|
+
}, [_c('el-popover', {
|
|
91365
91376
|
attrs: {
|
|
91366
91377
|
"placement": "bottom-end",
|
|
91367
91378
|
"width": _vm.popoverWidth,
|
|
@@ -91429,25 +91440,26 @@ var BatchQuerySelectorvue_type_template_id_240853ac_render = function render() {
|
|
|
91429
91440
|
"click": _vm.handleBatchInput
|
|
91430
91441
|
}
|
|
91431
91442
|
}, [_vm._v("确定")])], 1)], 1), _c('el-button', {
|
|
91432
|
-
staticClass: "batch-input-btn",
|
|
91443
|
+
staticClass: "batch-input-btn batch-input-btn--inner",
|
|
91444
|
+
class: `batch-input-btn--${_vm.size}`,
|
|
91433
91445
|
attrs: {
|
|
91434
91446
|
"slot": "reference",
|
|
91447
|
+
"type": "text",
|
|
91435
91448
|
"disabled": _vm.disabled || _vm.loading,
|
|
91436
91449
|
"size": _vm.size
|
|
91437
91450
|
},
|
|
91438
91451
|
on: {
|
|
91439
|
-
"click":
|
|
91452
|
+
"click": function ($event) {
|
|
91453
|
+
$event.stopPropagation();
|
|
91454
|
+
return _vm.handleBatchButtonClick.apply(null, arguments);
|
|
91455
|
+
}
|
|
91440
91456
|
},
|
|
91441
91457
|
slot: "reference"
|
|
91442
91458
|
}, [_c('i', {
|
|
91443
|
-
staticClass: "el-icon-edit-outline"
|
|
91444
|
-
|
|
91445
|
-
"transform": "scale(2)",
|
|
91446
|
-
"display": "inline-block"
|
|
91447
|
-
}
|
|
91448
|
-
})])], 1) : _vm._e()], 1)]);
|
|
91459
|
+
staticClass: "el-icon-edit-outline"
|
|
91460
|
+
})])], 1)], 1) : _vm._e()], 1)])]);
|
|
91449
91461
|
};
|
|
91450
|
-
var
|
|
91462
|
+
var BatchQuerySelectorvue_type_template_id_58a92f32_staticRenderFns = [];
|
|
91451
91463
|
|
|
91452
91464
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./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/batch-query-selector/BatchQuerySelector.vue?vue&type=script&lang=js
|
|
91453
91465
|
|
|
@@ -91626,7 +91638,9 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91626
91638
|
dropdownVisible: false,
|
|
91627
91639
|
currentPage: 1,
|
|
91628
91640
|
loadingMore: false,
|
|
91629
|
-
hasFocused: false
|
|
91641
|
+
hasFocused: false,
|
|
91642
|
+
// 添加一个标记,用于跟踪是否已经触发过focus事件
|
|
91643
|
+
suffixHoverSyncBound: false
|
|
91630
91644
|
};
|
|
91631
91645
|
},
|
|
91632
91646
|
computed: {
|
|
@@ -91744,6 +91758,24 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91744
91758
|
}
|
|
91745
91759
|
},
|
|
91746
91760
|
immediate: true
|
|
91761
|
+
},
|
|
91762
|
+
multiple() {
|
|
91763
|
+
this.$nextTick(() => {
|
|
91764
|
+
if (this.multiple && this.clearable) {
|
|
91765
|
+
this.bindSuffixHoverSync();
|
|
91766
|
+
} else {
|
|
91767
|
+
this.unbindSuffixHoverSync();
|
|
91768
|
+
}
|
|
91769
|
+
});
|
|
91770
|
+
},
|
|
91771
|
+
clearable() {
|
|
91772
|
+
this.$nextTick(() => {
|
|
91773
|
+
if (this.multiple && this.clearable) {
|
|
91774
|
+
this.bindSuffixHoverSync();
|
|
91775
|
+
} else {
|
|
91776
|
+
this.unbindSuffixHoverSync();
|
|
91777
|
+
}
|
|
91778
|
+
});
|
|
91747
91779
|
}
|
|
91748
91780
|
},
|
|
91749
91781
|
created() {
|
|
@@ -91752,6 +91784,11 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91752
91784
|
this.fetchOptions();
|
|
91753
91785
|
}
|
|
91754
91786
|
},
|
|
91787
|
+
mounted() {
|
|
91788
|
+
this.$nextTick(() => {
|
|
91789
|
+
this.bindSuffixHoverSync();
|
|
91790
|
+
});
|
|
91791
|
+
},
|
|
91755
91792
|
methods: {
|
|
91756
91793
|
// 判断选项是否有可展示的描述内容
|
|
91757
91794
|
hasDescContent(option) {
|
|
@@ -91944,6 +91981,67 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91944
91981
|
this.$emit('batch-selector-focus', e);
|
|
91945
91982
|
}
|
|
91946
91983
|
},
|
|
91984
|
+
// 仅当鼠标位于清空/箭头图标上时显示清空按钮,覆盖 Element 默认整框 hover 行为
|
|
91985
|
+
bindSuffixHoverSync() {
|
|
91986
|
+
if (!this.multiple || !this.clearable) return;
|
|
91987
|
+
const select = this.$refs.elSelect;
|
|
91988
|
+
if (!select || !select.$el) return;
|
|
91989
|
+
if (this.suffixHoverSyncBound && this._suffixHoverRoot === select.$el) return;
|
|
91990
|
+
this.unbindSuffixHoverSync();
|
|
91991
|
+
const root = select.$el;
|
|
91992
|
+
this._suffixHoverRoot = root;
|
|
91993
|
+
this._onSuffixHoverMove = event => {
|
|
91994
|
+
this.syncClearHoverState(event);
|
|
91995
|
+
};
|
|
91996
|
+
this._onSuffixHoverLeave = event => {
|
|
91997
|
+
if (!root.contains(event.relatedTarget)) {
|
|
91998
|
+
select.inputHovering = false;
|
|
91999
|
+
}
|
|
92000
|
+
};
|
|
92001
|
+
root.addEventListener('mouseover', this._onSuffixHoverMove, true);
|
|
92002
|
+
root.addEventListener('mousemove', this._onSuffixHoverMove, true);
|
|
92003
|
+
root.addEventListener('mouseleave', this._onSuffixHoverLeave, true);
|
|
92004
|
+
this.suffixHoverSyncBound = true;
|
|
92005
|
+
},
|
|
92006
|
+
unbindSuffixHoverSync() {
|
|
92007
|
+
const root = this._suffixHoverRoot;
|
|
92008
|
+
if (root) {
|
|
92009
|
+
if (this._onSuffixHoverMove) {
|
|
92010
|
+
root.removeEventListener('mouseover', this._onSuffixHoverMove, true);
|
|
92011
|
+
root.removeEventListener('mousemove', this._onSuffixHoverMove, true);
|
|
92012
|
+
}
|
|
92013
|
+
if (this._onSuffixHoverLeave) {
|
|
92014
|
+
root.removeEventListener('mouseleave', this._onSuffixHoverLeave, true);
|
|
92015
|
+
}
|
|
92016
|
+
}
|
|
92017
|
+
if (this._suffixHoverRaf) {
|
|
92018
|
+
cancelAnimationFrame(this._suffixHoverRaf);
|
|
92019
|
+
this._suffixHoverRaf = null;
|
|
92020
|
+
}
|
|
92021
|
+
this._suffixHoverRoot = null;
|
|
92022
|
+
this._onSuffixHoverMove = null;
|
|
92023
|
+
this._onSuffixHoverLeave = null;
|
|
92024
|
+
this.suffixHoverSyncBound = false;
|
|
92025
|
+
},
|
|
92026
|
+
syncClearHoverState(event) {
|
|
92027
|
+
const select = this.$refs.elSelect;
|
|
92028
|
+
if (!select || !select.$el) return;
|
|
92029
|
+
if (this._suffixHoverRaf) {
|
|
92030
|
+
cancelAnimationFrame(this._suffixHoverRaf);
|
|
92031
|
+
}
|
|
92032
|
+
const {
|
|
92033
|
+
clientX,
|
|
92034
|
+
clientY
|
|
92035
|
+
} = event;
|
|
92036
|
+
this._suffixHoverRaf = requestAnimationFrame(() => {
|
|
92037
|
+
this._suffixHoverRaf = null;
|
|
92038
|
+
const suffixInner = select.$el.querySelector('.el-input__suffix-inner');
|
|
92039
|
+
if (!suffixInner) return;
|
|
92040
|
+
const hovered = document.elementFromPoint(clientX, clientY);
|
|
92041
|
+
const isOverSuffixIcon = !!(hovered && (hovered.classList.contains('el-input__icon') || hovered.closest('.el-input__suffix-inner .el-input__icon')));
|
|
92042
|
+
select.inputHovering = isOverSuffixIcon;
|
|
92043
|
+
});
|
|
92044
|
+
},
|
|
91947
92045
|
// 处理批量输入
|
|
91948
92046
|
async handleBatchInput() {
|
|
91949
92047
|
if (!this.batchInputContent.trim()) {
|
|
@@ -92051,6 +92149,7 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
92051
92149
|
beforeDestroy() {
|
|
92052
92150
|
// 移除滚动监听器
|
|
92053
92151
|
this.removeScrollListener();
|
|
92152
|
+
this.unbindSuffixHoverSync();
|
|
92054
92153
|
}
|
|
92055
92154
|
});
|
|
92056
92155
|
;// ./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=script&lang=js
|
|
@@ -92065,8 +92164,8 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
92065
92164
|
;
|
|
92066
92165
|
var BatchQuerySelector_component = normalizeComponent(
|
|
92067
92166
|
batch_query_selector_BatchQuerySelectorvue_type_script_lang_js,
|
|
92068
|
-
|
|
92069
|
-
|
|
92167
|
+
BatchQuerySelectorvue_type_template_id_58a92f32_render,
|
|
92168
|
+
BatchQuerySelectorvue_type_template_id_58a92f32_staticRenderFns,
|
|
92070
92169
|
false,
|
|
92071
92170
|
null,
|
|
92072
92171
|
null,
|
package/lib/by-components.umd.js
CHANGED
|
@@ -91285,8 +91285,8 @@ var ByCommonSelector_component = normalizeComponent(
|
|
|
91285
91285
|
)
|
|
91286
91286
|
|
|
91287
91287
|
/* harmony default export */ var ByCommonSelector = (ByCommonSelector_component.exports);
|
|
91288
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=
|
|
91289
|
-
var
|
|
91288
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=58a92f32
|
|
91289
|
+
var BatchQuerySelectorvue_type_template_id_58a92f32_render = function render() {
|
|
91290
91290
|
var _vm = this,
|
|
91291
91291
|
_c = _vm._self._c;
|
|
91292
91292
|
return _c('div', {
|
|
@@ -91294,9 +91294,18 @@ var BatchQuerySelectorvue_type_template_id_240853ac_render = function render() {
|
|
|
91294
91294
|
style: _vm.containerStyle
|
|
91295
91295
|
}, [_c('div', {
|
|
91296
91296
|
staticClass: "selector-container"
|
|
91297
|
+
}, [_c('div', {
|
|
91298
|
+
staticClass: "selector-input-wrap",
|
|
91299
|
+
class: {
|
|
91300
|
+
'has-batch-suffix': _vm.multiple,
|
|
91301
|
+
'is-clearable': _vm.multiple && _vm.clearable
|
|
91302
|
+
}
|
|
91297
91303
|
}, [_c('el-select', {
|
|
91298
91304
|
ref: "elSelect",
|
|
91299
91305
|
staticClass: "selector-input",
|
|
91306
|
+
class: {
|
|
91307
|
+
'has-batch-suffix': _vm.multiple
|
|
91308
|
+
},
|
|
91300
91309
|
attrs: {
|
|
91301
91310
|
"placeholder": _vm.placeholder,
|
|
91302
91311
|
"disabled": _vm.disabled || _vm.loading,
|
|
@@ -91371,7 +91380,9 @@ var BatchQuerySelectorvue_type_template_id_240853ac_render = function render() {
|
|
|
91371
91380
|
staticClass: "el-icon-loading"
|
|
91372
91381
|
}) : _vm._e(), _c('span', [_vm._v(_vm._s(_vm.loadingMore ? '加载中...' : '点击加载更多'))]), _c('div', {
|
|
91373
91382
|
staticClass: "load-more-info"
|
|
91374
|
-
}, [_vm._v("已显示 " + _vm._s(_vm.visibleOptions.length) + " / " + _vm._s(_vm.filteredOptions.length) + " 条")])])]) : _vm._e()], 2), _vm.multiple ? _c('
|
|
91383
|
+
}, [_vm._v("已显示 " + _vm._s(_vm.visibleOptions.length) + " / " + _vm._s(_vm.filteredOptions.length) + " 条")])])]) : _vm._e()], 2), _vm.multiple ? _c('div', {
|
|
91384
|
+
staticClass: "batch-input-suffix"
|
|
91385
|
+
}, [_c('el-popover', {
|
|
91375
91386
|
attrs: {
|
|
91376
91387
|
"placement": "bottom-end",
|
|
91377
91388
|
"width": _vm.popoverWidth,
|
|
@@ -91439,25 +91450,26 @@ var BatchQuerySelectorvue_type_template_id_240853ac_render = function render() {
|
|
|
91439
91450
|
"click": _vm.handleBatchInput
|
|
91440
91451
|
}
|
|
91441
91452
|
}, [_vm._v("确定")])], 1)], 1), _c('el-button', {
|
|
91442
|
-
staticClass: "batch-input-btn",
|
|
91453
|
+
staticClass: "batch-input-btn batch-input-btn--inner",
|
|
91454
|
+
class: `batch-input-btn--${_vm.size}`,
|
|
91443
91455
|
attrs: {
|
|
91444
91456
|
"slot": "reference",
|
|
91457
|
+
"type": "text",
|
|
91445
91458
|
"disabled": _vm.disabled || _vm.loading,
|
|
91446
91459
|
"size": _vm.size
|
|
91447
91460
|
},
|
|
91448
91461
|
on: {
|
|
91449
|
-
"click":
|
|
91462
|
+
"click": function ($event) {
|
|
91463
|
+
$event.stopPropagation();
|
|
91464
|
+
return _vm.handleBatchButtonClick.apply(null, arguments);
|
|
91465
|
+
}
|
|
91450
91466
|
},
|
|
91451
91467
|
slot: "reference"
|
|
91452
91468
|
}, [_c('i', {
|
|
91453
|
-
staticClass: "el-icon-edit-outline"
|
|
91454
|
-
|
|
91455
|
-
"transform": "scale(2)",
|
|
91456
|
-
"display": "inline-block"
|
|
91457
|
-
}
|
|
91458
|
-
})])], 1) : _vm._e()], 1)]);
|
|
91469
|
+
staticClass: "el-icon-edit-outline"
|
|
91470
|
+
})])], 1)], 1) : _vm._e()], 1)])]);
|
|
91459
91471
|
};
|
|
91460
|
-
var
|
|
91472
|
+
var BatchQuerySelectorvue_type_template_id_58a92f32_staticRenderFns = [];
|
|
91461
91473
|
|
|
91462
91474
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./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/batch-query-selector/BatchQuerySelector.vue?vue&type=script&lang=js
|
|
91463
91475
|
|
|
@@ -91636,7 +91648,9 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91636
91648
|
dropdownVisible: false,
|
|
91637
91649
|
currentPage: 1,
|
|
91638
91650
|
loadingMore: false,
|
|
91639
|
-
hasFocused: false
|
|
91651
|
+
hasFocused: false,
|
|
91652
|
+
// 添加一个标记,用于跟踪是否已经触发过focus事件
|
|
91653
|
+
suffixHoverSyncBound: false
|
|
91640
91654
|
};
|
|
91641
91655
|
},
|
|
91642
91656
|
computed: {
|
|
@@ -91754,6 +91768,24 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91754
91768
|
}
|
|
91755
91769
|
},
|
|
91756
91770
|
immediate: true
|
|
91771
|
+
},
|
|
91772
|
+
multiple() {
|
|
91773
|
+
this.$nextTick(() => {
|
|
91774
|
+
if (this.multiple && this.clearable) {
|
|
91775
|
+
this.bindSuffixHoverSync();
|
|
91776
|
+
} else {
|
|
91777
|
+
this.unbindSuffixHoverSync();
|
|
91778
|
+
}
|
|
91779
|
+
});
|
|
91780
|
+
},
|
|
91781
|
+
clearable() {
|
|
91782
|
+
this.$nextTick(() => {
|
|
91783
|
+
if (this.multiple && this.clearable) {
|
|
91784
|
+
this.bindSuffixHoverSync();
|
|
91785
|
+
} else {
|
|
91786
|
+
this.unbindSuffixHoverSync();
|
|
91787
|
+
}
|
|
91788
|
+
});
|
|
91757
91789
|
}
|
|
91758
91790
|
},
|
|
91759
91791
|
created() {
|
|
@@ -91762,6 +91794,11 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91762
91794
|
this.fetchOptions();
|
|
91763
91795
|
}
|
|
91764
91796
|
},
|
|
91797
|
+
mounted() {
|
|
91798
|
+
this.$nextTick(() => {
|
|
91799
|
+
this.bindSuffixHoverSync();
|
|
91800
|
+
});
|
|
91801
|
+
},
|
|
91765
91802
|
methods: {
|
|
91766
91803
|
// 判断选项是否有可展示的描述内容
|
|
91767
91804
|
hasDescContent(option) {
|
|
@@ -91954,6 +91991,67 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
91954
91991
|
this.$emit('batch-selector-focus', e);
|
|
91955
91992
|
}
|
|
91956
91993
|
},
|
|
91994
|
+
// 仅当鼠标位于清空/箭头图标上时显示清空按钮,覆盖 Element 默认整框 hover 行为
|
|
91995
|
+
bindSuffixHoverSync() {
|
|
91996
|
+
if (!this.multiple || !this.clearable) return;
|
|
91997
|
+
const select = this.$refs.elSelect;
|
|
91998
|
+
if (!select || !select.$el) return;
|
|
91999
|
+
if (this.suffixHoverSyncBound && this._suffixHoverRoot === select.$el) return;
|
|
92000
|
+
this.unbindSuffixHoverSync();
|
|
92001
|
+
const root = select.$el;
|
|
92002
|
+
this._suffixHoverRoot = root;
|
|
92003
|
+
this._onSuffixHoverMove = event => {
|
|
92004
|
+
this.syncClearHoverState(event);
|
|
92005
|
+
};
|
|
92006
|
+
this._onSuffixHoverLeave = event => {
|
|
92007
|
+
if (!root.contains(event.relatedTarget)) {
|
|
92008
|
+
select.inputHovering = false;
|
|
92009
|
+
}
|
|
92010
|
+
};
|
|
92011
|
+
root.addEventListener('mouseover', this._onSuffixHoverMove, true);
|
|
92012
|
+
root.addEventListener('mousemove', this._onSuffixHoverMove, true);
|
|
92013
|
+
root.addEventListener('mouseleave', this._onSuffixHoverLeave, true);
|
|
92014
|
+
this.suffixHoverSyncBound = true;
|
|
92015
|
+
},
|
|
92016
|
+
unbindSuffixHoverSync() {
|
|
92017
|
+
const root = this._suffixHoverRoot;
|
|
92018
|
+
if (root) {
|
|
92019
|
+
if (this._onSuffixHoverMove) {
|
|
92020
|
+
root.removeEventListener('mouseover', this._onSuffixHoverMove, true);
|
|
92021
|
+
root.removeEventListener('mousemove', this._onSuffixHoverMove, true);
|
|
92022
|
+
}
|
|
92023
|
+
if (this._onSuffixHoverLeave) {
|
|
92024
|
+
root.removeEventListener('mouseleave', this._onSuffixHoverLeave, true);
|
|
92025
|
+
}
|
|
92026
|
+
}
|
|
92027
|
+
if (this._suffixHoverRaf) {
|
|
92028
|
+
cancelAnimationFrame(this._suffixHoverRaf);
|
|
92029
|
+
this._suffixHoverRaf = null;
|
|
92030
|
+
}
|
|
92031
|
+
this._suffixHoverRoot = null;
|
|
92032
|
+
this._onSuffixHoverMove = null;
|
|
92033
|
+
this._onSuffixHoverLeave = null;
|
|
92034
|
+
this.suffixHoverSyncBound = false;
|
|
92035
|
+
},
|
|
92036
|
+
syncClearHoverState(event) {
|
|
92037
|
+
const select = this.$refs.elSelect;
|
|
92038
|
+
if (!select || !select.$el) return;
|
|
92039
|
+
if (this._suffixHoverRaf) {
|
|
92040
|
+
cancelAnimationFrame(this._suffixHoverRaf);
|
|
92041
|
+
}
|
|
92042
|
+
const {
|
|
92043
|
+
clientX,
|
|
92044
|
+
clientY
|
|
92045
|
+
} = event;
|
|
92046
|
+
this._suffixHoverRaf = requestAnimationFrame(() => {
|
|
92047
|
+
this._suffixHoverRaf = null;
|
|
92048
|
+
const suffixInner = select.$el.querySelector('.el-input__suffix-inner');
|
|
92049
|
+
if (!suffixInner) return;
|
|
92050
|
+
const hovered = document.elementFromPoint(clientX, clientY);
|
|
92051
|
+
const isOverSuffixIcon = !!(hovered && (hovered.classList.contains('el-input__icon') || hovered.closest('.el-input__suffix-inner .el-input__icon')));
|
|
92052
|
+
select.inputHovering = isOverSuffixIcon;
|
|
92053
|
+
});
|
|
92054
|
+
},
|
|
91957
92055
|
// 处理批量输入
|
|
91958
92056
|
async handleBatchInput() {
|
|
91959
92057
|
if (!this.batchInputContent.trim()) {
|
|
@@ -92061,6 +92159,7 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
92061
92159
|
beforeDestroy() {
|
|
92062
92160
|
// 移除滚动监听器
|
|
92063
92161
|
this.removeScrollListener();
|
|
92162
|
+
this.unbindSuffixHoverSync();
|
|
92064
92163
|
}
|
|
92065
92164
|
});
|
|
92066
92165
|
;// ./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=script&lang=js
|
|
@@ -92075,8 +92174,8 @@ var BatchQuerySelectorvue_type_template_id_240853ac_staticRenderFns = [];
|
|
|
92075
92174
|
;
|
|
92076
92175
|
var BatchQuerySelector_component = normalizeComponent(
|
|
92077
92176
|
batch_query_selector_BatchQuerySelectorvue_type_script_lang_js,
|
|
92078
|
-
|
|
92079
|
-
|
|
92177
|
+
BatchQuerySelectorvue_type_template_id_58a92f32_render,
|
|
92178
|
+
BatchQuerySelectorvue_type_template_id_58a92f32_staticRenderFns,
|
|
92080
92179
|
false,
|
|
92081
92180
|
null,
|
|
92082
92181
|
null,
|