fix: 修复语法错误并添加wot-design组件类型声明

修复index.vue中的模板语法错误和条件表达式语法错误
清理表单校验规则中的多余分号
添加wot-design-uni组件库的类型声明
This commit is contained in:
zhangtao
2025-09-25 23:14:57 +08:00
parent 69b58baee3
commit 8f5316df91
3 changed files with 38 additions and 4 deletions
+34
View File
@@ -17,5 +17,39 @@ 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']
WdBadge: typeof import('wot-design-uni/components/wd-badge/wd-badge.vue')['default']
WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
WdCard: typeof import('wot-design-uni/components/wd-card/wd-card.vue')['default']
WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default']
WdCellGroup: typeof import('wot-design-uni/components/wd-cell-group/wd-cell-group.vue')['default']
WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default']
WdCollapse: typeof import('wot-design-uni/components/wd-collapse/wd-collapse.vue')['default']
WdCollapseItem: typeof import('wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue')['default']
WdConfigProvider: typeof import('wot-design-uni/components/wd-config-provider/wd-config-provider.vue')['default']
WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default']
WdForm: typeof import('wot-design-uni/components/wd-form/wd-form.vue')['default']
WdGrid: typeof import('wot-design-uni/components/wd-grid/wd-grid.vue')['default']
WdGridItem: typeof import('wot-design-uni/components/wd-grid-item/wd-grid-item.vue')['default']
WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default']
WdImg: typeof import('wot-design-uni/components/wd-img/wd-img.vue')['default']
WdImgCropper: typeof import('wot-design-uni/components/wd-img-cropper/wd-img-cropper.vue')['default']
WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default']
WdLoading: typeof import('wot-design-uni/components/wd-loading/wd-loading.vue')['default']
WdMessageBox: typeof import('wot-design-uni/components/wd-message-box/wd-message-box.vue')['default']
WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default']
WdNotify: typeof import('wot-design-uni/components/wd-notify/wd-notify.vue')['default']
WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
WdProgress: typeof import('wot-design-uni/components/wd-progress/wd-progress.vue')['default']
WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']
WdSwiper: typeof import('wot-design-uni/components/wd-swiper/wd-swiper.vue')['default']
WdSwitch: typeof import('wot-design-uni/components/wd-switch/wd-switch.vue')['default']
WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default']
WdTabbarItem: typeof import('wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue')['default']
WdTag: typeof import('wot-design-uni/components/wd-tag/wd-tag.vue')['default']
WdText: typeof import('wot-design-uni/components/wd-text/wd-text.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']
WdUpload: typeof import('wot-design-uni/components/wd-upload/wd-upload.vue')['default']
} }
} }
+1 -1
View File
@@ -1,5 +1,5 @@
<template> <template>
<view class="app-container <view class="app-container">
<scroll-view class=" content-scroll" scroll-y :scroll-top="scrollTop" @scroll="handleScroll"> <scroll-view class=" content-scroll" scroll-y :scroll-top="scrollTop" @scroll="handleScroll">
<view class="content-wrapper"> <view class="content-wrapper">
<!-- 技术支持卡片 --> <!-- 技术支持卡片 -->
+3 -3
View File
@@ -29,7 +29,7 @@
</template> </template>
<template #value> <template #value>
<text class="theme-text-secondary"> <text class="theme-text-secondary">
{{ userProfile.gender === "0" ? "男" : userProfile.gender === "1"; ?"女" : "未知" }} {{ userProfile.gender === "0" ? "男" : userProfile.gender === "1" ?"女" : "未知" }}
</text> </text>
</template> </template>
</wd-cell> </wd-cell>
@@ -208,8 +208,8 @@ function handleAvatarConfirm(event: any) {
// 本页面中所有的校验规则 // 本页面中所有的校验规则
const rules: FormRules = { const rules: FormRules = {
name: [{; required: true,; message: "请填写昵称" }], ; name: [{ required: true, message: "请填写昵称" }],
gender: [{; required: true,; message: "请选择性别" }], gender: [{ required: true, message: "请选择性别" }],
}; };
const dialog = reactive({ const dialog = reactive({