Commit 26fd35e31d51d47088c1ddf69dffdedd7e124425

Authored by xingyu
1 parent 005a3e6a

fix: contentDetailWrap 暗黑模式

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