File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
pages/docs/components/message Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { useDialog } from ' shuimo-ui/index' ;
3+
4+ const { visible, showDialog } = useDialog ();
5+ </script >
6+
7+ <template >
8+ <m-button @click =" showDialog" >点击这里</m-button >
9+ <m-dialog v-model:visible =" visible" >
10+ <div >
11+ <h1 >这里是dialog</h1 >
12+ </div >
13+ </m-dialog >
14+ </template >
15+
16+ <style scoped>
17+
18+ </style >
Original file line number Diff line number Diff line change 1616
1717::: demo message/dialog/closingControl
1818
19+ ### {{$t(\' 双向绑定\' )}}
20+
21+ ::: demo message/dialog/modelValue
22+
1923## API
2024
2125::: api message/dialog
Original file line number Diff line number Diff line change 1717 <h1 >这里是dialog</h1 >
1818 </div >
1919 </m-dialog >
20+
21+ <m-button @click =" showDialog" >点击这里打开</m-button >
22+ <m-dialog v-model:visible =" visible" >
23+ <div >
24+ <h1 >这里是dialog</h1 >
25+ </div >
26+ </m-dialog >
2027 </ComponentsWrap >
2128 <ComponentsWrap name =" Drawer" >
2229 <m-drawer >
7279 */
7380import { MConfirm , MMessage } from ' shuimo-ui/index' ;
7481import ComponentsWrap from ' ../components/ComponentsWrap.vue' ;
82+ import { useDialog } from " shuimo-ui/index" ;
83+
84+ const { visible, showDialog, closeDialog } = useDialog ();
7585
7686const activeConfirm = async () => {
7787 const res = await MConfirm ({ content: ' 测试' });
You can’t perform that action at this time.
0 commit comments