fix: 修复一些typescript编译报错问题
This commit is contained in:
@@ -40,7 +40,7 @@ import {RouteRecordRaw} from "vue-router";
|
|||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
type: Object as PropType<RouteRecordRaw>,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
isNest: {
|
isNest: {
|
||||||
@@ -55,7 +55,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const onlyOneChild = ref();
|
const onlyOneChild = ref();
|
||||||
|
|
||||||
function hasOneShowingChild(children = [] as any, parent: RouteRecordRaw) {
|
function hasOneShowingChild(children = [] as any, parent: any) {
|
||||||
if (!children) {
|
if (!children) {
|
||||||
children = [];
|
children = [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ const {ctx} = getCurrentInstance() as any
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const visitedViews = computed(() => tagsViewStoreHook().visitedViews)
|
const visitedViews = computed<any>(() => tagsViewStoreHook().visitedViews)
|
||||||
const routes = computed(() => usePermissionStoreHook().routes)
|
const routes = computed<any>(() => usePermissionStoreHook().routes)
|
||||||
|
|
||||||
const affixTags = ref([]);
|
const affixTags = ref([]);
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
|
|||||||
@@ -172,7 +172,8 @@ const state = reactive({
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderSn: undefined
|
orderSn: undefined,
|
||||||
|
status:undefined
|
||||||
},
|
},
|
||||||
pageList: [],
|
pageList: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -223,7 +224,8 @@ function resetQuery() {
|
|||||||
state.queryParams = {
|
state.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderSn: undefined
|
orderSn: undefined,
|
||||||
|
status: undefined
|
||||||
}
|
}
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
circle
|
circle
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
@click.prevent="handleAdd(index)"
|
@click.prevent="handleAdd()"
|
||||||
style="margin-left: 15px"
|
style="margin-left: 15px"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:prop="'attrList[' + scope.$index + '].name'"
|
:prop="'attrList[' + scope.$index + '].name'"
|
||||||
:rules="rules.attribute.name"
|
:rules="rules.name"
|
||||||
>
|
>
|
||||||
<el-input v-model="scope.row.name"/>
|
<el-input v-model="scope.row.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:prop="'attrList[' + scope.$index + '].value'"
|
:prop="'attrList[' + scope.$index + '].value'"
|
||||||
:rules="rules.attribute.value"
|
:rules="rules.value"
|
||||||
>
|
>
|
||||||
<el-input v-model="scope.row.value"/>
|
<el-input v-model="scope.row.value"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -115,10 +115,12 @@ watch(categoryId, (newVal, oldVal) => {
|
|||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
rules: {
|
rules: {
|
||||||
attribute: {
|
name: [
|
||||||
name: [{required: true, message: '请填写属性名称', trigger: 'blur'}],
|
{required: true, message: '请填写属性名称', trigger: 'blur'}
|
||||||
value: [{required: true, message: '请填写属性值', trigger: 'blur'}]
|
],
|
||||||
}
|
value: [
|
||||||
|
{required: true, message: '请填写属性值', trigger: 'blur'}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
brandOptions: [],
|
brandOptions: [] as Array<any>,
|
||||||
// 商品图册
|
// 商品图册
|
||||||
pictures: [] as Array<any>,
|
pictures: [] as Array<any>,
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
Reference in New Issue
Block a user