chore: 升级 wot-design-uni 到 @wot-ui/ui v2.0.8
重大变更: - 升级 UI 组件库从 wot-design-uni@1.14.0 到 @wot-ui/ui@2.0.8 - 新增 dayjs@1.11.13 作为独立依赖 组件迁移: - wd-message-box → wd-dialog (3个文件) - wd-status-tip → wd-empty (10个文件) - wd-col-picker → wd-cascader (3个文件) API 变更: - useMessage → useDialog (12个文件) - 所有导入路径从 wot-design-uni 更新为 @wot-ui/ui - dayjs 改为独立导入 配置更新: - vite.config.ts: 自定义 WotUIResolver 替代 WotResolver - tsconfig.json: 更新类型声明路径 - components.d.ts: 更新所有组件类型路径 影响范围: - 修改文件: 33个 - 布局文件: 2个 - 页面文件: 21个 - 组件文件: 1个 - 配置文件: 4个 - 类型文件: 2个 Breaking Changes: - Dialog 的 closeOnClickModal 默认值从 true 改为 false - Prompt 返回值从 res 改为 res.value - Empty 的 image 属性改为 icon - Cascader 的 columns 建议改为 options(向后兼容)
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -24,3 +24,10 @@ dist
|
|||||||
launch.json
|
launch.json
|
||||||
.hbuilderx
|
.hbuilderx
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
|
||||||
|
|
||||||
|
.claude/
|
||||||
|
.cursor/
|
||||||
|
.windsurf/
|
||||||
|
.agents/
|
||||||
|
skills-lock.json
|
||||||
85
components.d.ts
vendored
85
components.d.ts
vendored
@@ -10,7 +10,6 @@ declare module 'vue' {
|
|||||||
CuDateQuery: typeof import('./src/components/cu-date-query/index.vue')['default']
|
CuDateQuery: typeof import('./src/components/cu-date-query/index.vue')['default']
|
||||||
CustomNavbar: typeof import('./src/components/custom-navbar/index.vue')['default']
|
CustomNavbar: typeof import('./src/components/custom-navbar/index.vue')['default']
|
||||||
CustomTree: typeof import('./src/components/custom-tree/index.vue')['default']
|
CustomTree: typeof import('./src/components/custom-tree/index.vue')['default']
|
||||||
EmptyState: typeof import('./src/components/empty-state/index.vue')['default']
|
|
||||||
Loading1: typeof import('./src/components/qiun-loading/loading1.vue')['default']
|
Loading1: typeof import('./src/components/qiun-loading/loading1.vue')['default']
|
||||||
Loading2: typeof import('./src/components/qiun-loading/loading2.vue')['default']
|
Loading2: typeof import('./src/components/qiun-loading/loading2.vue')['default']
|
||||||
Loading3: typeof import('./src/components/qiun-loading/loading3.vue')['default']
|
Loading3: typeof import('./src/components/qiun-loading/loading3.vue')['default']
|
||||||
@@ -19,49 +18,45 @@ declare module 'vue' {
|
|||||||
QiunDataCharts: typeof import('./src/components/qiun-data-charts/qiun-data-charts.vue')['default']
|
QiunDataCharts: typeof import('./src/components/qiun-data-charts/qiun-data-charts.vue')['default']
|
||||||
QiunError: typeof import('./src/components/qiun-error/qiun-error.vue')['default']
|
QiunError: typeof import('./src/components/qiun-error/qiun-error.vue')['default']
|
||||||
QiunLoading: typeof import('./src/components/qiun-loading/qiun-loading.vue')['default']
|
QiunLoading: typeof import('./src/components/qiun-loading/qiun-loading.vue')['default']
|
||||||
WdActionSheet: typeof import('wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue')['default']
|
WdActionSheet: typeof import('@wot-ui/ui/components/wd-action-sheet/wd-action-sheet.vue')['default']
|
||||||
WdBadge: typeof import('wot-design-uni/components/wd-badge/wd-badge.vue')['default']
|
WdBadge: typeof import('@wot-ui/ui/components/wd-badge/wd-badge.vue')['default']
|
||||||
WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
|
WdButton: typeof import('@wot-ui/ui/components/wd-button/wd-button.vue')['default']
|
||||||
WdCalendar: typeof import('wot-design-uni/components/wd-calendar/wd-calendar.vue')['default']
|
WdCalendar: typeof import('@wot-ui/ui/components/wd-calendar/wd-calendar.vue')['default']
|
||||||
WdCard: typeof import('wot-design-uni/components/wd-card/wd-card.vue')['default']
|
WdCard: typeof import('@wot-ui/ui/components/wd-card/wd-card.vue')['default']
|
||||||
WdCascader: typeof import('wot-design-uni/components/wd-cascader/wd-cascader.vue')['default']
|
WdCascader: typeof import('@wot-ui/ui/components/wd-cascader/wd-cascader.vue')['default']
|
||||||
WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default']
|
WdCell: typeof import('@wot-ui/ui/components/wd-cell/wd-cell.vue')['default']
|
||||||
WdCellGroup: typeof import('wot-design-uni/components/wd-cell-group/wd-cell-group.vue')['default']
|
WdCellGroup: typeof import('@wot-ui/ui/components/wd-cell-group/wd-cell-group.vue')['default']
|
||||||
WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default']
|
WdCheckbox: typeof import('@wot-ui/ui/components/wd-checkbox/wd-checkbox.vue')['default']
|
||||||
WdCollapse: typeof import('wot-design-uni/components/wd-collapse/wd-collapse.vue')['default']
|
WdCollapse: typeof import('@wot-ui/ui/components/wd-collapse/wd-collapse.vue')['default']
|
||||||
WdCollapseItem: typeof import('wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue')['default']
|
WdCollapseItem: typeof import('@wot-ui/ui/components/wd-collapse-item/wd-collapse-item.vue')['default']
|
||||||
WdColPicker: typeof import('wot-design-uni/components/wd-col-picker/wd-col-picker.vue')['default']
|
WdConfigProvider: typeof import('@wot-ui/ui/components/wd-config-provider/wd-config-provider.vue')['default']
|
||||||
WdConfigProvider: typeof import('wot-design-uni/components/wd-config-provider/wd-config-provider.vue')['default']
|
WdDialog: typeof import('@wot-ui/ui/components/wd-dialog/wd-dialog.vue')['default']
|
||||||
WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default']
|
WdDivider: typeof import('@wot-ui/ui/components/wd-divider/wd-divider.vue')['default']
|
||||||
WdDropMenu: typeof import('wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue')['default']
|
WdDropMenu: typeof import('@wot-ui/ui/components/wd-drop-menu/wd-drop-menu.vue')['default']
|
||||||
WdDropMenuItem: typeof import('wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue')['default']
|
WdDropMenuItem: typeof import('@wot-ui/ui/components/wd-drop-menu-item/wd-drop-menu-item.vue')['default']
|
||||||
WdEmpty: typeof import('wot-design-uni/components/wd-empty/wd-empty.vue')['default']
|
WdEmpty: typeof import('@wot-ui/ui/components/wd-empty/wd-empty.vue')['default']
|
||||||
WdFab: typeof import('wot-design-uni/components/wd-fab/wd-fab.vue')['default']
|
WdFab: typeof import('@wot-ui/ui/components/wd-fab/wd-fab.vue')['default']
|
||||||
WdForm: typeof import('wot-design-uni/components/wd-form/wd-form.vue')['default']
|
WdForm: typeof import('@wot-ui/ui/components/wd-form/wd-form.vue')['default']
|
||||||
WdGrid: typeof import('wot-design-uni/components/wd-grid/wd-grid.vue')['default']
|
WdGrid: typeof import('@wot-ui/ui/components/wd-grid/wd-grid.vue')['default']
|
||||||
WdGridItem: typeof import('wot-design-uni/components/wd-grid-item/wd-grid-item.vue')['default']
|
WdGridItem: typeof import('@wot-ui/ui/components/wd-grid-item/wd-grid-item.vue')['default']
|
||||||
WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default']
|
WdIcon: typeof import('@wot-ui/ui/components/wd-icon/wd-icon.vue')['default']
|
||||||
WdImgCropper: typeof import('wot-design-uni/components/wd-img-cropper/wd-img-cropper.vue')['default']
|
WdImgCropper: typeof import('@wot-ui/ui/components/wd-img-cropper/wd-img-cropper.vue')['default']
|
||||||
WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default']
|
WdInput: typeof import('@wot-ui/ui/components/wd-input/wd-input.vue')['default']
|
||||||
WdInputNumber: typeof import('wot-design-uni/components/wd-input-number/wd-input-number.vue')['default']
|
WdInputNumber: typeof import('@wot-ui/ui/components/wd-input-number/wd-input-number.vue')['default']
|
||||||
WdLoading: typeof import('wot-design-uni/components/wd-loading/wd-loading.vue')['default']
|
WdLoading: typeof import('@wot-ui/ui/components/wd-loading/wd-loading.vue')['default']
|
||||||
WdLoadmore: typeof import('wot-design-uni/components/wd-loadmore/wd-loadmore.vue')['default']
|
WdLoadmore: typeof import('@wot-ui/ui/components/wd-loadmore/wd-loadmore.vue')['default']
|
||||||
WdMessageBox: typeof import('wot-design-uni/components/wd-message-box/wd-message-box.vue')['default']
|
WdNotify: typeof import('@wot-ui/ui/components/wd-notify/wd-notify.vue')['default']
|
||||||
WdNotify: typeof import('wot-design-uni/components/wd-notify/wd-notify.vue')['default']
|
WdPopup: typeof import('@wot-ui/ui/components/wd-popup/wd-popup.vue')['default']
|
||||||
WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
|
WdRadio: typeof import('@wot-ui/ui/components/wd-radio/wd-radio.vue')['default']
|
||||||
WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
|
WdRadioGroup: typeof import('@wot-ui/ui/components/wd-radio-group/wd-radio-group.vue')['default']
|
||||||
WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']
|
WdSearch: typeof import('@wot-ui/ui/components/wd-search/wd-search.vue')['default']
|
||||||
WdSearch: typeof import('wot-design-uni/components/wd-search/wd-search.vue')['default']
|
WdSelectPicker: typeof import('@wot-ui/ui/components/wd-select-picker/wd-select-picker.vue')['default']
|
||||||
WdSelectPicker: typeof import('wot-design-uni/components/wd-select-picker/wd-select-picker.vue')['default']
|
WdSwiper: typeof import('@wot-ui/ui/components/wd-swiper/wd-swiper.vue')['default']
|
||||||
WdStatusTip: typeof import('wot-design-uni/components/wd-status-tip/wd-status-tip.vue')['default']
|
WdSwitch: typeof import('@wot-ui/ui/components/wd-switch/wd-switch.vue')['default']
|
||||||
WdSwiper: typeof import('wot-design-uni/components/wd-swiper/wd-swiper.vue')['default']
|
WdTabbar: typeof import('@wot-ui/ui/components/wd-tabbar/wd-tabbar.vue')['default']
|
||||||
WdSwitch: typeof import('wot-design-uni/components/wd-switch/wd-switch.vue')['default']
|
WdTabbarItem: typeof import('@wot-ui/ui/components/wd-tabbar-item/wd-tabbar-item.vue')['default']
|
||||||
WdTab: typeof import('wot-design-uni/components/wd-tab/wd-tab.vue')['default']
|
WdTag: typeof import('@wot-ui/ui/components/wd-tag/wd-tag.vue')['default']
|
||||||
WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default']
|
WdTextarea: typeof import('@wot-ui/ui/components/wd-textarea/wd-textarea.vue')['default']
|
||||||
WdTabbarItem: typeof import('wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue')['default']
|
WdToast: typeof import('@wot-ui/ui/components/wd-toast/wd-toast.vue')['default']
|
||||||
WdTabs: typeof import('wot-design-uni/components/wd-tabs/wd-tabs.vue')['default']
|
|
||||||
WdTag: typeof import('wot-design-uni/components/wd-tag/wd-tag.vue')['default']
|
|
||||||
WdTextarea: typeof import('wot-design-uni/components/wd-textarea/wd-textarea.vue')['default']
|
|
||||||
WdToast: typeof import('wot-design-uni/components/wd-toast/wd-toast.vue')['default']
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,9 +92,10 @@
|
|||||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4020420240722002",
|
"@dcloudio/uni-quickapp-webview": "3.0.0-4020420240722002",
|
||||||
"@uni-helper/uni-use": "^0.19.15",
|
"@uni-helper/uni-use": "^0.19.15",
|
||||||
"@vueuse/core": "9.13.0",
|
"@vueuse/core": "9.13.0",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
"pinia": "^2.3.1",
|
"pinia": "^2.3.1",
|
||||||
"vue": "^3.5.22",
|
"vue": "^3.5.22",
|
||||||
"wot-design-uni": "^1.14.0"
|
"@wot-ui/ui": "2.0.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.8.1",
|
"@commitlint/cli": "^19.8.1",
|
||||||
@@ -108,7 +109,7 @@
|
|||||||
"@uni-helper/uni-types": "1.0.0-alpha.6",
|
"@uni-helper/uni-types": "1.0.0-alpha.6",
|
||||||
"@uni-helper/vite-plugin-uni-components": "^0.2.3",
|
"@uni-helper/vite-plugin-uni-components": "^0.2.3",
|
||||||
"@uni-helper/vite-plugin-uni-layouts": "^0.1.11",
|
"@uni-helper/vite-plugin-uni-layouts": "^0.1.11",
|
||||||
"@uni-helper/vite-plugin-uni-pages": "^0.2.29",
|
"@uni-helper/vite-plugin-uni-pages": "^0.3.24",
|
||||||
"@vue/runtime-core": "^3.5.22",
|
"@vue/runtime-core": "^3.5.22",
|
||||||
"commitizen": "^4.3.1",
|
"commitizen": "^4.3.1",
|
||||||
"cz-git": "^1.12.0",
|
"cz-git": "^1.12.0",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { dayjs } from "wot-design-uni";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ConfigProviderThemeVars } from "wot-design-uni";
|
import type { ConfigProviderThemeVars } from "@wot-ui/ui";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主题色选项接口
|
* 主题色选项接口
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ export default {
|
|||||||
<slot />
|
<slot />
|
||||||
<wd-notify />
|
<wd-notify />
|
||||||
<wd-toast />
|
<wd-toast />
|
||||||
<wd-message-box />
|
<wd-dialog />
|
||||||
</wd-config-provider>
|
</wd-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</wd-tabbar>
|
</wd-tabbar>
|
||||||
<wd-notify />
|
<wd-notify />
|
||||||
<wd-toast />
|
<wd-toast />
|
||||||
<wd-message-box />
|
<wd-dialog />
|
||||||
</wd-config-provider>
|
</wd-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
{
|
{
|
||||||
|
"globalStyle": {
|
||||||
|
"navigationBarBackgroundColor": "@navBgColor",
|
||||||
|
"navigationBarTextStyle": "@navTxtStyle",
|
||||||
|
"navigationBarTitleText": "youlai-app",
|
||||||
|
"backgroundColor": "@bgColor",
|
||||||
|
"backgroundTextStyle": "@bgTxtStyle",
|
||||||
|
"backgroundColorTop": "@bgColorTop",
|
||||||
|
"backgroundColorBottom": "@bgColorBottom",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"onReachBottomDistance": 50,
|
||||||
|
"animationType": "pop-in",
|
||||||
|
"animationDuration": 300
|
||||||
|
},
|
||||||
"pages": [
|
"pages": [
|
||||||
|
// GENERATED BY UNI-PAGES, PLATFORM: MP-WEIXIN
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"type": "home",
|
"type": "home",
|
||||||
@@ -198,19 +212,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"subPackages": [],
|
||||||
"navigationBarBackgroundColor": "@navBgColor",
|
|
||||||
"navigationBarTextStyle": "@navTxtStyle",
|
|
||||||
"navigationBarTitleText": "youlai-app",
|
|
||||||
"backgroundColor": "@bgColor",
|
|
||||||
"backgroundTextStyle": "@bgTxtStyle",
|
|
||||||
"backgroundColorTop": "@bgColorTop",
|
|
||||||
"backgroundColorBottom": "@bgColorBottom",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"onReachBottomDistance": 50,
|
|
||||||
"animationType": "pop-in",
|
|
||||||
"animationDuration": 300
|
|
||||||
},
|
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"custom": true,
|
"custom": true,
|
||||||
"customize": true,
|
"customize": true,
|
||||||
@@ -221,6 +223,7 @@
|
|||||||
"backgroundColor": "@tabBgColor",
|
"backgroundColor": "@tabBgColor",
|
||||||
"borderStyle": "@tabBorderStyle",
|
"borderStyle": "@tabBorderStyle",
|
||||||
"list": [
|
"list": [
|
||||||
|
// GENERATED BY UNI-PAGES, PLATFORM: MP-WEIXIN
|
||||||
{
|
{
|
||||||
"pagePath": "pages/index/index"
|
"pagePath": "pages/index/index"
|
||||||
},
|
},
|
||||||
@@ -231,7 +234,5 @@
|
|||||||
"pagePath": "pages/mine/index"
|
"pagePath": "pages/mine/index"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"__esModule": true,
|
|
||||||
"subPackages": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { onReady, onShow } from "@dcloudio/uni-app";
|
import { onReady, onShow } from "@dcloudio/uni-app";
|
||||||
import { dayjs } from "wot-design-uni";
|
import dayjs from "dayjs";
|
||||||
import { useRouter } from "uni-mini-router";
|
import { useRouter } from "uni-mini-router";
|
||||||
import { useUserStore } from "@/store";
|
import { useUserStore } from "@/store";
|
||||||
import { useNavigation } from "@/composables/useNavigation";
|
import { useNavigation } from "@/composables/useNavigation";
|
||||||
|
|||||||
@@ -236,7 +236,7 @@
|
|||||||
</wd-popup>
|
</wd-popup>
|
||||||
|
|
||||||
<!-- 协议确认弹窗 -->
|
<!-- 协议确认弹窗 -->
|
||||||
<wd-message-box selector="policy-box" root-portal>
|
<wd-dialog selector="policy-box" root-portal>
|
||||||
<view class="policy-dialog__content">
|
<view class="policy-dialog__content">
|
||||||
请阅读并同意有来技术
|
请阅读并同意有来技术
|
||||||
<text class="policy-dialog__link" @click.stop="navigateToAgreement('user')">
|
<text class="policy-dialog__link" @click.stop="navigateToAgreement('user')">
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
《隐私政策》
|
《隐私政策》
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</wd-message-box>
|
</wd-dialog>
|
||||||
|
|
||||||
<wd-toast />
|
<wd-toast />
|
||||||
</view>
|
</view>
|
||||||
@@ -261,13 +261,13 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
import { useCountdown } from "@/composables/useCountdown";
|
import { useCountdown } from "@/composables/useCountdown";
|
||||||
import AuthAPI from "@/api/auth";
|
import AuthAPI from "@/api/auth";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const message = useMessage("policy-box");
|
const dialog = useDialog("policy-box");
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
||||||
// 导航栏尺寸
|
// 导航栏尺寸
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import { useCountdown } from "@/composables/useCountdown";
|
import { useCountdown } from "@/composables/useCountdown";
|
||||||
import UserAPI, {
|
import UserAPI, {
|
||||||
PasswordChangeForm,
|
PasswordChangeForm,
|
||||||
@@ -172,7 +172,7 @@ import UserAPI, {
|
|||||||
} from "@/api/user";
|
} from "@/api/user";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
|
|
||||||
const validatorConfirmPassword = (value: string) => {
|
const validatorConfirmPassword = (value: string) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import { useUserStore, useThemeStore } from "@/store";
|
import { useUserStore, useThemeStore } from "@/store";
|
||||||
import { useRouter } from "uni-mini-router";
|
import { useRouter } from "uni-mini-router";
|
||||||
import { useNavbar } from "@/composables/useNavbar";
|
import { useNavbar } from "@/composables/useNavbar";
|
||||||
@@ -224,7 +224,7 @@ import { getAccessToken } from "@/utils/auth";
|
|||||||
import { formatBytes } from "@/utils/format";
|
import { formatBytes } from "@/utils/format";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ import UserAPI, { type UserProfileForm } from "@/api/user";
|
|||||||
import FileAPI, { type FileInfo } from "@/api/file";
|
import FileAPI, { type FileInfo } from "@/api/file";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
||||||
const redirect = ref("/pages/index/index");
|
const redirect = ref("/pages/index/index");
|
||||||
|
|||||||
@@ -35,11 +35,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useUserStore } from "@/store";
|
import { useUserStore } from "@/store";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const isLogin = computed(() => !!userStore.userInfo);
|
const isLogin = computed(() => !!userStore.userInfo);
|
||||||
|
|
||||||
// 主题设置
|
// 主题设置
|
||||||
|
|||||||
@@ -104,13 +104,13 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useTheme } from "@/composables/useTheme";
|
import { useTheme } from "@/composables/useTheme";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
|
|
||||||
// 使用主题组合函数
|
// 使用主题组合函数
|
||||||
const { isDark, themeVars, themeColorOptions, toggleTheme, setThemeColor } = useTheme();
|
const { isDark, themeVars, themeColorOptions, toggleTheme, setThemeColor } = useTheme();
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
|
|
||||||
// 创建响应式的计算属性
|
// 创建响应式的计算属性
|
||||||
const isDarkMode = computed(() => isDark.value);
|
const isDarkMode = computed(() => isDark.value);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchConfigList" />
|
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchConfigList" />
|
||||||
<wd-status-tip v-else-if="total === 0" image="search" tip="暂无数据" />
|
<wd-empty v-else-if="total === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹窗表单 -->
|
<!-- 弹窗表单 -->
|
||||||
@@ -92,14 +92,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import ConfigAPI, { type ConfigPageQuery, ConfigItem, ConfigForm } from "@/api/config";
|
import ConfigAPI, { type ConfigPageQuery, ConfigItem, ConfigForm } from "@/api/config";
|
||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const loadMoreState = ref<LoadMoreState>("loading");
|
const loadMoreState = ref<LoadMoreState>("loading");
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const isSubmitting = ref(false);
|
const isSubmitting = ref(false);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</CustomTree>
|
</CustomTree>
|
||||||
|
|
||||||
<wd-status-tip v-if="deptList.length === 0" image="search" tip="暂无数据" />
|
<wd-empty v-if="deptList.length === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹窗表单 -->
|
<!-- 弹窗表单 -->
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<wd-form ref="formRef" :model="formData" :rules="rules">
|
<wd-form ref="formRef" :model="formData" :rules="rules">
|
||||||
<wd-cell-group border>
|
<wd-cell-group border>
|
||||||
<wd-col-picker
|
<wd-cascader
|
||||||
v-model="parentSelected"
|
v-model="parentSelected"
|
||||||
label="上级部门"
|
label="上级部门"
|
||||||
:columns="parentColumns"
|
:columns="parentColumns"
|
||||||
@@ -86,14 +86,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import DeptAPI, { type DeptQuery, DeptItem, DeptForm } from "@/api/dept";
|
import DeptAPI, { type DeptQuery, DeptItem, DeptForm } from "@/api/dept";
|
||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
import CustomTree from "@/components/custom-tree/index.vue";
|
import CustomTree from "@/components/custom-tree/index.vue";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const isSubmitting = ref(false);
|
const isSubmitting = ref(false);
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchDictTypeList" />
|
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchDictTypeList" />
|
||||||
<wd-status-tip v-else-if="total === 0" image="search" tip="暂无数据" />
|
<wd-empty v-else-if="total === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<wd-popup
|
<wd-popup
|
||||||
@@ -91,15 +91,15 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { useRouter } from "uni-mini-router";
|
import { useRouter } from "uni-mini-router";
|
||||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import DictAPI, { type DictTypeForm, type DictTypePageQuery, type DictTypeItem } from "@/api/dict";
|
import DictAPI, { type DictTypeForm, type DictTypePageQuery, type DictTypeItem } from "@/api/dict";
|
||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const loadMoreState = ref<LoadMoreState>("loading");
|
const loadMoreState = ref<LoadMoreState>("loading");
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const isSubmitting = ref(false);
|
const isSubmitting = ref(false);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchItemList" />
|
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchItemList" />
|
||||||
<wd-status-tip v-else-if="total === 0" image="search" tip="暂无数据" />
|
<wd-empty v-else-if="total === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<wd-popup
|
<wd-popup
|
||||||
@@ -98,14 +98,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import DictAPI, { type DictItemForm, type DictItemPageQuery, type DictDataItem } from "@/api/dict";
|
import DictAPI, { type DictItemForm, type DictItemPageQuery, type DictDataItem } from "@/api/dict";
|
||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
|
|
||||||
const dictCode = ref<string>("");
|
const dictCode = ref<string>("");
|
||||||
const pageTitle = ref<string>("字典数据");
|
const pageTitle = ref<string>("字典数据");
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchLogList" />
|
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchLogList" />
|
||||||
<wd-status-tip v-else-if="total === 0" image="search" tip="暂无数据" />
|
<wd-empty v-else-if="total === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 详情弹窗 -->
|
<!-- 详情弹窗 -->
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||||
import LogAPI, { type LogPageQuery, LogItem } from "@/api/log";
|
import LogAPI, { type LogPageQuery, LogItem } from "@/api/log";
|
||||||
|
|
||||||
const loadMoreState = ref<LoadMoreState>("loading");
|
const loadMoreState = ref<LoadMoreState>("loading");
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</custom-tree>
|
</custom-tree>
|
||||||
|
|
||||||
<wd-status-tip v-if="menuList.length === 0" image="search" tip="暂无数据" />
|
<wd-empty v-if="menuList.length === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹窗表单 -->
|
<!-- 弹窗表单 -->
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<scroll-view scroll-y class="max-h-60vh">
|
<scroll-view scroll-y class="max-h-60vh">
|
||||||
<wd-form ref="formRef" :model="formData" :rules="rules">
|
<wd-form ref="formRef" :model="formData" :rules="rules">
|
||||||
<wd-cell-group border>
|
<wd-cell-group border>
|
||||||
<wd-col-picker
|
<wd-cascader
|
||||||
v-model="parentSelected"
|
v-model="parentSelected"
|
||||||
label="上级菜单"
|
label="上级菜单"
|
||||||
:columns="parentColumns"
|
:columns="parentColumns"
|
||||||
@@ -121,14 +121,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import MenuAPI, { type MenuQuery, MenuItem, MenuForm } from "@/api/menu";
|
import MenuAPI, { type MenuQuery, MenuItem, MenuForm } from "@/api/menu";
|
||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
import CustomTree from "@/components/custom-tree/index.vue";
|
import CustomTree from "@/components/custom-tree/index.vue";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const isSubmitting = ref(false);
|
const isSubmitting = ref(false);
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchNoticeList" />
|
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchNoticeList" />
|
||||||
<wd-status-tip v-else-if="total === 0" image="search" tip="暂无数据" />
|
<wd-empty v-else-if="total === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 详情弹窗 -->
|
<!-- 详情弹窗 -->
|
||||||
@@ -156,9 +156,9 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import NoticeAPI, {
|
import NoticeAPI, {
|
||||||
type NoticePageQuery,
|
type NoticePageQuery,
|
||||||
NoticeItem,
|
NoticeItem,
|
||||||
@@ -168,7 +168,7 @@ import NoticeAPI, {
|
|||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const loadMoreState = ref<LoadMoreState>("loading");
|
const loadMoreState = ref<LoadMoreState>("loading");
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const isSubmitting = ref(false);
|
const isSubmitting = ref(false);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</custom-tree>
|
</custom-tree>
|
||||||
|
|
||||||
<wd-status-tip v-if="menuTree.length === 0" image="search" tip="暂无菜单数据" />
|
<wd-empty v-if="menuTree.length === 0" icon="search" tip="暂无菜单数据" />
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<!-- 固定底部操作栏 -->
|
<!-- 固定底部操作栏 -->
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { useToast } from "wot-design-uni";
|
import { useToast } from "@wot-ui/ui";
|
||||||
import MenuAPI, { type MenuItem } from "@/api/menu";
|
import MenuAPI, { type MenuItem } from "@/api/menu";
|
||||||
import RoleAPI from "@/api/role";
|
import RoleAPI from "@/api/role";
|
||||||
import CustomTree from "@/components/custom-tree/index.vue";
|
import CustomTree from "@/components/custom-tree/index.vue";
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchRoleList" />
|
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchRoleList" />
|
||||||
<wd-status-tip v-else-if="total === 0" image="search" tip="暂无数据" />
|
<wd-empty v-else-if="total === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹窗表单 -->
|
<!-- 弹窗表单 -->
|
||||||
@@ -110,14 +110,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useToast, useMessage } from "wot-design-uni";
|
import { useToast, useDialog } from "@wot-ui/ui";
|
||||||
import RoleAPI, { type RolePageQuery, RoleItem, RoleForm } from "@/api/role";
|
import RoleAPI, { type RolePageQuery, RoleItem, RoleForm } from "@/api/role";
|
||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const loadMoreState = ref<LoadMoreState>("loading");
|
const loadMoreState = ref<LoadMoreState>("loading");
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const isSubmitting = ref(false);
|
const isSubmitting = ref(false);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchUserList" />
|
<wd-loadmore v-if="total > 0" :state="loadMoreState" @reload="fetchUserList" />
|
||||||
<wd-status-tip v-else-if="total === 0" image="search" tip="暂无数据" />
|
<wd-empty v-else-if="total === 0" icon="search" tip="暂无数据" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹窗表单 -->
|
<!-- 弹窗表单 -->
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<wd-input v-model="formData.nickname" label="昵称" required />
|
<wd-input v-model="formData.nickname" label="昵称" required />
|
||||||
<wd-col-picker
|
<wd-cascader
|
||||||
v-model="deptSelected"
|
v-model="deptSelected"
|
||||||
label="部门"
|
label="部门"
|
||||||
:columns="deptColumns"
|
:columns="deptColumns"
|
||||||
@@ -200,16 +200,16 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||||
import { useQueue, useToast, useMessage } from "wot-design-uni";
|
import { useQueue, useToast, useDialog } from "@wot-ui/ui";
|
||||||
import UserAPI, { type UserPageQuery, UserItem, UserForm } from "@/api/user";
|
import UserAPI, { type UserPageQuery, UserItem, UserForm } from "@/api/user";
|
||||||
import RoleAPI from "@/api/role";
|
import RoleAPI from "@/api/role";
|
||||||
import DeptAPI from "@/api/dept";
|
import DeptAPI from "@/api/dept";
|
||||||
import { hasPermission } from "@/utils/permission";
|
import { hasPermission } from "@/utils/permission";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { messageBox } = useMessage();
|
const { messageBox } = useDialog();
|
||||||
const { closeOutside } = useQueue();
|
const { closeOutside } = useQueue();
|
||||||
const loadMoreState = ref<LoadMoreState>("loading");
|
const loadMoreState = ref<LoadMoreState>("loading");
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
|||||||
15
src/types/auto-imports.d.ts
vendored
15
src/types/auto-imports.d.ts
vendored
@@ -6,7 +6,7 @@
|
|||||||
// biome-ignore lint: disable
|
// biome-ignore lint: disable
|
||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const CommonUtil: typeof import('wot-design-uni')['CommonUtil']
|
const CommonUtil: typeof import('@wot-ui/ui')['CommonUtil']
|
||||||
const EffectScope: typeof import('vue')['EffectScope']
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
const PERM_ALL: typeof import('../utils/permission')['PERM_ALL']
|
const PERM_ALL: typeof import('../utils/permission')['PERM_ALL']
|
||||||
const ROLE_ROOT: typeof import('../utils/permission')['ROLE_ROOT']
|
const ROLE_ROOT: typeof import('../utils/permission')['ROLE_ROOT']
|
||||||
@@ -157,6 +157,7 @@ declare global {
|
|||||||
const useCountdown: typeof import('../composables/useCountdown')['useCountdown']
|
const useCountdown: typeof import('../composables/useCountdown')['useCountdown']
|
||||||
const useCssModule: typeof import('vue')['useCssModule']
|
const useCssModule: typeof import('vue')['useCssModule']
|
||||||
const useCssVars: typeof import('vue')['useCssVars']
|
const useCssVars: typeof import('vue')['useCssVars']
|
||||||
|
const useDialog: typeof import('@wot-ui/ui')['useDialog']
|
||||||
const useDownloadFile: typeof import('@uni-helper/uni-use')['useDownloadFile']
|
const useDownloadFile: typeof import('@uni-helper/uni-use')['useDownloadFile']
|
||||||
const useGlobalData: typeof import('@uni-helper/uni-use')['useGlobalData']
|
const useGlobalData: typeof import('@uni-helper/uni-use')['useGlobalData']
|
||||||
const useId: typeof import('vue')['useId']
|
const useId: typeof import('vue')['useId']
|
||||||
@@ -170,7 +171,7 @@ declare global {
|
|||||||
const useNavbar: typeof import('../composables/useNavbar')['useNavbar']
|
const useNavbar: typeof import('../composables/useNavbar')['useNavbar']
|
||||||
const useNavigation: typeof import('../composables/useNavigation')['useNavigation']
|
const useNavigation: typeof import('../composables/useNavigation')['useNavigation']
|
||||||
const useNetwork: typeof import('@uni-helper/uni-use')['useNetwork']
|
const useNetwork: typeof import('@uni-helper/uni-use')['useNetwork']
|
||||||
const useNotify: typeof import('wot-design-uni')['useNotify']
|
const useNotify: typeof import('@wot-ui/ui')['useNotify']
|
||||||
const useOnline: typeof import('@uni-helper/uni-use')['useOnline']
|
const useOnline: typeof import('@uni-helper/uni-use')['useOnline']
|
||||||
const usePage: typeof import('@uni-helper/uni-use')['usePage']
|
const usePage: typeof import('@uni-helper/uni-use')['usePage']
|
||||||
const usePageLayout: typeof import('../composables/useNavbar')['usePageLayout']
|
const usePageLayout: typeof import('../composables/useNavbar')['usePageLayout']
|
||||||
@@ -198,7 +199,7 @@ declare global {
|
|||||||
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||||
const useTheme: typeof import('../composables/useTheme')['useTheme']
|
const useTheme: typeof import('../composables/useTheme')['useTheme']
|
||||||
const useThemeStore: typeof import('../store/modules/theme')['useThemeStore']
|
const useThemeStore: typeof import('../store/modules/theme')['useThemeStore']
|
||||||
const useToast: typeof import('wot-design-uni')['useToast']
|
const useToast: typeof import('@wot-ui/ui')['useToast']
|
||||||
const useUploadFile: typeof import('@uni-helper/uni-use')['useUploadFile']
|
const useUploadFile: typeof import('@uni-helper/uni-use')['useUploadFile']
|
||||||
const useUserStore: typeof import('../store/modules/user')['useUserStore']
|
const useUserStore: typeof import('../store/modules/user')['useUserStore']
|
||||||
const useVisible: typeof import('@uni-helper/uni-use')['useVisible']
|
const useVisible: typeof import('@uni-helper/uni-use')['useVisible']
|
||||||
@@ -226,7 +227,7 @@ import { UnwrapRef } from 'vue'
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
interface GlobalComponents {}
|
interface GlobalComponents {}
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
readonly CommonUtil: UnwrapRef<typeof import('wot-design-uni')['CommonUtil']>
|
readonly CommonUtil: UnwrapRef<typeof import('@wot-ui/ui')['CommonUtil']>
|
||||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
readonly RequestError: UnwrapRef<typeof import('../utils/request')['RequestError']>
|
readonly RequestError: UnwrapRef<typeof import('../utils/request')['RequestError']>
|
||||||
readonly SseConnectionState: UnwrapRef<typeof import('../composables/useSse')['SseConnectionState']>
|
readonly SseConnectionState: UnwrapRef<typeof import('../composables/useSse')['SseConnectionState']>
|
||||||
@@ -346,13 +347,13 @@ declare module 'vue' {
|
|||||||
readonly useCountdown: UnwrapRef<typeof import('../composables/useCountdown')['useCountdown']>
|
readonly useCountdown: UnwrapRef<typeof import('../composables/useCountdown')['useCountdown']>
|
||||||
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
|
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
|
||||||
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
|
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
|
||||||
|
readonly useDialog: UnwrapRef<typeof import('@wot-ui/ui')['useDialog']>
|
||||||
readonly useId: UnwrapRef<typeof import('vue')['useId']>
|
readonly useId: UnwrapRef<typeof import('vue')['useId']>
|
||||||
readonly useLoading: UnwrapRef<typeof import('../composables/useLoading')['useLoading']>
|
readonly useLoading: UnwrapRef<typeof import('../composables/useLoading')['useLoading']>
|
||||||
readonly useMessage: UnwrapRef<typeof import('wot-design-uni')['useMessage']>
|
|
||||||
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
|
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
|
||||||
readonly useNavbar: UnwrapRef<typeof import('../composables/useNavbar')['useNavbar']>
|
readonly useNavbar: UnwrapRef<typeof import('../composables/useNavbar')['useNavbar']>
|
||||||
readonly useNavigation: UnwrapRef<typeof import('../composables/useNavigation')['useNavigation']>
|
readonly useNavigation: UnwrapRef<typeof import('../composables/useNavigation')['useNavigation']>
|
||||||
readonly useNotify: UnwrapRef<typeof import('wot-design-uni')['useNotify']>
|
readonly useNotify: UnwrapRef<typeof import('@wot-ui/ui')['useNotify']>
|
||||||
readonly usePagination: UnwrapRef<typeof import('../composables/useRequest')['usePagination']>
|
readonly usePagination: UnwrapRef<typeof import('../composables/useRequest')['usePagination']>
|
||||||
readonly useRequest: UnwrapRef<typeof import('../composables/useRequest')['useRequest']>
|
readonly useRequest: UnwrapRef<typeof import('../composables/useRequest')['useRequest']>
|
||||||
readonly useRoute: UnwrapRef<typeof import('uni-mini-router')['useRoute']>
|
readonly useRoute: UnwrapRef<typeof import('uni-mini-router')['useRoute']>
|
||||||
@@ -363,7 +364,7 @@ declare module 'vue' {
|
|||||||
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
|
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
|
||||||
readonly useTheme: UnwrapRef<typeof import('../composables/useTheme')['useTheme']>
|
readonly useTheme: UnwrapRef<typeof import('../composables/useTheme')['useTheme']>
|
||||||
readonly useThemeStore: UnwrapRef<typeof import('../store/modules/theme')['useThemeStore']>
|
readonly useThemeStore: UnwrapRef<typeof import('../store/modules/theme')['useThemeStore']>
|
||||||
readonly useToast: UnwrapRef<typeof import('wot-design-uni')['useToast']>
|
readonly useToast: UnwrapRef<typeof import('@wot-ui/ui')['useToast']>
|
||||||
readonly useUserStore: UnwrapRef<typeof import('../store/modules/user')['useUserStore']>
|
readonly useUserStore: UnwrapRef<typeof import('../store/modules/user')['useUserStore']>
|
||||||
readonly user: UnwrapRef<typeof import('../api/user')['default']>
|
readonly user: UnwrapRef<typeof import('../api/user')['default']>
|
||||||
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
||||||
|
|||||||
11
src/types/uni-pages.d.ts
vendored
11
src/types/uni-pages.d.ts
vendored
@@ -3,8 +3,8 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
// Generated by vite-plugin-uni-pages
|
// Generated by vite-plugin-uni-pages
|
||||||
|
|
||||||
interface NavigateToOptions {
|
type _LocationUrl =
|
||||||
url: "/pages/index/index" |
|
"/pages/index/index" |
|
||||||
"/pages/login/index" |
|
"/pages/login/index" |
|
||||||
"/pages/mine/index" |
|
"/pages/mine/index" |
|
||||||
"/pages/webview/index" |
|
"/pages/webview/index" |
|
||||||
@@ -30,6 +30,9 @@ interface NavigateToOptions {
|
|||||||
"/pages/mine/settings/privacy/index" |
|
"/pages/mine/settings/privacy/index" |
|
||||||
"/pages/mine/settings/theme/index" |
|
"/pages/mine/settings/theme/index" |
|
||||||
"/pages/work/dict/item/index";
|
"/pages/work/dict/item/index";
|
||||||
|
|
||||||
|
interface NavigateToOptions {
|
||||||
|
url: _LocationUrl;
|
||||||
}
|
}
|
||||||
interface RedirectToOptions extends NavigateToOptions {}
|
interface RedirectToOptions extends NavigateToOptions {}
|
||||||
|
|
||||||
@@ -45,3 +48,7 @@ declare interface Uni {
|
|||||||
switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
|
switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
|
||||||
reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
|
reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module "virtual:uni-pages" {
|
||||||
|
export type LocationUrl = _LocationUrl;
|
||||||
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
},
|
},
|
||||||
"lib": ["esnext", "dom"],
|
"lib": ["esnext", "dom"],
|
||||||
"types": ["@dcloudio/types", "@uni-helper/uni-types", "wot-design-uni/global"]
|
"types": ["@dcloudio/types", "@uni-helper/uni-types", "@wot-ui/ui/global"]
|
||||||
},
|
},
|
||||||
"vueCompilerOptions": {
|
"vueCompilerOptions": {
|
||||||
// 调整 Volar(Vue 语言服务工具)解析行为,用于为 uni-app 组件提供 TypeScript 类型
|
// 调整 Volar(Vue 语言服务工具)解析行为,用于为 uni-app 组件提供 TypeScript 类型
|
||||||
|
|||||||
@@ -8,7 +8,31 @@ import { readFileSync } from "node:fs";
|
|||||||
import { resolve } from "node:path";
|
import { resolve } from "node:path";
|
||||||
|
|
||||||
import Components from "@uni-helper/vite-plugin-uni-components";
|
import Components from "@uni-helper/vite-plugin-uni-components";
|
||||||
import { WotResolver } from "@uni-helper/vite-plugin-uni-components/resolvers";
|
import type { ComponentResolver } from "@uni-helper/vite-plugin-uni-components";
|
||||||
|
import { kebabCase } from "@uni-helper/vite-plugin-uni-components";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义 Wot UI v2 组件解析器
|
||||||
|
*
|
||||||
|
* 由于 @wot-ui/ui v2 的包名和路径发生了变化,需要自定义 resolver
|
||||||
|
* 官方迁移文档: https://wot-ui.cn/guide/migration-v2.html#vite-插件自动导入
|
||||||
|
*
|
||||||
|
* @returns ComponentResolver
|
||||||
|
*/
|
||||||
|
function WotUIResolver(): ComponentResolver {
|
||||||
|
return {
|
||||||
|
type: "component",
|
||||||
|
resolve: (name: string) => {
|
||||||
|
if (name.match(/^Wd[A-Z]/)) {
|
||||||
|
const compName = kebabCase(name);
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
from: `@wot-ui/ui/components/${compName}/${compName}.vue`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export default defineConfig(async ({ mode }: ConfigEnv): Promise<UserConfig> => {
|
export default defineConfig(async ({ mode }: ConfigEnv): Promise<UserConfig> => {
|
||||||
const UnoCss = await import("unocss/vite").then((i) => i.default);
|
const UnoCss = await import("unocss/vite").then((i) => i.default);
|
||||||
@@ -47,7 +71,7 @@ export default defineConfig(async ({ mode }: ConfigEnv): Promise<UserConfig> =>
|
|||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
include: ["wot-design-uni"],
|
include: ["@wot-ui/ui"],
|
||||||
exclude: ["vue-demi"],
|
exclude: ["vue-demi"],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
@@ -64,7 +88,7 @@ export default defineConfig(async ({ mode }: ConfigEnv): Promise<UserConfig> =>
|
|||||||
exclude: ["**/components/**/*.*"],
|
exclude: ["**/components/**/*.*"],
|
||||||
}),
|
}),
|
||||||
Components({
|
Components({
|
||||||
resolvers: [WotResolver()],
|
resolvers: [WotUIResolver()],
|
||||||
dirs: ["src/components"],
|
dirs: ["src/components"],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -78,8 +102,8 @@ export default defineConfig(async ({ mode }: ConfigEnv): Promise<UserConfig> =>
|
|||||||
imports: ["createRouter", "useRouter", "useRoute"],
|
imports: ["createRouter", "useRouter", "useRoute"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
from: "wot-design-uni",
|
from: "@wot-ui/ui",
|
||||||
imports: ["useToast", "useMessage", "useNotify", "CommonUtil"],
|
imports: ["useToast", "useDialog", "useNotify", "CommonUtil"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
dts: "src/types/auto-imports.d.ts", // 自动生成的类型声明文件
|
dts: "src/types/auto-imports.d.ts", // 自动生成的类型声明文件
|
||||||
|
|||||||
Reference in New Issue
Block a user