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