@@ -116,7 +116,7 @@ function handleOpened() {
116116
117117``` html
118118<wd-drop-menu >
119- <wd-drop-menu-item title =" 地图" icon =" location" icon-size =" 24px " />
119+ <wd-drop-menu-item title =" 地图" icon =" location" icon-size =" 14px " />
120120</wd-drop-menu >
121121```
122122
@@ -137,22 +137,24 @@ function handleOpened() {
137137
138138``` typescript
139139import { useMessage } from ' @/uni_modules/wot-design-uni'
140+ import type { DropMenuItemBeforeToggle } from ' @/uni_modules/wot-design-uni/components/wd-drop-menu-item/types'
141+
140142const messageBox = useMessage ()
141143
142144const value = ref <number >(0 )
143145
144146const option = ref <Record <string , any >[]>([
145147 { label: ' 全部商品' , value: 0 },
146- { label: ' 新款商品' , value: 1 },
147- { label: ' 活动商品 ' , value: 2 }
148+ { label: ' 新款商品' , value: 1 , tip: ' 这是补充信息 ' },
149+ { label: ' 这是比较长的筛选条件这是比较长的筛选条件 ' , value: 2 }
148150])
149151
150152// 通过对话框确认是否打开/关闭下拉菜单
151153const handleBeforeToggle: DropMenuItemBeforeToggle = ({ status , resolve }) => {
152154 messageBox
153155 .confirm ({
154- title: ` 异步 ${status ? ' 打开 ' : ' 关闭 ' }` ,
155- msg: ` 确定要 ${status ? ' 打开 ' : ' 关闭 ' }下拉菜单吗? `
156+ title: ` ${status ? ' 异步打开 ' : ' 异步关闭 ' } ` ,
157+ msg: ` ${status ? ' 确定要打开下拉菜单吗 ' : ' 确定要关闭下拉菜单吗 ' } `
156158 })
157159 .then (() => {
158160 resolve (true )
0 commit comments