4 Commits

Author SHA1 Message Date
xiaoma
8288f0a84b 修复:项目配置 空白,多标签背景色 bug 2022-01-06 09:50:28 +08:00
xiaoma
c0ff8985ea Merge branch 'main' of github.com:jekip/naive-ui-admin into main 2021-12-30 15:04:31 +08:00
xiaoma
a8400ac475 Fix #80 And Depend on the upgrade 2021-12-30 15:04:10 +08:00
jack
d4b173e3c8 table 支持 dataSource 2021-12-26 10:18:44 +08:00
8 changed files with 762 additions and 766 deletions

View File

@@ -1,5 +1,14 @@
# CHANGELOG # CHANGELOG
## 1.6.1 (2022-01-06)
### 🐛 Bug Fixes
- 修复 `项目配置` 打开空白
- 修复 `多标签` 背景和字体色变量丢失
- ### ✨ Features
- 依赖升级
## 1.6.0 (2021-12-24) ## 1.6.0 (2021-12-24)
### 🐛 Bug Fixes ### 🐛 Bug Fixes

View File

@@ -1,5 +1,5 @@
## 留步 ## 留步
少侠留步,早知如此绊人心,何如当初莫相识,右上角免费的 `Star` 点一点,帮我们突破一下 `1.5k`谢谢O(∩_∩)O 少侠留步,早知如此绊人心,何如当初莫相识,右上角免费的 `Star` 点一点,帮我们突破一下 `2k`谢谢O(∩_∩)O
## 简介 ## 简介

View File

@@ -1,6 +1,6 @@
{ {
"name": "naive-ui-admin", "name": "naive-ui-admin",
"version": "1.6.0", "version": "1.6.1",
"author": { "author": {
"name": "Ahjung", "name": "Ahjung",
"email": "735878602@qq.com", "email": "735878602@qq.com",
@@ -39,7 +39,7 @@
"makeit-captcha": "^1.2.5", "makeit-captcha": "^1.2.5",
"mitt": "^2.1.0", "mitt": "^2.1.0",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"naive-ui": "^2.23.1", "naive-ui": "^2.23.2",
"pinia": "^2.0.0-rc.4", "pinia": "^2.0.0-rc.4",
"qs": "^6.10.1", "qs": "^6.10.1",
"vfonts": "^0.1.0", "vfonts": "^0.1.0",

View File

@@ -47,6 +47,7 @@ export function useDataSource(
try { try {
setLoading(true); setLoading(true);
const { request, pagination }: any = unref(propsRef); const { request, pagination }: any = unref(propsRef);
if (!request) return;
//组装分页信息 //组装分页信息
const pageField = APISETTING.pageField; const pageField = APISETTING.pageField;
const sizeField = APISETTING.sizeField; const sizeField = APISETTING.sizeField;

View File

@@ -16,7 +16,7 @@ export const basicProps = {
type: String, type: String,
default: 'medium', default: 'medium',
}, },
tableData: { dataSource: {
type: [Object], type: [Object],
default: () => [], default: () => [],
}, },
@@ -28,7 +28,6 @@ export const basicProps = {
request: { request: {
type: Function as PropType<(...arg: any[]) => Promise<any>>, type: Function as PropType<(...arg: any[]) => Promise<any>>,
default: null, default: null,
required: true,
}, },
rowKey: { rowKey: {
type: [String, Function] as PropType<string | ((record) => string)>, type: [String, Function] as PropType<string | ((record) => string)>,

View File

@@ -1,10 +1,10 @@
<template> <template>
<n-drawer v-model:show="isDrawer" :width="width" :placement="placement" :native-scrollbar="false"> <n-drawer v-model:show="isDrawer" :width="width" :placement="placement">
<n-drawer-content :title="title"> <n-drawer-content :title="title" :native-scrollbar="false">
<div class="drawer"> <div class="drawer">
<n-divider title-placement="center">主题</n-divider> <n-divider title-placement="center">主题</n-divider>
<div class="drawer-setting-item justify-center dark-switch"> <div class="justify-center drawer-setting-item dark-switch">
<n-tooltip placement="bottom"> <n-tooltip placement="bottom">
<template #trigger> <template #trigger>
<n-switch v-model:value="designStore.darkTheme" class="dark-theme-switch"> <n-switch v-model:value="designStore.darkTheme" class="dark-theme-switch">
@@ -116,9 +116,7 @@
</n-tooltip> </n-tooltip>
<n-badge dot color="#19be6b" v-if="settingStore.navTheme === 'light'" /> <n-badge dot color="#19be6b" v-if="settingStore.navTheme === 'light'" />
</div> </div>
</div>
<div class="drawer-setting-item align-items-top">
<div class="drawer-setting-item-style"> <div class="drawer-setting-item-style">
<n-tooltip placement="top"> <n-tooltip placement="top">
<template #trigger> <template #trigger>
@@ -133,7 +131,6 @@
<n-badge dot color="#19be6b" v-if="settingStore.navTheme === 'header-dark'" /> <n-badge dot color="#19be6b" v-if="settingStore.navTheme === 'header-dark'" />
</div> </div>
</div> </div>
<n-divider title-placement="center">界面功能</n-divider> <n-divider title-placement="center">界面功能</n-divider>
<div class="drawer-setting-item"> <div class="drawer-setting-item">
@@ -361,7 +358,7 @@
border-radius: 2px; border-radius: 2px;
margin: 0 5px 5px 0; margin: 0 5px 5px 0;
text-align: center; text-align: center;
line-height: 14px;
.n-icon { .n-icon {
color: #fff; color: #fff;
} }

View File

@@ -115,6 +115,7 @@
import elementResizeDetectorMaker from 'element-resize-detector'; import elementResizeDetectorMaker from 'element-resize-detector';
import { useDesignSetting } from '@/hooks/setting/useDesignSetting'; import { useDesignSetting } from '@/hooks/setting/useDesignSetting';
import { useProjectSettingStore } from '@/store/modules/projectSetting'; import { useProjectSettingStore } from '@/store/modules/projectSetting';
import { useThemeVars } from 'naive-ui';
export default defineComponent({ export default defineComponent({
name: 'TabsView', name: 'TabsView',
@@ -145,6 +146,16 @@
const navWrap: any = ref(null); const navWrap: any = ref(null);
const isCurrent = ref(false); const isCurrent = ref(false);
const themeVars = useThemeVars();
const getCardColor = computed(() => {
return themeVars.value.cardColor;
});
const getBaseColor = computed(() => {
return themeVars.value.textColor1;
});
const state = reactive({ const state = reactive({
activeKey: route.fullPath, activeKey: route.fullPath,
scrollable: false, scrollable: false,
@@ -505,6 +516,8 @@
onClickOutside, onClickOutside,
getDarkTheme, getDarkTheme,
getAppTheme, getAppTheme,
getCardColor,
getBaseColor,
}; };
}, },
}); });
@@ -565,8 +578,8 @@
overflow: hidden; overflow: hidden;
&-item { &-item {
background: var(--color); background: v-bind(getCardColor);
color: var(--text-color); color: v-bind(getBaseColor);
height: 32px; height: 32px;
padding: 6px 16px 4px; padding: 6px 16px 4px;
border-radius: 3px; border-radius: 3px;

1481
yarn.lock

File diff suppressed because it is too large Load Diff