fix(projects): 修复vertical sider自适应主题

This commit is contained in:
Soybean
2021-10-15 12:02:53 +08:00
parent e1e5579e8f
commit 9097fa3866
19 changed files with 227 additions and 143 deletions

View File

@ -1,18 +1,46 @@
<template>
<div>
<n-spin class="flex-y-center flex-col" :show="loading">
<n-gradient-text type="primary" size="32">工作台</n-gradient-text>
<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>
<n-space>
<n-tag>Tag</n-tag>
<n-tag type="primary">Primary Tag</n-tag>
<n-spin :show="loading">
<n-space :vertical="true">
<div>
<n-gradient-text type="primary" size="32">GradientText</n-gradient-text>
<n-space>
<n-gradient-text>Default</n-gradient-text>
<n-gradient-text type="primary">Primary</n-gradient-text>
<n-gradient-text type="info">Info</n-gradient-text>
<n-gradient-text type="success">Success</n-gradient-text>
<n-gradient-text type="warning">Warning</n-gradient-text>
<n-gradient-text type="error">Error</n-gradient-text>
</n-space>
</div>
<div>
<n-gradient-text type="primary" size="32">Button</n-gradient-text>
<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>
</div>
<n-gradient-text type="primary" size="32">Tag</n-gradient-text>
<n-space>
<n-tag>Tag</n-tag>
<n-tag type="primary">Primary</n-tag>
<n-tag type="info">Info</n-tag>
<n-tag type="success">Success</n-tag>
<n-tag type="warning">Warning</n-tag>
<n-tag type="error">Error</n-tag>
</n-space>
<div>
<n-gradient-text type="primary" size="32">Switch | Checkbox | Radio</n-gradient-text>
<n-space>
<n-switch :default-value="true" />
<n-checkbox :default-checked="true" />
<n-radio :default-checked="true" />
</n-space>
</div>
</n-space>
</n-spin>
</div>
@ -20,7 +48,7 @@
<script lang="ts" setup>
import { ref } from 'vue';
import { NGradientText, NSpace, NButton, NSpin, NTag } from 'naive-ui';
import { NGradientText, NSpace, NButton, NSpin, NTag, NSwitch, NCheckbox, NRadio } from 'naive-ui';
const loading = ref(true);

View File

@ -10,7 +10,7 @@
<n-space :vertical="true" size="large">
<div class="flex-y-center justify-between">
<n-checkbox v-model:checked="rememberMe">记住我</n-checkbox>
<span class="text-primary cursor-pointer" @click="toCurrentLogin('reset-pwd')">忘记密码</span>
<span class="g_text-primary cursor-pointer" @click="toCurrentLogin('reset-pwd')">忘记密码</span>
</div>
<n-button type="primary" size="large" :block="true" :round="true" @click="handleSubmit">确定</n-button>
<div class="flex-y-center justify-between">

View File

@ -9,7 +9,7 @@
</header>
<main class="pt-24px">
<div v-for="item in modules" v-show="module === item.key" :key="item.key">
<h3 class="text-18px text-primary font-medium">{{ item.label }}</h3>
<h3 class="text-18px g_text-primary font-medium">{{ item.label }}</h3>
<component :is="item.component" />
</div>
</main>