diff --git a/src/components/Form/src/helper.ts b/src/components/Form/src/helper.ts index e2549cbd..9cab8ff1 100644 --- a/src/components/Form/src/helper.ts +++ b/src/components/Form/src/helper.ts @@ -16,7 +16,7 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderMoel => { const selectMap = ['Select', 'SelectV2', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect'] if (textMap.includes(schema?.component as string)) { return { - placeholder: t('common.inputText') + placeholder: t('common.inputText') + schema.label } } if (selectMap.includes(schema?.component as string)) { @@ -34,7 +34,7 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderMoel => { } } else { return { - placeholder: t('common.selectText') + placeholder: t('common.selectText') + schema.label } } } diff --git a/src/locales/en.ts b/src/locales/en.ts index ed5bf72c..1600a19f 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -281,6 +281,7 @@ export default { create: 'Create', add: 'Add', del: 'Delete', + delete: 'Delete', edit: 'Edit', update: 'Update', preview: 'Preview', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 7faf145d..7c5742c4 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -281,6 +281,7 @@ export default { create: '新增', add: '新增', del: '删除', + delete: '删除', edit: '编辑', update: '编辑', preview: '预览', diff --git a/src/views/system/post/PostForm.vue b/src/views/system/post/form.vue similarity index 70% rename from src/views/system/post/PostForm.vue rename to src/views/system/post/form.vue index ab3a23af..357a27a2 100644 --- a/src/views/system/post/PostForm.vue +++ b/src/views/system/post/form.vue @@ -1,6 +1,6 @@ + + diff --git a/src/views/system/post/post.data.ts b/src/views/system/post/post.data.ts index 7a32b233..4926bcc6 100644 --- a/src/views/system/post/post.data.ts +++ b/src/views/system/post/post.data.ts @@ -8,10 +8,10 @@ export const rules = reactive({ sort: [required] }) -// CrudSchema +// 增删改查 CrudSchema 配置 const crudSchemas = reactive({ primaryKey: 'id', - primaryType: 'seq', + primaryType: 'id', primaryTitle: '岗位编号', action: true, columns: [ @@ -27,7 +27,10 @@ const crudSchemas = reactive({ }, { title: '岗位顺序', - field: 'sort' + field: 'sort', + form: { + component: 'InputNumber' + } }, { title: t('common.status'), @@ -45,7 +48,10 @@ const crudSchemas = reactive({ title: t('common.createTime'), field: 'createTime', formatter: 'formatDate', - isForm: false + isForm: false, + table: { + width: 180 + } } ] })