From 129a803e9a750720833d1e104a250d4f6bb50379 Mon Sep 17 00:00:00 2001 From: sudoooooo Date: Tue, 24 Sep 2024 12:13:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edit/modules/skinModule/CatalogPanel.vue | 6 +++--- .../stores/composables/useInitializeSchema.ts | 16 ++++++++-------- web/src/render/api/survey.js | 2 +- web/src/render/components/ConfirmDialog.vue | 6 ++++-- .../components/VerifyDialog/WhiteListDialog.vue | 12 ++++++++---- web/src/render/components/VerifyDialog/index.vue | 4 ++-- web/src/render/pages/RenderPage.vue | 4 ++-- 7 files changed, 28 insertions(+), 22 deletions(-) diff --git a/web/src/management/pages/edit/modules/skinModule/CatalogPanel.vue b/web/src/management/pages/edit/modules/skinModule/CatalogPanel.vue index 077129dc..ac609de4 100644 --- a/web/src/management/pages/edit/modules/skinModule/CatalogPanel.vue +++ b/web/src/management/pages/edit/modules/skinModule/CatalogPanel.vue @@ -34,7 +34,7 @@ import skinPresets from '@/management/config/skinPresets.js' const editStore = useEditStore() const { changeThemePreset } = editStore const groupName = ref('temp') -let bannerList = ref([]) +let bannerList = ref([]) onMounted(async () => { const res = await getBannerData() @@ -43,14 +43,14 @@ onMounted(async () => { const groupList = computed(() => Object.keys(bannerList.value).map((key) => ({ - label: bannerList.value[key].name, + label: (bannerList.value as any)[key].name, value: key })) ) const currentBannerList = computed(() => { const arr = Object.keys(bannerList.value) .map((key) => { - return bannerList.value[key] + return (bannerList.value as any)[key] }) .map((data) => { return data.list.map((item: any) => { diff --git a/web/src/management/stores/composables/useInitializeSchema.ts b/web/src/management/stores/composables/useInitializeSchema.ts index 5d09fb03..5e50dc6c 100644 --- a/web/src/management/stores/composables/useInitializeSchema.ts +++ b/web/src/management/stores/composables/useInitializeSchema.ts @@ -10,14 +10,14 @@ export default function useInitializeSchema( ) { const schema = reactive({ metaData: null, - bannerConf: {}, - bottomConf: {}, - skinConf: {}, - baseConf: {}, - submitConf: {}, - pageConf: [], - logicConf: {}, - questionDataList: [], + bannerConf: {} as any, + bottomConf: {} as any, + skinConf: {} as any, + baseConf: {} as any, + submitConf: {} as any, + pageConf: [] as any, + logicConf: {} as any, + questionDataList: [] as any, pageEditOne: 1 }) const { showLogicEngine, initShowLogicEngine, jumpLogicEngine, initJumpLogicEngine } = diff --git a/web/src/render/api/survey.js b/web/src/render/api/survey.js index 0f2f2533..1e68b9f2 100644 --- a/web/src/render/api/survey.js +++ b/web/src/render/api/survey.js @@ -33,7 +33,7 @@ export const getEncryptInfo = () => { return axios.get('/clientEncrypt/getEncryptInfo') } -export const validate = ({ surveyPath, password, whitelist }) => { +export const validate = ({ surveyPath, password = '', whitelist = '' }) => { return axios.post(`/responseSchema/${surveyPath}/validate`, { password, whitelist diff --git a/web/src/render/components/ConfirmDialog.vue b/web/src/render/components/ConfirmDialog.vue index cd7445e8..049b6bcf 100644 --- a/web/src/render/components/ConfirmDialog.vue +++ b/web/src/render/components/ConfirmDialog.vue @@ -51,7 +51,7 @@ interface Props { } interface Emit { - (ev: 'confirm', data, callback: () => void): void + (ev: 'confirm', data: any, callback: () => void): void (ev: 'close'): void } @@ -71,7 +71,9 @@ const isVisible = ref(props.visible) const formValues = reactive(props.bodyContent || []) const handleConfirm = () => { - const data = {} + const data: { + [key: string]: any + } = {} formValues.forEach((item) => { data[item.key] = item.value }) diff --git a/web/src/render/components/VerifyDialog/WhiteListDialog.vue b/web/src/render/components/VerifyDialog/WhiteListDialog.vue index 8aea4c15..4396eae0 100644 --- a/web/src/render/components/VerifyDialog/WhiteListDialog.vue +++ b/web/src/render/components/VerifyDialog/WhiteListDialog.vue @@ -10,6 +10,7 @@