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()