Open ruby-ya opened 2 months ago
TnNotify-消息通知样例文档中,导入组件和使用组件时组件名不同。 https://vue3.tuniaokj.com/doc/component/notify.html
import TnNotice from '@tuniao/tnui-vue3-uniapp/components/notify/src/notify.vue' import type { TnNotifyInstance } from '@tuniao/tnui-vue3-uniapp/components/notify'
<script lang="ts" setup> import { ref } from 'vue' import type { TnNotifyInstance } from '@tuniao/tnui-vue3-uniapp' const notifyRef = ref<TnNotifyInstance>() const showNotify = () => { notifyRef.value?.show({ msg: '操作成功', }) } </script> <template> <TnButton @click="showNotify">显示通知</TnButton> <TnNotify ref="notifyRef" /> </template>
TnNotify-消息通知样例文档中,导入组件和使用组件时组件名不同。 https://vue3.tuniaokj.com/doc/component/notify.html