Skip to content

fix(select-events-merge):Select Multiple Events Merge #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<template>
<tiny-select
v-model="value"
placeholder="请选择"
clearable
@change="change"
@clear="clear"
@blur="blur"
@focus="focus"
v-model="value"
placeholder="请选择"
clearable
@change="change"
@clear="clear"
@blur="blur"
@focus="focus"
@remove-tag="removeTag"
@visible-change="visibleChange"
>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-select>
Expand Down Expand Up @@ -48,4 +50,17 @@ const blur = () => {
message: 'blur事件'
})
}

const removeTag = () => {
Modal.message({
message: 'blur事件'
})
}


const visibleChange = () => {
Modal.message({
message: 'blur事件'
})
}
</script>
12 changes: 12 additions & 0 deletions examples/sites/demos/pc/app/select/envts-change.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@clear="clear"
@blur="blur"
@focus="focus"
@remove-tag="removeTag"
@visible-change="visibleChange"
>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-select>
Expand Down Expand Up @@ -52,6 +54,16 @@ export default {
Modal.message({
message: 'blur事件'
})
},
removeTag() {
Modal.message({
message: 'removeTag事件'
})
},
visibleChange() {
Modal.message({
message: 'visibleChange事件'
})
}
}
}
Expand Down
47 changes: 0 additions & 47 deletions examples/sites/demos/pc/app/select/envts-remove.vue

This file was deleted.

15 changes: 2 additions & 13 deletions examples/sites/demos/pc/app/select/webdoc/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,23 +161,12 @@ export default {
'name': { 'zh-CN': 'change clear blur focus 事件', 'en-US': 'visible-change remove-tag event' },
'desc': {
'zh-CN':
'<div class="tip custom-block"><p class="custom-block-title">事件说明</p>\n<p>change:选中值发生变化时触发,回调参数为目前的选中值\nclear:可清空的单选模式下用户点击清空按钮时触发\nblur:当 input 失去焦点时触发\nfocus:当 input 获得焦点时触发</p>\n</div>\n',
'<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',
'en-US':
'<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'
'<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'
},
'codeFiles': ['envts-change.vue']
},
{
'demoId': 'envts-remove',
'name': { 'zh-CN': 'visible-change remove-tag 事件', 'en-US': 'Searchable' },
'desc': {
'zh-CN':
'<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',
'en-US':
'<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'
},
'codeFiles': ['envts-remove.vue']
},
{
'demoId': 'filter-method',
'name': { 'zh-CN': '可搜索', 'en-US': 'The search allows copying' },
Expand Down