diff --git a/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm b/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm
index 76a613a..37aa315 100644
--- a/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm
+++ b/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm
@@ -259,7 +259,7 @@ function handle${AttrName}1Confirm() {
#end
#end
-/** 搜索 */
+/** 搜索按钮操作 */
function handleSearch() {
visible.value = false
emit('search', {
@@ -276,7 +276,7 @@ function handleSearch() {
})
}
-/** 重置 */
+/** 重置按钮操作 */
function handleReset() {
#foreach($column in $columns)
#if ($column.listOperation)
diff --git a/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm b/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm
index 8a86f96..5a02a8b 100644
--- a/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm
+++ b/yudao-module-infra/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm
@@ -62,6 +62,7 @@
#end
#end
import type { ${simpleClassName} } from '@/api/${table.moduleName}/${table.businessName}'
+import { onUnload } from '@dcloudio/uni-app'
import { onMounted, ref } from 'vue'
import { useToast } from 'wot-design-uni'
import { delete${simpleClassName}, get${simpleClassName} } from '@/api/${table.moduleName}/${table.businessName}'
@@ -97,7 +98,7 @@ function handleBack() {
/** 加载${table.classComment}详情 */
async function getDetail() {
- if (!props.id) {
+ if (!props.id || deleting.value) {
return
}
try {
@@ -131,6 +132,7 @@ function handleDelete() {
try {
await delete${simpleClassName}(props.id)
toast.success('删除成功')
+ uni.$emit('${table.moduleName}:${table.businessName}:reload')
setTimeout(() => {
handleBack()
}, 500)
@@ -143,8 +145,14 @@ function handleDelete() {
/** 初始化 */
onMounted(() => {
+ uni.$on('${table.moduleName}:${table.businessName}:reload', getDetail)
getDetail()
})
+
+/** 卸载 */
+onUnload(() => {
+ uni.$off('${table.moduleName}:${table.businessName}:reload', getDetail)
+})
diff --git a/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/form/index b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/form/index
new file mode 100644
index 0000000..b64d003
--- /dev/null
+++ b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/form/index
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/index b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/index
new file mode 100644
index 0000000..acb1b87
--- /dev/null
+++ b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/index
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ 简介:
+ {{ item.description }}
+
+
+ 出生日期:
+ {{ formatDateTime(item.birthday) || '-' }}
+
+
+ 是否有效:
+
+
+
+ 头像:
+ {{ item.avatar }}
+
+
+ 附件:
+ {{ item.video }}
+
+
+ 备注:
+ {{ item.memo }}
+
+
+ 创建时间:
+ {{ formatDateTime(item.createTime) || '-' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/search-form b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/search-form
new file mode 100644
index 0000000..654d411
--- /dev/null
+++ b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/vue/search-form
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+
+
+
+ 名字
+
+
+
+
+
+ 出生日期
+
+
+
+
+
+ 性别
+
+
+
+ 全部
+
+
+ {{ dict.label }}
+
+
+
+
+
+ 是否有效
+
+
+
+ 全部
+
+
+ {{ dict.label }}
+
+
+
+
+
+ 创建时间
+
+
+
+
+ {{ formatDate(formData.createTime?.[0]) || '开始日期' }}
+
+
+ -
+
+
+ {{ formatDate(formData.createTime?.[1]) || '结束日期' }}
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+ 重置
+
+
+ 搜索
+
+
+
+
+
+
+
diff --git a/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/xml/InfraStudentMapper b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/xml/InfraStudentMapper
new file mode 100644
index 0000000..155aa5c
--- /dev/null
+++ b/yudao-module-infra/src/test/resources/codegen/vue3_admin_uniapp_one/xml/InfraStudentMapper
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file