Commit 26fd35e31d51d47088c1ddf69dffdedd7e124425
1 parent
005a3e6a
fix: contentDetailWrap 暗黑模式
Showing
6 changed files
with
23 additions
and
19 deletions
yudao-ui-admin-vue3/src/components/ContentDetailWrap/src/ContentDetailWrap.vue
| @@ -24,12 +24,12 @@ onMounted(() => { | @@ -24,12 +24,12 @@ onMounted(() => { | ||
| 24 | </script> | 24 | </script> |
| 25 | 25 | ||
| 26 | <template> | 26 | <template> |
| 27 | - <div :class="[`${prefixCls}-container`, 'relative bg-[#fff]']" ref="contentDetailWrap"> | 27 | + <div :class="[`${prefixCls}-container`]" ref="contentDetailWrap"> |
| 28 | <Sticky :offset="offset"> | 28 | <Sticky :offset="offset"> |
| 29 | <div | 29 | <div |
| 30 | :class="[ | 30 | :class="[ |
| 31 | `${prefixCls}-header`, | 31 | `${prefixCls}-header`, |
| 32 | - 'flex border-bottom-1 h-50px items-center text-center bg-white pr-10px' | 32 | + 'flex border-bottom-1 h-50px items-center text-center pr-10px' |
| 33 | ]" | 33 | ]" |
| 34 | > | 34 | > |
| 35 | <div :class="[`${prefixCls}-header__back`, 'flex pl-10px pr-10px ']"> | 35 | <div :class="[`${prefixCls}-header__back`, 'flex pl-10px pr-10px ']"> |
| @@ -50,9 +50,7 @@ onMounted(() => { | @@ -50,9 +50,7 @@ onMounted(() => { | ||
| 50 | </Sticky> | 50 | </Sticky> |
| 51 | <div style="padding: var(--app-content-padding)"> | 51 | <div style="padding: var(--app-content-padding)"> |
| 52 | <ElCard :class="[`${prefixCls}-body`, 'mb-20px']" shadow="never"> | 52 | <ElCard :class="[`${prefixCls}-body`, 'mb-20px']" shadow="never"> |
| 53 | - <div> | ||
| 54 | - <slot></slot> | ||
| 55 | - </div> | 53 | + <div> <slot></slot> </div> |
| 56 | </ElCard> | 54 | </ElCard> |
| 57 | </div> | 55 | </div> |
| 58 | </div> | 56 | </div> |
yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
| @@ -185,10 +185,10 @@ const filterTableSchema = (crudSchema: VxeCrudSchema): VxeGridPropTypes.Columns | @@ -185,10 +185,10 @@ const filterTableSchema = (crudSchema: VxeCrudSchema): VxeGridPropTypes.Columns | ||
| 185 | const tableSchema: VxeGridPropTypes.Columns = [] | 185 | const tableSchema: VxeGridPropTypes.Columns = [] |
| 186 | // 主键ID | 186 | // 主键ID |
| 187 | if (crudSchema.primaryKey && crudSchema.primaryType) { | 187 | if (crudSchema.primaryKey && crudSchema.primaryType) { |
| 188 | - const primaryWidth = | ||
| 189 | - (crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index')).length * 20 + 'px' | 188 | + const primaryTitle = crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index') |
| 189 | + const primaryWidth = primaryTitle.length * 30 + 'px' | ||
| 190 | const tableSchemaItem = { | 190 | const tableSchemaItem = { |
| 191 | - title: crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index'), | 191 | + title: primaryTitle, |
| 192 | field: crudSchema.primaryKey, | 192 | field: crudSchema.primaryKey, |
| 193 | type: crudSchema.primaryType ? crudSchema.primaryType : null, | 193 | type: crudSchema.primaryType ? crudSchema.primaryType : null, |
| 194 | width: primaryWidth | 194 | width: primaryWidth |
yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue
| 1 | <template> | 1 | <template> |
| 2 | - <ContentDetailWrap title="代码生成" @back="push('/infra/codegen')"> | 2 | + <ContentDetailWrap :title="title" @back="push('/infra/codegen')"> |
| 3 | <el-tabs v-model="activeName"> | 3 | <el-tabs v-model="activeName"> |
| 4 | <el-tab-pane label="基本信息" name="basicInfo"> | 4 | <el-tab-pane label="基本信息" name="basicInfo"> |
| 5 | <BasicInfoForm ref="basicInfoRef" :basicInfo="tableCurrentRow" /> | 5 | <BasicInfoForm ref="basicInfoRef" :basicInfo="tableCurrentRow" /> |
| @@ -31,22 +31,25 @@ const { t } = useI18n() // 国际化 | @@ -31,22 +31,25 @@ const { t } = useI18n() // 国际化 | ||
| 31 | const message = useMessage() // 消息弹窗 | 31 | const message = useMessage() // 消息弹窗 |
| 32 | const { push } = useRouter() | 32 | const { push } = useRouter() |
| 33 | const { query } = useRoute() | 33 | const { query } = useRoute() |
| 34 | +const loading = ref(false) | ||
| 35 | +const title = ref('代码生成') | ||
| 36 | +const activeName = ref('cloum') | ||
| 37 | +const cloumInfoRef = ref(null) | ||
| 34 | const tableCurrentRow = ref<CodegenTableVO>() | 38 | const tableCurrentRow = ref<CodegenTableVO>() |
| 35 | const cloumCurrentRow = ref<CodegenColumnVO[]>([]) | 39 | const cloumCurrentRow = ref<CodegenColumnVO[]>([]) |
| 40 | +const basicInfoRef = ref<ComponentRef<typeof BasicInfoForm>>() | ||
| 41 | +const genInfoRef = ref<ComponentRef<typeof GenInfoForm>>() | ||
| 42 | + | ||
| 36 | const getList = async () => { | 43 | const getList = async () => { |
| 37 | const id = query.id as unknown as number | 44 | const id = query.id as unknown as number |
| 38 | if (id) { | 45 | if (id) { |
| 39 | // 获取表详细信息 | 46 | // 获取表详细信息 |
| 40 | const res = await getCodegenTableApi(id) | 47 | const res = await getCodegenTableApi(id) |
| 41 | tableCurrentRow.value = res.table | 48 | tableCurrentRow.value = res.table |
| 49 | + title.value = '修改[ ' + res.table.tableName + ' ]生成配置' | ||
| 42 | cloumCurrentRow.value = res.columns | 50 | cloumCurrentRow.value = res.columns |
| 43 | } | 51 | } |
| 44 | } | 52 | } |
| 45 | -const loading = ref(false) | ||
| 46 | -const activeName = ref('cloum') | ||
| 47 | -const basicInfoRef = ref<ComponentRef<typeof BasicInfoForm>>() | ||
| 48 | -const genInfoRef = ref<ComponentRef<typeof GenInfoForm>>() | ||
| 49 | -const cloumInfoRef = ref(null) | ||
| 50 | const submitForm = async () => { | 53 | const submitForm = async () => { |
| 51 | const basicInfo = unref(basicInfoRef) | 54 | const basicInfo = unref(basicInfoRef) |
| 52 | const genInfo = unref(genInfoRef) | 55 | const genInfo = unref(genInfoRef) |
yudao-ui-admin-vue3/src/views/infra/codegen/components/CloumInfoForm.vue
| 1 | <template> | 1 | <template> |
| 2 | - <vxe-table ref="dragTable" :data="info" stripe :column-config="{ resizable: true }"> | 2 | + <vxe-table |
| 3 | + ref="dragTable" | ||
| 4 | + :data="info" | ||
| 5 | + max-height="600" | ||
| 6 | + stripe | ||
| 7 | + :column-config="{ resizable: true }" | ||
| 8 | + > | ||
| 3 | <vxe-column title="字段列名" field="columnName" fixed="left" width="80" /> | 9 | <vxe-column title="字段列名" field="columnName" fixed="left" width="80" /> |
| 4 | <vxe-column title="字段描述" field="columnComment"> | 10 | <vxe-column title="字段描述" field="columnComment"> |
| 5 | <template #default="{ row }"> | 11 | <template #default="{ row }"> |
yudao-ui-admin-vue3/src/views/infra/codegen/index.vue
| @@ -71,7 +71,7 @@ import { ImportTable, Preview } from './components' | @@ -71,7 +71,7 @@ import { ImportTable, Preview } from './components' | ||
| 71 | 71 | ||
| 72 | const { t } = useI18n() // 国际化 | 72 | const { t } = useI18n() // 国际化 |
| 73 | const message = useMessage() // 消息弹窗 | 73 | const message = useMessage() // 消息弹窗 |
| 74 | -const { push } = useRouter() | 74 | +const { push } = useRouter() // 路由跳转 |
| 75 | // 列表相关的变量 | 75 | // 列表相关的变量 |
| 76 | const xGrid = ref<VxeGridInstance>() // 列表 Grid Ref | 76 | const xGrid = ref<VxeGridInstance>() // 列表 Grid Ref |
| 77 | const { gridOptions, getList, deleteData } = useVxeGrid<CodegenTableVO>({ | 77 | const { gridOptions, getList, deleteData } = useVxeGrid<CodegenTableVO>({ |
| @@ -92,8 +92,6 @@ const handlePreview = (row: CodegenTableVO) => { | @@ -92,8 +92,6 @@ const handlePreview = (row: CodegenTableVO) => { | ||
| 92 | } | 92 | } |
| 93 | // 编辑操作 | 93 | // 编辑操作 |
| 94 | const handleUpdate = (rowId: number) => { | 94 | const handleUpdate = (rowId: number) => { |
| 95 | - // TODO 星语:修改某个的时候,tab 要展示名字。例如说:"修改[" + tableName + "]生成配置" | ||
| 96 | - // TODO 星语:【暗黑模式】编辑界面,周边有白色的边框,不太好看 | ||
| 97 | push('/codegen/edit?id=' + rowId) | 95 | push('/codegen/edit?id=' + rowId) |
| 98 | } | 96 | } |
| 99 | // 同步操作 | 97 | // 同步操作 |
yudao-ui-admin-vue3/src/views/system/user/index.vue
| @@ -359,7 +359,6 @@ const handleCreate = async () => { | @@ -359,7 +359,6 @@ const handleCreate = async () => { | ||
| 359 | deptId.value = null | 359 | deptId.value = null |
| 360 | postIds.value = [] | 360 | postIds.value = [] |
| 361 | await nextTick() | 361 | await nextTick() |
| 362 | - // TODO 星语:要不要这个放到新增里?这样和 handleUpdate 统一一点 | ||
| 363 | if (allSchemas.formSchema[0].field !== 'username') { | 362 | if (allSchemas.formSchema[0].field !== 'username') { |
| 364 | unref(formRef)?.addSchema( | 363 | unref(formRef)?.addSchema( |
| 365 | { | 364 | { |