feat(projects): 添加组件名称,调整vue文件里面的类型声明位置

This commit is contained in:
Soybean
2022-07-10 14:02:00 +08:00
parent b60db89801
commit f64bc91ce2
76 changed files with 223 additions and 70 deletions

View File

@@ -23,6 +23,8 @@
import { h } from 'vue';
import { NTag } from 'naive-ui';
defineOptions({ name: 'DashboardAnalysisBottomPart' });
interface TimelineData {
type: 'default' | 'info' | 'success' | 'warning' | 'error';
title: string;

View File

@@ -21,6 +21,8 @@
import { Icon } from '@iconify/vue';
import { GradientBg } from './components';
defineOptions({ name: 'DashboardAnalysisDataCard' });
interface CardData {
id: string;
title: string;

View File

@@ -34,6 +34,8 @@
import { ref } from 'vue';
import { useEcharts, type ECOption } from '@/composables';
defineOptions({ name: 'DashboardAnalysisTopCard' });
const lineOptions = ref<ECOption>({
tooltip: {
trigger: 'axis',

View File

@@ -18,14 +18,16 @@
<script setup lang="ts">
import { useAuthStore } from '@/store';
defineOptions({ name: 'DashboardWorkbenchHeader' });
const auth = useAuthStore();
interface StatisticData {
id: number;
label: string;
value: string;
}
const auth = useAuthStore();
const statisticData: StatisticData[] = [
{
id: 0,

View File

@@ -10,6 +10,8 @@
<script setup lang="ts">
import { Icon } from '@iconify/vue';
defineOptions({ name: 'DashboardWorkbenchMainShortcutsCard' });
interface Props {
/** 快捷操作名称 */
label: string;

View File

@@ -17,6 +17,8 @@
<script setup lang="ts">
import { Icon } from '@iconify/vue';
defineOptions({ name: 'DashboardWorkbenchMainTechnologyCard' });
interface Props {
/** 技术名称 */
name: string;

View File

@@ -47,6 +47,8 @@
<script setup lang="ts">
import { TechnologyCard, ShortcutsCard } from './components';
defineOptions({ name: 'DashboardWorkbenchMain' });
interface Technology {
id: number;
name: string;
@@ -57,19 +59,6 @@ interface Technology {
iconColor?: string;
}
interface Activity {
id: number;
content: string;
time: string;
}
interface Shortcuts {
id: number;
label: string;
icon: string;
iconColor: string;
}
const technology: Technology[] = [
{
id: 0,
@@ -124,6 +113,12 @@ const technology: Technology[] = [
}
];
interface Activity {
id: number;
content: string;
time: string;
}
const activity: Activity[] = [
{ id: 4, content: 'Soybean 刚才把工作台页面随便写了一些,凑合能看了!', time: '2021-11-07 22:45:32' },
{ id: 3, content: 'Soybean 正在忙于为soybean-admin写项目说明文档', time: '2021-11-03 20:33:31' },
@@ -132,6 +127,13 @@ const activity: Activity[] = [
{ id: 0, content: 'Soybean 在2021年5月28日创建了开源项目soybean-admin', time: '2021-05-28 22:22:22' }
];
interface Shortcuts {
id: number;
label: string;
icon: string;
iconColor: string;
}
const shortcuts: Shortcuts[] = [
{ id: 0, label: '主控台', icon: 'mdi:desktop-mac-dashboard', iconColor: '#409eff' },
{ id: 1, label: '系统管理', icon: 'ic:outline-settings', iconColor: '#7238d1' },