feat(projects): 登录页面实现

This commit is contained in:
Soybean
2021-09-11 02:34:36 +08:00
parent 5c01006306
commit f1e7cf608e
47 changed files with 780 additions and 153 deletions

View File

@ -1,65 +0,0 @@
<template>
<div class="min-h-500px">
<n-space>
<n-button v-for="item in actions" :key="item.key" type="primary" @click="handleClick(item.key)">
{{ item.label }}
</n-button>
</n-space>
<n-space>
<n-button>Default</n-button>
<n-button type="primary">Primary</n-button>
<n-button type="info">Info</n-button>
<n-button type="success">Success</n-button>
<n-button type="warning">Warning</n-button>
<n-button type="error">Error</n-button>
</n-space>
<router-link class="text-primary" to="/system">system</router-link>
<div>
<span class="text-primary">primary</span>
<span class="text-info">info</span>
<span class="text-success">success</span>
<span class="text-warning">warning</span>
<span class="text-error">error</span>
</div>
<p v-for="i in 100" :key="i">{{ i }}</p>
</div>
</template>
<script lang="ts" setup>
import { NButton, NSpace, useDialog, useNotification, useMessage } from 'naive-ui';
type ActionType = 'dialog' | 'notification' | 'message';
interface Action {
key: ActionType;
label: string;
}
defineProps({
code: {
type: String,
default: ''
}
});
const dialog = useDialog();
const notification = useNotification();
const message = useMessage();
const actions: Action[] = [
{ key: 'dialog', label: 'dialog' },
{ key: 'notification', label: 'notification' },
{ key: 'message', label: 'message' }
];
function handleClick(type: ActionType) {
if (type === 'dialog') {
dialog.info({ content: '弹窗示例!' });
}
if (type === 'notification') {
notification.info({ content: '通知示例!' });
}
if (type === 'message') {
message.info('消息示例!');
}
}
</script>
<style scoped></style>