41 lines
715 B
Vue
41 lines
715 B
Vue
<script setup lang="ts">
|
|
import { useDialog } from '@wot-ui/ui'
|
|
|
|
import { mockData } from '@/mock/index'
|
|
|
|
definePage({
|
|
layout: false,
|
|
style: {
|
|
navigationBarTitleText: '首页',
|
|
},
|
|
})
|
|
|
|
const dialog = useDialog()
|
|
|
|
function openConfirm() {
|
|
dialog
|
|
.confirm({
|
|
title: '提示',
|
|
msg: '确认执行此操作吗?',
|
|
})
|
|
.then(() => {
|
|
console.log('点击了确认')
|
|
})
|
|
.catch(() => {
|
|
console.log('点击了取消')
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<view>首页</view>
|
|
<view>消息:{{ mockData.message }}</view>
|
|
<view>时间:{{ mockData.time }}</view>
|
|
<wd-dialog />
|
|
<wd-button @click="openConfirm">
|
|
打开 Confirm
|
|
</wd-button>
|
|
</template>
|
|
|
|
<style></style>
|