diff --git a/src/tag-input/tag-input.tsx b/src/tag-input/tag-input.tsx index d2a7a0d37..f3177b2aa 100644 --- a/src/tag-input/tag-input.tsx +++ b/src/tag-input/tag-input.tsx @@ -130,6 +130,7 @@ export default defineComponent({ watch( () => isScrollable.value, (v) => { + if (props.excessTagsDisplayType !== 'scroll') return; const scrollElementClass = `${classPrefix.value}-input__prefix`; const scrollElement = tagInputRef.value.$el.querySelector(`.${scrollElementClass}`); if (v) scrollElement.classList.add(`${scrollElementClass}--scrollable`); @@ -239,7 +240,7 @@ export default defineComponent({ click: this.onInnerClick, compositionstart: this.onInputCompositionstart, compositionend: this.onInputCompositionend, - // scroll: this.onWheel, + mousewheel: this.onWheel, }} /> ); diff --git a/test/snap/__snapshots__/csr.test.js.snap b/test/snap/__snapshots__/csr.test.js.snap index 839c89640..a4cb3f161 100644 --- a/test/snap/__snapshots__/csr.test.js.snap +++ b/test/snap/__snapshots__/csr.test.js.snap @@ -131955,6 +131955,82 @@ exports[`csr snapshot test > csr test ./src/tag-input/_example/excess.vue 1`] = /> +
+ + VueNext + + + + +
+
+ + MiniProgram + + + + +
+
+ + Angular + + + + +
+
+ + Starter Kit + + + + +
csr test ./src/tag-input/_example/excess.vue 1`] = /> +
+ + VueNext + + + + +
+
+ + MiniProgram + + + + +
+
+ + Angular + + + + +
+
+ + Starter Kit + + + + +
renders ./src/tag-input/_example/custom-tag.vue cor exports[`ssr snapshot test > renders ./src/tag-input/_example/draggable.vue correctly 1`] = `"
Vue
React
Angular
Controlled:
Vue
React
Angular
Miniprogram
"`; -exports[`ssr snapshot test > renders ./src/tag-input/_example/excess.vue correctly 1`] = `"
Scroll:
Vue
React
BreakLine:
Vue
React
"`; +exports[`ssr snapshot test > renders ./src/tag-input/_example/excess.vue correctly 1`] = `"
Scroll:
Vue
React
VueNext
MiniProgram
Angular
Starter Kit
BreakLine:
Vue
React
VueNext
MiniProgram
Angular
Starter Kit
"`; exports[`ssr snapshot test > renders ./src/tag-input/_example/max.vue correctly 1`] = `"
最多只能输入 3 个标签
"`;