feat[Design]: 调整代码类型
This commit is contained in:
2
components.d.ts
vendored
2
components.d.ts
vendored
@@ -38,8 +38,6 @@ declare module 'vue' {
|
||||
VanRow: typeof import('vant/es')['Row']
|
||||
VanStepper: typeof import('vant/es')['Stepper']
|
||||
VanSwitch: typeof import('vant/es')['Switch']
|
||||
VanTab: typeof import('vant/es')['Tab']
|
||||
VanTabs: typeof import('vant/es')['Tabs']
|
||||
YLCascader: typeof import('./src/components/YLCascader.vue')['default']
|
||||
YLInput: typeof import('./src/components/YLInput.vue')['default']
|
||||
YLPicker: typeof import('./src/components/YLPicker.vue')['default']
|
||||
|
||||
@@ -10,10 +10,19 @@ interface QuestionPage {
|
||||
|
||||
interface QuestionsInfo {
|
||||
survey: {
|
||||
title: string;
|
||||
introduction: string;
|
||||
ip_number: number;
|
||||
is_ip_number: number;
|
||||
is_browser_number: number;
|
||||
browser_number: number;
|
||||
publish_number: number;
|
||||
is_time: number;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
last_question_index: number;
|
||||
is_one_page_one_question: number;
|
||||
is_publish_number: number;
|
||||
};
|
||||
logics: any[]; // 根据实际需求调整类型
|
||||
questions: QuestionPage[]; // 明确类型
|
||||
@@ -24,11 +33,19 @@ export const useCommonStore = defineStore('common', {
|
||||
state: (): { questionsInfo: QuestionsInfo } => ({
|
||||
questionsInfo: {
|
||||
survey: {
|
||||
title: '',
|
||||
introduction: '',
|
||||
ip_number: 1,
|
||||
is_ip_number: 1,
|
||||
is_browser_number: 1,
|
||||
browser_number: 1,
|
||||
publish_number: 1
|
||||
publish_number: 1,
|
||||
is_time: 1,
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
last_question_index: 0,
|
||||
is_one_page_one_question: 1,
|
||||
is_publish_number: 1
|
||||
},
|
||||
logics: [],
|
||||
questions: [], // 初始化为明确类型的空数组
|
||||
|
||||
Reference in New Issue
Block a user