修正表单页getTitle未动态生效问题 #I4QXTJ
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
});
|
||||
</script>
|
||||
<script lang="ts" setup>
|
||||
import { defineComponent, ref } from 'vue';
|
||||
import { defineComponent, ref, computed } from 'vue';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { router } from '/@/router';
|
||||
@@ -90,10 +90,10 @@ for(c in table.columnList){
|
||||
const { t } = useI18n('${moduleName}${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${className}');
|
||||
const { showMessage } = useMessage();
|
||||
const record = ref<Recordable>({});
|
||||
const getTitle = {
|
||||
const getTitle = computed(() => ({
|
||||
icon: router.currentRoute.value.meta.icon || 'ant-design:book-outlined',
|
||||
value: record.value.isNewRecord ? t('新增${functionNameSimple}') : t('编辑${functionNameSimple}'),
|
||||
};
|
||||
}));
|
||||
|
||||
const inputFormSchemas: FormSchema[] = [
|
||||
<% if(table.isTreeEntity){ %>
|
||||
|
||||
Reference in New Issue
Block a user