From e85321c21612da0a828ee8652f1b6bc0f9e5976a Mon Sep 17 00:00:00 2001 From: pixelmaxQM Date: Mon, 18 Nov 2024 21:44:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=A0=91=E5=BD=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E8=87=AA=E5=8A=A8=E5=8C=96=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/package/web/view/form.vue.tpl | 2 +- server/resource/package/web/view/table.vue.tpl | 2 +- server/resource/plugin/web/form/form.vue.template | 2 +- server/resource/plugin/web/view/view.vue.template | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/resource/package/web/view/form.vue.tpl b/server/resource/package/web/view/form.vue.tpl index 33581c7ed5..282d698f46 100644 --- a/server/resource/package/web/view/form.vue.tpl +++ b/server/resource/package/web/view/form.vue.tpl @@ -312,7 +312,7 @@ const rootNode = { const getTableData = async() => { const table = await get{{.StructName}}List() if (table.code === 0) { - tableData.value = table.data + tableData.value = table.data || [] } } diff --git a/server/resource/package/web/view/table.vue.tpl b/server/resource/package/web/view/table.vue.tpl index 35dfd1b2b3..f73dcf551e 100644 --- a/server/resource/package/web/view/table.vue.tpl +++ b/server/resource/package/web/view/table.vue.tpl @@ -1096,7 +1096,7 @@ const rootNode = { const getTableData = async() => { const table = await get{{.StructName}}List() if (table.code === 0) { - tableData.value = table.data + tableData.value = table.data || [] } } {{- end }} diff --git a/server/resource/plugin/web/form/form.vue.template b/server/resource/plugin/web/form/form.vue.template index 6726ee41a0..e3e4dc05ba 100644 --- a/server/resource/plugin/web/form/form.vue.template +++ b/server/resource/plugin/web/form/form.vue.template @@ -312,7 +312,7 @@ const rootNode = { const getTableData = async() => { const table = await get{{.StructName}}List() if (table.code === 0) { - tableData.value = table.data + tableData.value = table.data || [] } } diff --git a/server/resource/plugin/web/view/view.vue.template b/server/resource/plugin/web/view/view.vue.template index 0122af4df7..542de2d793 100644 --- a/server/resource/plugin/web/view/view.vue.template +++ b/server/resource/plugin/web/view/view.vue.template @@ -352,7 +352,7 @@ const dataSource = ref({}) const getDataSourceFunc = async()=>{ const res = await get{{.StructName}}DataSource() if (res.code === 0) { - dataSource.value = res.data + dataSource.value = res.data || [] } } getDataSourceFunc()