Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef84a23

Browse files
committed
fix: CSelect: change input event to change, due to IE/edge support lack
1 parent98f53db commitef84a23

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/components/form/CSelect.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
v-on="$listeners"
2020
:id="safeId"
2121
:class="inputClasses"
22-
@input="onSelect($event)"
22+
@change="onSelect($event)"
2323
>
2424
<option
2525
v-if="placeholder"

‎src/components/form/tests/CSelect.spec.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ describe(ComponentName, () => {
6868
it('emit update event',()=>{
6969
constselect=customWrapper.find('select')
7070
select.element.value='Option 2'
71-
select.trigger('input')
71+
select.trigger('change')
7272
expect(customWrapper.emitted()['update:value']).toBeTruthy()
7373
constselect2=customSimpleWrapper.find('select')
7474
select2.element.value='Option 3'
75-
select2.trigger('input')
75+
select2.trigger('change')
7676
expect(customSimpleWrapper.emitted()['update:value']).toBeTruthy()
7777
})
7878
it('not emit update event on multiple select',()=>{
7979
constselect=wrapperMultiple.find('select')
8080
select.element.value='Option 2'
81-
select.trigger('input')
81+
select.trigger('change')
8282
expect(wrapperMultiple.emitted()['update:value']).not.toBeTruthy()
8383
})
8484
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp