Skip to content

Commit 63e2e20

Browse files
committed
Merge branch 'main' of github.com:mineadmin/MineAdmin-Vue
2 parents c2011b6 + fa0d9ec commit 63e2e20

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

src/components/ma-crud/components/column.vue

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<a-table-column
55
:title="row.title"
66
:width="row.width"
7+
:min-width="row.minWidth"
78
:ellipsis="row.ellipsis ?? true"
89
:filterable="row.filterable"
910
:cell-class="row.cellClass"
@@ -38,6 +39,7 @@
3839
:title="row.title"
3940
:data-index="row.dataIndex"
4041
:width="row.width"
42+
:min-width="row.minWidth"
4143
:ellipsis="row.ellipsis ?? true"
4244
:filterable="row.filterable"
4345
:cell-class="row.cellClass"

src/components/ma-crud/components/searchFormItem/form-select.vue

+4-6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if ( props.component.multiple === true ) {
7272
if (isObject(props.component.dict)) {
7373
props.component.dict.pageOption = {
7474
page: 1,
75-
pageSize: props.component?.dict?.pageSize ?? 15
75+
pageSize: props.component?.dict?.pageOption?.pageSize ?? props.component?.dict?.pageSize ?? 15
7676
}
7777
}
7878

@@ -108,6 +108,9 @@ const handlePage = async (page) => {
108108

109109
watch( () => get(searchForm.value, props.component.dataIndex), vl => value.value = vl )
110110
watch( () => value.value, v => set(searchForm.value, props.component.dataIndex, v) )
111+
watch( () => dicts.value[dictIndex] , async v => {
112+
dataTotal.value = v?.pageInfo?.total || 0
113+
})
111114

112115
const handlerChangeeEvent = (value) => {
113116
handlerCascader(
@@ -116,10 +119,5 @@ const handlerChangeeEvent = (value) => {
116119
}
117120

118121
onMounted(() => {
119-
setTimeout(() => {
120-
if (isObject(dicts.value[dictIndex])) {
121-
dataTotal.value = dicts.value[dictIndex]?.pageInfo?.total
122-
}
123-
}, 3000);
124122
})
125123
</script>

src/components/ma-crud/index.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
<slot name="searchAfterButtons"></slot>
4848
</template>
4949
</ma-search>
50+
<div v-if="$slots.middleContent" class="mb-2"><slot name="middleContent"></slot></div>
5051
</div>
51-
<div class="mb-2"><slot name="middleContent"></slot></div>
5252
<div class="_crud-content">
5353
<div class="operation-tools lg:flex justify-between mb-3" ref="crudOperationRef">
5454
<a-space class="lg:flex block lg:inline-block" >
@@ -380,6 +380,7 @@ columns.value.map((item, index) => {
380380
item = columns.value[index]
381381
}
382382
!item.width && (item.width = options.value.columnWidth)
383+
!item.minWidth && (item.minWidth = options.value.columnMinWidth)
383384
})
384385

385386
provide('options', options.value)

src/components/ma-crud/js/defaultOptions.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ export default {
5454
// 页面布局方式,支持 normal(标准)和 fixed(固定)两种
5555
pageLayout: 'normal',
5656
// 默认统一设置列宽度
57-
columnWidth: 100,
57+
columnWidth: 0,// 列宽更新为最小列宽(此处设置为 0 时候,默认最小列宽生效)
58+
columnMinWidth: 100,
5859
// 搜索标签对齐方式
5960
searchLabelAlign: 'right',
6061
// 全局搜索标签宽度

src/components/ma-form/formItem/form-select.vue

+4-7
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const props = defineProps({
9595
if (isObject(props.component.dict)) {
9696
props.component.dict.pageOption = {
9797
page: 1,
98-
pageSize: props.component?.dict?.pageSize ?? 15
98+
pageSize: props.component?.dict?.pageOption?.pageSize ?? props.component?.dict?.pageSize ?? 15
9999
}
100100
}
101101

@@ -116,6 +116,9 @@ watch( () => value.value, v => {
116116
set(formModel.value, index, v)
117117
index.indexOf('.') > -1 && delete formModel.value[index]
118118
} )
119+
watch( () => dictList.value[index] , async v => {
120+
dataTotal.value = v?.pageInfo?.total || 0
121+
})
119122

120123
if (value.value === '') {
121124
value.value = undefined
@@ -170,11 +173,5 @@ const handleCascaderChangeEvent = async (value) => {
170173

171174
rv('onCreated')
172175
onMounted(() => {
173-
setTimeout(() => {
174-
if (isObject(dictList.value[index])) {
175-
dataTotal.value = dictList.value[index]?.pageInfo?.total
176-
}
177-
}, 800);
178-
rv('onMounted')
179176
})
180177
</script>

src/components/ma-resource/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a-modal v-model:visible="openNetworkModal" :ok-text="$t('sys.save')" :on-before-ok="saveNetworkImg" draggable>
1313
<template #title>{{ $t('maResource.saveNetworkImage') }}</template>
1414
<a-input v-model="networkImg" class="mb-3" :placeholder="$t('maResource.networkImageNotice')" allow-clear />
15-
<a-image :src="networkImg" width="100%" style="min-height: 150px;" />
15+
<a-image :src="networkImg ?? ''" width="100%" style="min-height: 150px;" />
1616
</a-modal>
1717
<div class="lg:w-1/5 w-full p-2 shadow">
1818
<ma-tree-slider

src/views/setting/config/index.vue

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
:title="item.name"
4141
>
4242
<ma-form
43+
v-if="isCreateNode"
4344
v-model="formArray[item.id]"
4445
:columns="optionsArray[item.id]"
4546
@submit="submit"

0 commit comments

Comments
 (0)