Skip to content

Commit 329d32f

Browse files
authored
fix(select-events-merge):Select Multiple Events Merge (opentiny#663)
* fix(select-events-merge):Select Multiple Events Merge * fix(select-events-merge):Select Multiple Events Merge
1 parent 0631a43 commit 329d32f

File tree

4 files changed

+36
-67
lines changed

4 files changed

+36
-67
lines changed

examples/sites/demos/pc/app/select/envts-change-composition-api.vue

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<template>
22
<tiny-select
3-
v-model="value"
4-
placeholder="请选择"
5-
clearable
6-
@change="change"
7-
@clear="clear"
8-
@blur="blur"
9-
@focus="focus"
3+
v-model="value"
4+
placeholder="请选择"
5+
clearable
6+
@change="change"
7+
@clear="clear"
8+
@blur="blur"
9+
@focus="focus"
10+
@remove-tag="removeTag"
11+
@visible-change="visibleChange"
1012
>
1113
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
1214
</tiny-select>
@@ -48,4 +50,17 @@ const blur = () => {
4850
message: 'blur事件'
4951
})
5052
}
53+
54+
const removeTag = () => {
55+
Modal.message({
56+
message: 'blur事件'
57+
})
58+
}
59+
60+
61+
const visibleChange = () => {
62+
Modal.message({
63+
message: 'blur事件'
64+
})
65+
}
5166
</script>

examples/sites/demos/pc/app/select/envts-change.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
@clear="clear"
88
@blur="blur"
99
@focus="focus"
10+
@remove-tag="removeTag"
11+
@visible-change="visibleChange"
1012
>
1113
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
1214
</tiny-select>
@@ -52,6 +54,16 @@ export default {
5254
Modal.message({
5355
message: 'blur事件'
5456
})
57+
},
58+
removeTag() {
59+
Modal.message({
60+
message: 'removeTag事件'
61+
})
62+
},
63+
visibleChange() {
64+
Modal.message({
65+
message: 'visibleChange事件'
66+
})
5567
}
5668
}
5769
}

examples/sites/demos/pc/app/select/envts-remove.vue

Lines changed: 0 additions & 47 deletions
This file was deleted.

examples/sites/demos/pc/app/select/webdoc/select.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -161,23 +161,12 @@ export default {
161161
'name': { 'zh-CN': 'change clear blur focus 事件', 'en-US': 'visible-change remove-tag event' },
162162
'desc': {
163163
'zh-CN':
164-
'<div class="tip custom-block"><p class="custom-block-title">事件说明</p>\n<p>change:选中值发生变化时触发,回调参数为目前的选中值\nclear:可清空的单选模式下用户点击清空按钮时触发\nblur:当 input 失去焦点时触发\nfocus:当 input 获得焦点时触发</p>\n</div>\n',
164+
'<div class="tip custom-block"><p class="custom-block-title">事件说明</p>\n<p>change:选中值发生变化时触发,回调参数为目前的选中值;</p><p>clear:可清空的单选模式下用户点击清空按钮时触发;</p><p>blur:当 input 失去焦点时触发;</p><p>focus:当 input 获得焦点时触发;</p><p>visible-change:下拉框出现/隐藏时触发,回调参数为:出现则为 true,隐藏则为 false;</p><p>remove-tag:多选模式下移除tag时触发,回调参数为移除的 tag 值。</p>\n</div>\n',
165165
'en-US':
166-
'<div class="tip custom-block"><p class="custom-block-title"> Event Description</p>\n<p>visible-change: Triggered when the drop-down list box is displayed or hidden. The callback parameter is true if the drop-down list box is displayed or false if the drop-down list box is hidden.\nremove-tag: Triggered when the tag is removed in multi-select mode. The callback parameter is the removed tag value </p>\n</div>\n'
166+
'<div class="tip custom-block"><p class="custom-block-title"> Event Description</p>\n<p>change:Triggered when the selected value changes.The callback parameter id the current selected value.</p><p>clear:Emptable Radio mode Triggered when the user clicks the Emptable button</p><p>blur:Triggered when you lose focus.\nfocus:Triggered when input goes out of focus.</p><p>visible-change: Triggered when the drop-down list box is displayed or hidden. The callback parameter is true if the drop-down list box is displayed or false if the drop-down list box is hidden.</p><p>remove-tag: Triggered when the tag is removed in multi-select mode. The callback parameter is the removed tag value </p>\n</div>\n'
167167
},
168168
'codeFiles': ['envts-change.vue']
169169
},
170-
{
171-
'demoId': 'envts-remove',
172-
'name': { 'zh-CN': 'visible-change remove-tag 事件', 'en-US': 'Searchable' },
173-
'desc': {
174-
'zh-CN':
175-
'<div class="tip custom-block"><p class="custom-block-title">事件说明</p>\n<p>visible-change:下拉框出现/隐藏时触发,回调参数为:出现则为 true,隐藏则为 false\nremove-tag:多选模式下移除tag时触发,回调参数为移除的 tag 值</p>\n</div>\n',
176-
'en-US':
177-
'<p>The <code>filterable</code> property enables the search function. By default, Select finds all options for which the <code>label</code> property contains the entered value. If you want to use other search logic, you can pass in a <code>filter-method</code>. <code>filter-method</code> is a function. It is invoked when the input value changes. The parameter is the current input value. </p>\n'
178-
},
179-
'codeFiles': ['envts-remove.vue']
180-
},
181170
{
182171
'demoId': 'filter-method',
183172
'name': { 'zh-CN': '可搜索', 'en-US': 'The search allows copying' },

0 commit comments

Comments
 (0)