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:
1 parent
1bfe7964b3
commit
e5cd415f66
29 files changed
+201
-165
No files matched your search
@@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { dayjs } from "wot-design-uni";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const props = defineProps({
|
||||
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 />
|
||||
<wd-notify />
|
||||
<wd-toast />
|
||||
<wd-message-box />
|
||||
<wd-dialog />
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
@@ -19,7 +19,7 @@
|
||||
</wd-tabbar>
|
||||
<wd-notify />
|
||||
<wd-toast />
|
||||
<wd-message-box />
|
||||
<wd-dialog />
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
|
||||
+17
-16
@@ -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": [
|
||||
// GENERATED BY UNI-PAGES, PLATFORM: MP-WEIXIN
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"type": "home",
|
||||
@@ -198,19 +212,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"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
|
||||
},
|
||||
"subPackages": [],
|
||||
"tabBar": {
|
||||
"custom": true,
|
||||
"customize": true,
|
||||
@@ -221,6 +223,7 @@
|
||||
"backgroundColor": "@tabBgColor",
|
||||
"borderStyle": "@tabBorderStyle",
|
||||
"list": [
|
||||
// GENERATED BY UNI-PAGES, PLATFORM: MP-WEIXIN
|
||||
{
|
||||
"pagePath": "pages/index/index"
|
||||
},
|
||||
@@ -231,7 +234,5 @@
|
||||
"pagePath": "pages/mine/index"
|
||||
}
|
||||
]
|
||||
},
|
||||
"__esModule": true,
|
||||
"subPackages": []
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from "vue";
|
||||
import { onReady, onShow } from "@dcloudio/uni-app";
|
||||
import { dayjs } from "wot-design-uni";
|
||||
import dayjs from "dayjs";
|
||||
import { useRouter } from "uni-mini-router";
|
||||
import { useUserStore } from "@/store";
|
||||
import { useNavigation } from "@/composables/useNavigation";
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
</wd-popup>
|
||||
|
||||
<!-- 协议确认弹窗 -->
|
||||
<wd-message-box selector="policy-box" root-portal>
|
||||
<wd-dialog selector="policy-box" root-portal>
|
||||
<view class="policy-dialog__content">
|
||||
请阅读并同意有来技术
|
||||
<text class="policy-dialog__link" @click.stop="navigateToAgreement('user')">
|
||||
@@ -246,7 +246,7 @@
|
||||
《隐私政策》
|
||||
</text>
|
||||
</view>
|
||||
</wd-message-box>
|
||||
</wd-dialog>
|
||||
|
||||
<wd-toast />
|
||||
</view>
|
||||
@@ -261,13 +261,13 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
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 { useCountdown } from "@/composables/useCountdown";
|
||||
import AuthAPI from "@/api/auth";
|
||||
|
||||
const toast = useToast();
|
||||
const message = useMessage("policy-box");
|
||||
const dialog = useDialog("policy-box");
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 导航栏尺寸
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
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 UserAPI, {
|
||||
PasswordChangeForm,
|
||||
@@ -172,7 +172,7 @@ import UserAPI, {
|
||||
} from "@/api/user";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
|
||||
const validatorConfirmPassword = (value: string) => {
|
||||
if (!value) {
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
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 { useRouter } from "uni-mini-router";
|
||||
import { useNavbar } from "@/composables/useNavbar";
|
||||
@@ -224,7 +224,7 @@ import { getAccessToken } from "@/utils/auth";
|
||||
import { formatBytes } from "@/utils/format";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
@@ -126,7 +126,7 @@ import UserAPI, { type UserProfileForm } from "@/api/user";
|
||||
import FileAPI, { type FileInfo } from "@/api/file";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const redirect = ref("/pages/index/index");
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { useUserStore } from "@/store";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const isLogin = computed(() => !!userStore.userInfo);
|
||||
|
||||
// 主题设置
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
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 toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
|
||||
// 创建响应式的计算属性
|
||||
const isDarkMode = computed(() => isDark.value);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</wd-card>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- 弹窗表单 -->
|
||||
@@ -92,14 +92,14 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
import ConfigAPI, { type ConfigPageQuery, ConfigItem, ConfigForm } from "@/api/config";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const loadMoreState = ref<LoadMoreState>("loading");
|
||||
const formRef = ref();
|
||||
const isSubmitting = ref(false);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</template>
|
||||
</CustomTree>
|
||||
|
||||
<wd-status-tip v-if="deptList.length === 0" image="search" tip="暂无数据" />
|
||||
<wd-empty v-if="deptList.length === 0" icon="search" tip="暂无数据" />
|
||||
</view>
|
||||
|
||||
<!-- 弹窗表单 -->
|
||||
@@ -45,7 +45,7 @@
|
||||
</view>
|
||||
<wd-form ref="formRef" :model="formData" :rules="rules">
|
||||
<wd-cell-group border>
|
||||
<wd-col-picker
|
||||
<wd-cascader
|
||||
v-model="parentSelected"
|
||||
label="上级部门"
|
||||
:columns="parentColumns"
|
||||
@@ -86,14 +86,14 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
import DeptAPI, { type DeptQuery, DeptItem, DeptForm } from "@/api/dept";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
import CustomTree from "@/components/custom-tree/index.vue";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const formRef = ref();
|
||||
const isSubmitting = ref(false);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</wd-card>
|
||||
|
||||
<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>
|
||||
|
||||
<wd-popup
|
||||
@@ -91,15 +91,15 @@
|
||||
<script lang="ts" setup>
|
||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { useRouter } from "uni-mini-router";
|
||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
import DictAPI, { type DictTypeForm, type DictTypePageQuery, type DictTypeItem } from "@/api/dict";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
|
||||
const router = useRouter();
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const loadMoreState = ref<LoadMoreState>("loading");
|
||||
const formRef = ref();
|
||||
const isSubmitting = ref(false);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</wd-card>
|
||||
|
||||
<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>
|
||||
|
||||
<wd-popup
|
||||
@@ -98,14 +98,14 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
import DictAPI, { type DictItemForm, type DictItemPageQuery, type DictDataItem } from "@/api/dict";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
|
||||
const dictCode = ref<string>("");
|
||||
const pageTitle = ref<string>("字典数据");
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</wd-card>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- 详情弹窗 -->
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
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";
|
||||
|
||||
const loadMoreState = ref<LoadMoreState>("loading");
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</template>
|
||||
</custom-tree>
|
||||
|
||||
<wd-status-tip v-if="menuList.length === 0" image="search" tip="暂无数据" />
|
||||
<wd-empty v-if="menuList.length === 0" icon="search" tip="暂无数据" />
|
||||
</view>
|
||||
|
||||
<!-- 弹窗表单 -->
|
||||
@@ -54,7 +54,7 @@
|
||||
<scroll-view scroll-y class="max-h-60vh">
|
||||
<wd-form ref="formRef" :model="formData" :rules="rules">
|
||||
<wd-cell-group border>
|
||||
<wd-col-picker
|
||||
<wd-cascader
|
||||
v-model="parentSelected"
|
||||
label="上级菜单"
|
||||
:columns="parentColumns"
|
||||
@@ -121,14 +121,14 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
import MenuAPI, { type MenuQuery, MenuItem, MenuForm } from "@/api/menu";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
import CustomTree from "@/components/custom-tree/index.vue";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const formRef = ref();
|
||||
const isSubmitting = ref(false);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</wd-card>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- 详情弹窗 -->
|
||||
@@ -156,9 +156,9 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
import NoticeAPI, {
|
||||
type NoticePageQuery,
|
||||
NoticeItem,
|
||||
@@ -168,7 +168,7 @@ import NoticeAPI, {
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const loadMoreState = ref<LoadMoreState>("loading");
|
||||
const formRef = ref();
|
||||
const isSubmitting = ref(false);
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</template>
|
||||
</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>
|
||||
|
||||
<!-- 固定底部操作栏 -->
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
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 RoleAPI from "@/api/role";
|
||||
import CustomTree from "@/components/custom-tree/index.vue";
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</wd-card>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- 弹窗表单 -->
|
||||
@@ -110,14 +110,14 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useToast, useMessage } from "wot-design-uni";
|
||||
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useToast, useDialog } from "@wot-ui/ui";
|
||||
import RoleAPI, { type RolePageQuery, RoleItem, RoleForm } from "@/api/role";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const loadMoreState = ref<LoadMoreState>("loading");
|
||||
const formRef = ref();
|
||||
const isSubmitting = ref(false);
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
</wd-card>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- 弹窗表单 -->
|
||||
@@ -125,7 +125,7 @@
|
||||
required
|
||||
/>
|
||||
<wd-input v-model="formData.nickname" label="昵称" required />
|
||||
<wd-col-picker
|
||||
<wd-cascader
|
||||
v-model="deptSelected"
|
||||
label="部门"
|
||||
:columns="deptColumns"
|
||||
@@ -200,16 +200,16 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
||||
import { FormRules } from "wot-design-uni/components/wd-form/types";
|
||||
import { useQueue, useToast, useMessage } from "wot-design-uni";
|
||||
import { LoadMoreState } from "@wot-ui/ui/components/wd-loadmore/types";
|
||||
import { FormRules } from "@wot-ui/ui/components/wd-form/types";
|
||||
import { useQueue, useToast, useDialog } from "@wot-ui/ui";
|
||||
import UserAPI, { type UserPageQuery, UserItem, UserForm } from "@/api/user";
|
||||
import RoleAPI from "@/api/role";
|
||||
import DeptAPI from "@/api/dept";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
|
||||
const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const { messageBox } = useDialog();
|
||||
const { closeOutside } = useQueue();
|
||||
const loadMoreState = ref<LoadMoreState>("loading");
|
||||
const formRef = ref();
|
||||
|
||||
Vendored
+8
-7
@@ -6,7 +6,7 @@
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
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 PERM_ALL: typeof import('../utils/permission')['PERM_ALL']
|
||||
const ROLE_ROOT: typeof import('../utils/permission')['ROLE_ROOT']
|
||||
@@ -157,6 +157,7 @@ declare global {
|
||||
const useCountdown: typeof import('../composables/useCountdown')['useCountdown']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useDialog: typeof import('@wot-ui/ui')['useDialog']
|
||||
const useDownloadFile: typeof import('@uni-helper/uni-use')['useDownloadFile']
|
||||
const useGlobalData: typeof import('@uni-helper/uni-use')['useGlobalData']
|
||||
const useId: typeof import('vue')['useId']
|
||||
@@ -170,7 +171,7 @@ declare global {
|
||||
const useNavbar: typeof import('../composables/useNavbar')['useNavbar']
|
||||
const useNavigation: typeof import('../composables/useNavigation')['useNavigation']
|
||||
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 usePage: typeof import('@uni-helper/uni-use')['usePage']
|
||||
const usePageLayout: typeof import('../composables/useNavbar')['usePageLayout']
|
||||
@@ -198,7 +199,7 @@ declare global {
|
||||
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||
const useTheme: typeof import('../composables/useTheme')['useTheme']
|
||||
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 useUserStore: typeof import('../store/modules/user')['useUserStore']
|
||||
const useVisible: typeof import('@uni-helper/uni-use')['useVisible']
|
||||
@@ -226,7 +227,7 @@ import { UnwrapRef } from 'vue'
|
||||
declare module 'vue' {
|
||||
interface GlobalComponents {}
|
||||
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 RequestError: UnwrapRef<typeof import('../utils/request')['RequestError']>
|
||||
readonly SseConnectionState: UnwrapRef<typeof import('../composables/useSse')['SseConnectionState']>
|
||||
@@ -346,13 +347,13 @@ declare module 'vue' {
|
||||
readonly useCountdown: UnwrapRef<typeof import('../composables/useCountdown')['useCountdown']>
|
||||
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
|
||||
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
|
||||
readonly useDialog: UnwrapRef<typeof import('@wot-ui/ui')['useDialog']>
|
||||
readonly useId: UnwrapRef<typeof import('vue')['useId']>
|
||||
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 useNavbar: UnwrapRef<typeof import('../composables/useNavbar')['useNavbar']>
|
||||
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 useRequest: UnwrapRef<typeof import('../composables/useRequest')['useRequest']>
|
||||
readonly useRoute: UnwrapRef<typeof import('uni-mini-router')['useRoute']>
|
||||
@@ -363,7 +364,7 @@ declare module 'vue' {
|
||||
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
|
||||
readonly useTheme: UnwrapRef<typeof import('../composables/useTheme')['useTheme']>
|
||||
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 user: UnwrapRef<typeof import('../api/user')['default']>
|
||||
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
||||
|
||||
Vendored
+33
-26
@@ -3,33 +3,36 @@
|
||||
// @ts-nocheck
|
||||
// Generated by vite-plugin-uni-pages
|
||||
|
||||
type _LocationUrl =
|
||||
"/pages/index/index" |
|
||||
"/pages/login/index" |
|
||||
"/pages/mine/index" |
|
||||
"/pages/webview/index" |
|
||||
"/pages/work/index" |
|
||||
"/pages/mine/about/index" |
|
||||
"/pages/mine/account/index" |
|
||||
"/pages/mine/official/index" |
|
||||
"/pages/mine/profile/complete-profile" |
|
||||
"/pages/mine/profile/index" |
|
||||
"/pages/mine/settings/index" |
|
||||
"/pages/work/config/index" |
|
||||
"/pages/work/dept/index" |
|
||||
"/pages/work/dict/index" |
|
||||
"/pages/work/log/index" |
|
||||
"/pages/work/menu/index" |
|
||||
"/pages/work/monitor/index" |
|
||||
"/pages/work/notice/index" |
|
||||
"/pages/work/role/assign-perm" |
|
||||
"/pages/work/role/index" |
|
||||
"/pages/work/user/index" |
|
||||
"/pages/mine/settings/agreement/index" |
|
||||
"/pages/mine/settings/network/index" |
|
||||
"/pages/mine/settings/privacy/index" |
|
||||
"/pages/mine/settings/theme/index" |
|
||||
"/pages/work/dict/item/index";
|
||||
|
||||
interface NavigateToOptions {
|
||||
url: "/pages/index/index" |
|
||||
"/pages/login/index" |
|
||||
"/pages/mine/index" |
|
||||
"/pages/webview/index" |
|
||||
"/pages/work/index" |
|
||||
"/pages/mine/about/index" |
|
||||
"/pages/mine/account/index" |
|
||||
"/pages/mine/official/index" |
|
||||
"/pages/mine/profile/complete-profile" |
|
||||
"/pages/mine/profile/index" |
|
||||
"/pages/mine/settings/index" |
|
||||
"/pages/work/config/index" |
|
||||
"/pages/work/dept/index" |
|
||||
"/pages/work/dict/index" |
|
||||
"/pages/work/log/index" |
|
||||
"/pages/work/menu/index" |
|
||||
"/pages/work/monitor/index" |
|
||||
"/pages/work/notice/index" |
|
||||
"/pages/work/role/assign-perm" |
|
||||
"/pages/work/role/index" |
|
||||
"/pages/work/user/index" |
|
||||
"/pages/mine/settings/agreement/index" |
|
||||
"/pages/mine/settings/network/index" |
|
||||
"/pages/mine/settings/privacy/index" |
|
||||
"/pages/mine/settings/theme/index" |
|
||||
"/pages/work/dict/item/index";
|
||||
url: _LocationUrl;
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
@@ -45,3 +48,7 @@ declare interface Uni {
|
||||
switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
|
||||
reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
|
||||
}
|
||||
|
||||
declare module "virtual:uni-pages" {
|
||||
export type LocationUrl = _LocationUrl;
|
||||
}
|
||||
Reference in new issue
Block a user