build(projects): 依赖升级

This commit is contained in:
Soybean
2021-08-26 14:09:31 +08:00
parent f1649de6d4
commit d00bb2286e
10 changed files with 475 additions and 241 deletions

View File

@ -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: '弹窗示例!' });
}