diff --git a/pages.config.ts b/pages.config.ts
index 7a9edb3..abb0a92 100644
--- a/pages.config.ts
+++ b/pages.config.ts
@@ -4,7 +4,7 @@ import { tabBar } from './src/tabbar/config'
export default defineUniPages({
globalStyle: {
navigationStyle: 'default',
- navigationBarTitleText: 'unibest',
+ navigationBarTitleText: '芋道管理系统',
navigationBarBackgroundColor: '#f8f8f8',
navigationBarTextStyle: 'black',
backgroundColor: '#FFFFFF',
@@ -13,9 +13,9 @@ export default defineUniPages({
autoscan: true,
custom: {
'^fg-(.*)': '@/components/fg-$1/fg-$1.vue',
+ '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
'^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
'z-paging/components/z-paging$1/z-paging$1.vue',
- '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
},
},
// tabbar 的配置统一在 “./src/tabbar/config.ts” 文件中
diff --git a/src/App.ku.vue b/src/App.ku.vue
index f157361..8aab489 100644
--- a/src/App.ku.vue
+++ b/src/App.ku.vue
@@ -1,9 +1,12 @@
-
+
{{ helloKuRoot }},这里可以配置全局的东西
@@ -37,5 +40,7 @@ defineExpose({
-
+
+
+
diff --git a/src/store/theme.ts b/src/store/theme.ts
new file mode 100644
index 0000000..c3f1c55
--- /dev/null
+++ b/src/store/theme.ts
@@ -0,0 +1,42 @@
+import type { ConfigProviderThemeVars } from 'wot-design-uni'
+
+import { defineStore } from 'pinia'
+
+export const useThemeStore = defineStore(
+ 'theme-store',
+ () => {
+ /** 主题 */
+ const theme = ref<'light' | 'dark'>('light')
+
+ /** 主题变量 */
+ const themeVars = ref({
+ // colorTheme: 'red',
+ // buttonPrimaryBgColor: '#07c160',
+ // buttonPrimaryColor: '#07c160',
+ })
+
+ /** 设置主题变量 */
+ const setThemeVars = (partialVars: Partial) => {
+ themeVars.value = { ...themeVars.value, ...partialVars }
+ }
+
+ /** 切换主题 */
+ const toggleTheme = () => {
+ theme.value = theme.value === 'light' ? 'dark' : 'light'
+ }
+
+ return {
+ /** 设置主题变量 */
+ setThemeVars,
+ /** 切换主题 */
+ toggleTheme,
+ /** 主题变量 */
+ themeVars,
+ /** 主题 */
+ theme,
+ }
+ },
+ {
+ persist: true,
+ },
+)
diff --git a/src/tabbar/index.vue b/src/tabbar/index.vue
index 20f2f10..eca89bd 100644
--- a/src/tabbar/index.vue
+++ b/src/tabbar/index.vue
@@ -108,7 +108,7 @@ function getImageByIndex(index: number, item: CustomTabBarItem) {
-
+
@@ -146,7 +146,7 @@ function getImageByIndex(index: number, item: CustomTabBarItem) {
left: 0;
right: 0;
z-index: 1000;
-
+
border-top: 1px solid #eee;
box-sizing: border-box;
}
diff --git a/vite.config.ts b/vite.config.ts
index 5581195..66fb3b5 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -2,6 +2,7 @@ import path from 'node:path'
import process from 'node:process'
import Uni from '@uni-helper/plugin-uni'
import Components from '@uni-helper/vite-plugin-uni-components'
+import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
// @see https://uni-helper.js.org/vite-plugin-uni-layouts
import UniLayouts from '@uni-helper/vite-plugin-uni-layouts'
// @see https://github.com/uni-helper/vite-plugin-uni-manifest
@@ -71,7 +72,12 @@ export default defineConfig(({ command, mode }) => {
exclude: ['**/components/**/**.*'],
// pages 目录为 src/pages,分包目录不能配置在pages目录下!!
// 是个数组,可以配置多个,但是不能为pages里面的目录!!
- subPackages: [],
+ subPackages: [
+ 'src/pages-fg', // 这个是相对必要的路由,尽量留着(登录页、注册页、404页等)
+ 'src/pages-system', // “系统管理”模块
+ 'src/pages-infra', // “基础设施”模块
+ 'src/pages-bpm', // “工作流程”模块
+ ],
dts: 'src/types/uni-pages.d.ts',
}),
// Optimization 插件需要 page.json 文件,故应在 UniPages 插件之后执行
@@ -146,6 +152,13 @@ export default defineConfig(({ command, mode }) => {
},
),
syncManifestPlugin(),
+ Components({
+ resolvers: [WotResolver()],
+ extensions: ['vue'],
+ deep: true, // 是否递归扫描子目录,
+ directoryAsNamespace: false, // 是否把目录名作为命名空间前缀,true 时组件名为 目录名+组件名,
+ dts: 'src/types/components.d.ts', // 自动生成的组件类型声明文件路径(用于 TypeScript 支持)
+ }),
// 自动打开开发者工具插件 (必须修改 .env 文件中的 VITE_WX_APPID)
openDevTools(),
],