mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
build(projects): 依赖升级
This commit is contained in:
@ -9,32 +9,24 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useLoadingBar, useDialog, useNotification, useMessage } from 'naive-ui';
|
||||
import { useDialog, useNotification, useMessage } from 'naive-ui';
|
||||
|
||||
type ActionType = 'loading-bar' | 'dialog' | 'notification' | 'message';
|
||||
type ActionType = 'dialog' | 'notification' | 'message';
|
||||
interface Action {
|
||||
key: ActionType;
|
||||
label: string;
|
||||
}
|
||||
|
||||
const loadingBar = useLoadingBar();
|
||||
const dialog = useDialog();
|
||||
const notification = useNotification();
|
||||
const message = useMessage();
|
||||
|
||||
const actions: Action[] = [
|
||||
{ key: 'loading-bar', label: 'loading bar' },
|
||||
{ key: 'dialog', label: 'dialog' },
|
||||
{ key: 'notification', label: 'notification' },
|
||||
{ key: 'message', label: 'message' }
|
||||
];
|
||||
function handleClick(type: ActionType) {
|
||||
if (type === 'loading-bar') {
|
||||
loadingBar.start();
|
||||
setTimeout(() => {
|
||||
loadingBar.finish();
|
||||
}, 5000);
|
||||
}
|
||||
if (type === 'dialog') {
|
||||
dialog.info({ content: '弹窗示例!' });
|
||||
}
|
||||
|
Reference in New Issue
Block a user