diff --git a/packages/varlet-ui/src/menu-select/example/index.vue b/packages/varlet-ui/src/menu-select/example/index.vue index 931cfbc68c3..df2d591b849 100644 --- a/packages/varlet-ui/src/menu-select/example/index.vue +++ b/packages/varlet-ui/src/menu-select/example/index.vue @@ -2,6 +2,7 @@ import { computed, ref } from 'vue' import { watchLang, onThemeChange, AppType } from '@varlet/cli/client' import { use, t } from './locale' +import { Snackbar } from '@varlet/ui' const value = ref() const valueNormal = ref() @@ -125,6 +126,10 @@ watchLang((lang) => { }) onThemeChange() + +function handleSelect(value) { + Snackbar(`Select: ${value}`) +} + {{ t('onSelect') }} + + {{ t('please') }} + + + + {{ t('size') }} @@ -242,12 +258,12 @@ onThemeChange() {{ valueSelectOptions ? valueSelectOptions : t('please') }} - Cascade + {{ t('cascade') }} {{ cascadeValue ? cascadeValue : t('please') }} - Cascade Multiple + {{ t('multipleCascade') }} {{ cascadeMultipleValue.length ? cascadeMultipleValue : t('please') }} diff --git a/packages/varlet-ui/src/menu-select/example/locale/en-US.ts b/packages/varlet-ui/src/menu-select/example/locale/en-US.ts index 4a6dd0d51df..5be23514552 100644 --- a/packages/varlet-ui/src/menu-select/example/locale/en-US.ts +++ b/packages/varlet-ui/src/menu-select/example/locale/en-US.ts @@ -18,4 +18,5 @@ export default { closeOnSelect: 'Disable Close On Select', selectOptions: 'Options API', selectOptionsWithCustomizedKey: 'Options API (With Customized Key)', + onSelect: 'Select Event', } diff --git a/packages/varlet-ui/src/menu-select/example/locale/zh-CN.ts b/packages/varlet-ui/src/menu-select/example/locale/zh-CN.ts index 42baecff0e2..b9d8ed53a8f 100644 --- a/packages/varlet-ui/src/menu-select/example/locale/zh-CN.ts +++ b/packages/varlet-ui/src/menu-select/example/locale/zh-CN.ts @@ -18,4 +18,7 @@ export default { closeOnSelect: '选择选项时禁止关闭菜单', selectOptions: '选项式 API', selectOptionsWithCustomizedKey: '选项式 API(自定义字段)', + onSelect: '选中事件', + cascade: '级联单选', + multipleCascade: '级联多选', }