EASYAIuniappNewUI/node_modules/@tuniao/tnui-vue3-uniapp/components/notify/src/notify.vue
2025-02-08 18:50:38 +08:00

31 lines
602 B
Vue

<script lang="ts" setup>
import { notifyProps } from './notify'
import { useNotify, useNotifyCustomStyle } from './composables'
const props = defineProps(notifyProps)
const { options, isActive, showNotify } = useNotify()
const { notifyClass, notifyStyle } = useNotifyCustomStyle(
props,
options,
isActive
)
defineExpose({
/**
* @description: 显示通知
*/
show: showNotify,
})
</script>
<template>
<view :class="[notifyClass]" :style="notifyStyle">
{{ options.msg }}
</view>
</template>
<style lang="scss" scoped>
@import '../../../theme-chalk/src/notify.scss';
</style>