From bcade4177e068e9cb3feb1e638c4cfff01cf0517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Fri, 21 Jan 2022 00:26:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtypescript=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Upload/SingleUpload.vue | 16 ++++++++-------- src/views/oms/order/index.vue | 7 +++---- src/views/pms/brand/index.vue | 2 +- src/views/pms/category/components/Category.vue | 6 +++--- src/views/pms/goods/components/GoodsCategory.vue | 3 +-- src/views/sms/advert/index.vue | 4 ++-- src/views/system/dept/index.vue | 2 +- src/views/system/dict/components/DictItem.vue | 8 ++++++-- src/views/system/menu/components/Menu.vue | 6 ++++-- src/views/system/menu/components/Perm.vue | 9 ++++++--- src/views/system/user/index.vue | 2 +- 11 files changed, 36 insertions(+), 29 deletions(-) diff --git a/src/components/Upload/SingleUpload.vue b/src/components/Upload/SingleUpload.vue index ff66f0e6..7fb3c29c 100644 --- a/src/components/Upload/SingleUpload.vue +++ b/src/components/Upload/SingleUpload.vue @@ -11,16 +11,16 @@ :limit="1" :http-request="uploadImage" > - + @@ -53,7 +53,7 @@ const state = reactive({ previewDialogVisible: false, }) -const imgUrl = computed({ +const imgURL = computed({ get() { return props.modelValue }, @@ -84,8 +84,8 @@ function handleBeforeUpload(file: any) { function uploadImage(params: any) { const file = params.file uploadFile(file).then(response => { - const imgUrl = response.data - emit('update:modelValue', imgUrl) + const imgURL = response.data + emit('update:modelValue', imgURL) }) } @@ -93,8 +93,8 @@ function handleExceed(file: any) { ElMessage.warning('最多只能上传' + props.maxCount) } -function handleRemove(imgUrl: string) { - deleteFile(imgUrl) +function handleRemove(imgURL: string) { + deleteFile(imgURL) emit('update:modelValue', '') } diff --git a/src/views/oms/order/index.vue b/src/views/oms/order/index.vue index c71f5df8..a0ea690d 100644 --- a/src/views/oms/order/index.vue +++ b/src/views/oms/order/index.vue @@ -64,7 +64,7 @@ - + @@ -197,8 +197,7 @@ const state = reactive({ skuPrice : undefined, couponPrice: undefined, freightPrice: undefined, - orderPrice : undefined, - couponPrice: undefined, + orderPrice : undefined }, member: {}, orderItems: [] @@ -208,7 +207,7 @@ const state = reactive({ payTypeMap }) -const {loading, single, multiple, queryParams, pageList, total, dialog, orderDetail} = toRefs(state) +const {loading, single, multiple, queryParams, pageList, total, dialog,dateRange, orderDetail} = toRefs(state) function handleQuery() { state.loading = true diff --git a/src/views/pms/brand/index.vue b/src/views/pms/brand/index.vue index 27adf25a..4b8911a3 100644 --- a/src/views/pms/brand/index.vue +++ b/src/views/pms/brand/index.vue @@ -155,7 +155,7 @@ const state = reactive({ queryParams: { pageNum: 1, pageSize: 10, - title: undefined + name: undefined }, pageList: [], total: 0, diff --git a/src/views/pms/category/components/Category.vue b/src/views/pms/category/components/Category.vue index 47bd9e30..7d0188b7 100644 --- a/src/views/pms/category/components/Category.vue +++ b/src/views/pms/category/components/Category.vue @@ -6,7 +6,7 @@ v-loading="loading" ref="categoryTreeRef" :data="categoryOptions" - :props="{ label: 'name', children: 'children' }" + :props="{ label: 'name', children: 'children',disabled:'' }" node-key="id" :expand-on-click-node="false" default-expand-all @@ -145,8 +145,8 @@ const state = reactive({ title: '', visible: false }, - parent: {}, - current: {} + parent: {} as any, + current: {} as any }) const {loading, categoryOptions, formData, rules, dialog, parent} = toRefs(state) diff --git a/src/views/pms/goods/components/GoodsCategory.vue b/src/views/pms/goods/components/GoodsCategory.vue index 6eb427e2..7ea1b0c2 100644 --- a/src/views/pms/goods/components/GoodsCategory.vue +++ b/src/views/pms/goods/components/GoodsCategory.vue @@ -60,11 +60,10 @@ const categoryRef = ref(ElCascaderPanel) function handleCategoryChange() { const checkNode = categoryRef.value.getCheckedNodes()[0] state.pathLabels = checkNode.pathLabels // 商品分类选择层级提示 - state.categoryId = checkNode.value + props.modelValue.categoryId = checkNode.value } function handleNext() { - console.log('商品属性',props.modelValue.categoryId) if (!props.modelValue.categoryId) { ElMessage.warning('请选择商品分类') return false diff --git a/src/views/sms/advert/index.vue b/src/views/sms/advert/index.vue index 28abd087..a849c3aa 100644 --- a/src/views/sms/advert/index.vue +++ b/src/views/sms/advert/index.vue @@ -14,8 +14,8 @@ diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index e19f1721..f77670fc 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -185,7 +185,7 @@ const state = reactive({ // 表格树数据 deptList: [], // 部门树选项 - deptOptions: [], + deptOptions: [] as Array, // 弹窗属性 dialog: { title: '', diff --git a/src/views/system/dict/components/DictItem.vue b/src/views/system/dict/components/DictItem.vue index 06846389..e20dc720 100644 --- a/src/views/system/dict/components/DictItem.vue +++ b/src/views/system/dict/components/DictItem.vue @@ -168,7 +168,9 @@ const state = reactive({ name: undefined, code: undefined, status: undefined, - remark: undefined + remark: undefined, + sort:undefined, + value:undefined }, rules: { name: [ @@ -263,7 +265,9 @@ function resetForm() { name: undefined, code: undefined, status: undefined, - remark: undefined + remark: undefined, + sort:undefined, + value:undefined } } diff --git a/src/views/system/menu/components/Menu.vue b/src/views/system/menu/components/Menu.vue index b203f1af..7272f7cf 100644 --- a/src/views/system/menu/components/Menu.vue +++ b/src/views/system/menu/components/Menu.vue @@ -206,7 +206,8 @@ const state = reactive({ icon: '', sort: 1, component: 'Layout', - path: undefined + path: undefined, + redirect:'' }, rules: { parentId: [ @@ -356,7 +357,8 @@ function resetForm() { icon: '', sort: 1, component: 'Layout', - path: undefined + path: undefined, + redirect:'' } } diff --git a/src/views/system/menu/components/Perm.vue b/src/views/system/menu/components/Perm.vue index 04636e02..f82a1a94 100644 --- a/src/views/system/menu/components/Perm.vue +++ b/src/views/system/menu/components/Perm.vue @@ -8,7 +8,7 @@ :inline="true" > - 新增 + 新增 删除 @@ -137,7 +137,7 @@