fix: 修复typescript一些编译报错

This commit is contained in:
郝先瑞
2022-01-21 00:26:24 +08:00
parent 9e15f53869
commit bcade4177e
11 changed files with 36 additions and 29 deletions

View File

@@ -155,7 +155,7 @@ const state = reactive({
queryParams: {
pageNum: 1,
pageSize: 10,
title: undefined
name: undefined
},
pageList: [],
total: 0,

View File

@@ -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)

View File

@@ -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