File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ function handleConfirm({ value }) {
351351
352352``` html
353353<view style =" margin-bottom : 10px ;" >当前选中日期:{{ formatValue }}</view >
354- <wd-calendar v-model =" value" @confirm =" handleConfirm4 " >
354+ <wd-calendar v-model =" value" @confirm =" handleConfirm " >
355355 <wd-button >选择日期</wd-button >
356356</wd-calendar >
357357```
@@ -360,7 +360,7 @@ function handleConfirm({ value }) {
360360const value = ref <string >(' ' )
361361const formatValue = ref <string >(' ' )
362362
363- function handleConfirm4 ({ value }) {
363+ function handleConfirm ({ value }) {
364364 formatValue .value = new Date (value ).toString ()
365365}
366366```
Original file line number Diff line number Diff line change 1313``` typescript
1414const value = ref <boolean >(true )
1515
16- function handleChange1 ({ value }) {
16+ function handleChange ({ value }) {
1717 console .log (value )
1818}
1919```
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ Collapse 查看更多的模式下,可以使用插槽定义自己想要的折
147147```
148148
149149``` html
150- <wd-collapse viewmore v-model =" value" @change =" handleChange4 " use-more-slot custom-more-slot-class =" more-slot" >
150+ <wd-collapse viewmore v-model =" value" @change =" handleChange " use-more-slot custom-more-slot-class =" more-slot" >
151151 具名插槽:这是一条简单的示例文字。这是一条简单的示例文字。这是一条简单的示例文字。这是一条简单的示例文字。这是一条简单的示例文字。这是一条简单的示例文字。这是一条简单的示例文字。这是一条简单的示例文字。
152152 <template #more >
153153 <view >显示全部</view >
Original file line number Diff line number Diff line change 1212
1313``` typescript
1414const value = ref <number >(1 )
15- function handleChange1 ({ value }) {
15+ function handleChange ({ value }) {
1616 console .log (value )
1717}
1818```
@@ -92,7 +92,7 @@ function handleChange1({ value }) {
9292
9393``` typescript
9494const value = ref <number | string >(' ' )
95- function handleChange1 ({ value }) {
95+ function handleChange ({ value }) {
9696 console .log (value )
9797}
9898```
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ Popover 的属性与 [Tooltip](/component/tooltip.html) 很类似,因此对于
2424import { useQueue } from ' @/uni_modules/wot-design-uni'
2525
2626const { closeOutside } = useQueue ()
27- function handleChange1 ({ show }) {
27+ function handleChange ({ show }) {
2828 console .log (show )
2929}
3030```
Original file line number Diff line number Diff line change 4545通过设置 ` close-on-click-modal ` 属性为 ` false ` ,你可以禁用用户点击遮罩层时关闭弹出层的功能。
4646
4747``` html
48- <wd-popup v-model =" show7 " position =" bottom" :close-on-click-modal =" false" closable custom-style =" height: 200px;" @close =" handleClose7 " ></wd-popup >
48+ <wd-popup v-model =" show " position =" bottom" :close-on-click-modal =" false" closable custom-style =" height: 200px;" @close =" handleClose " ></wd-popup >
4949```
5050
5151
5454通过设置 ` modal ` 属性为 ` false ` ,你可以禁用遮罩层,使用户可以与底层内容进行交互。
5555
5656``` html
57- <wd-popup v-model =" show8 " position =" bottom" :modal =" false" closable custom-style =" height: 200px;" @close =" handleClose8 " ></wd-popup >
57+ <wd-popup v-model =" show " position =" bottom" :modal =" false" closable custom-style =" height: 200px;" @close =" handleClose " ></wd-popup >
5858```
5959
6060
6363通过设置 ` safe-area-inset-bottom ` 属性为 ` true ` ,你可以确保弹出层在底部显示时不会被底部安全区域遮挡。
6464
6565``` html
66- <wd-popup v-model =" show9 " position =" bottom" :safe-area-inset-bottom =" true" custom-style =" height: 200px;" @close =" handleClose9 " ></wd-popup >
66+ <wd-popup v-model =" show " position =" bottom" :safe-area-inset-bottom =" true" custom-style =" height: 200px;" @close =" handleClose " ></wd-popup >
6767```
6868
6969## 禁止滚动穿透
7575可以使用 [ page-meta] ( https://uniapp.dcloud.net.cn/component/page-meta#page-meta ) 组件动态修改 ` page-meta ` 的 ` overflow ` 属性。
7676``` html
7777<!-- page-meta 只能是页面内的第一个节点 -->
78- <page-meta :page-style =" `overflow:${show10 ? 'hidden' : 'visible'};`" ></page-meta >
78+ <page-meta :page-style =" `overflow:${show ? 'hidden' : 'visible'};`" ></page-meta >
7979
80- <wd-popup v-model =" show10 " lock-scroll position =" bottom" :safe-area-inset-bottom =" true" custom-style =" height: 200px;" @close =" handleClose10 " ></wd-popup >
80+ <wd-popup v-model =" show " lock-scroll position =" bottom" :safe-area-inset-bottom =" true" custom-style =" height: 200px;" @close =" handleClose " ></wd-popup >
8181```
8282
8383:::tip 提示
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ const tabbar = ref(1)
120120通过监听 ` change ` 事件,可以获取选中标签的值。
121121
122122``` html
123- <wd-tabbar v-model =" tabbar" @change =" handleChange1 " active-color =" #ee0a24" inactive-color =" #7d7e80" >
123+ <wd-tabbar v-model =" tabbar" @change =" handleChange " active-color =" #ee0a24" inactive-color =" #7d7e80" >
124124 <wd-tabbar-item title =" 首页" icon =" home" ></wd-tabbar-item >
125125 <wd-tabbar-item title =" 分类" icon =" cart" ></wd-tabbar-item >
126126 <wd-tabbar-item title =" 我的" icon =" user" ></wd-tabbar-item >
@@ -134,7 +134,7 @@ import { ref } from 'vue'
134134
135135const tabbar = ref (1 )
136136
137- function handleChange1 ({ value }: { value: string }) {
137+ function handleChange ({ value }: { value: string }) {
138138 show (` 选中标签:${value } ` )
139139}
140140```
Original file line number Diff line number Diff line change 1919` action ` 设置上传的地址;
2020
2121``` html
22- <wd-upload :file-list =" fileList1 " image-mode =" aspectFill" :action =" action" @change =" handleChange1 " ></wd-upload >
22+ <wd-upload :file-list =" fileList " image-mode =" aspectFill" :action =" action" @change =" handleChange " ></wd-upload >
2323```
2424
2525``` typescript
You can’t perform that action at this time.
0 commit comments