br-dionysus 1.15.4 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +198 -56
- package/attributes.json +1 -1
- package/dist/br-dionysus.es.js +4804 -4643
- package/dist/br-dionysus.umd.js +8 -8
- package/dist/index.css +1 -1
- package/dist/packages/Hook/useTableConfig/useTableConfig.d.ts +2 -6
- package/dist/packages/MSelectTable/src/MSelectTable.vue.d.ts +4 -4
- package/dist/packages/MTable/index.d.ts +3 -1
- package/dist/packages/MTable/src/MBatchEdit.vue.d.ts +58 -0
- package/dist/packages/MTable/src/MTable.vue.d.ts +16 -0
- package/package.json +1 -1
- package/packages/Hook/useTableConfig/demo.vue +1 -1
- package/packages/Hook/useTableConfig/useTableConfig.ts +2 -6
- package/packages/MSelectTable/src/MSelectTable.vue +35 -6
- package/packages/MTable/docs/README.md +33 -14
- package/packages/MTable/docs/demo.vue +66 -14
- package/packages/MTable/index.ts +8 -1
- package/packages/MTable/src/MBatchEdit.vue +174 -0
- package/packages/MTable/src/MTable.vue +55 -15
- package/packages/MTableSuper/src/MTableSuper.vue +1 -1
- package/packages/index.ts +2 -1
- package/packages/typings/global.d.ts +34 -32
- package/tags.json +1 -1
- package/vite.config.ts +1 -1
- package/web-types.json +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-button
|
|
4
|
+
:disabled="btnDisable"
|
|
5
|
+
@click="open(props.selectionCell)"
|
|
6
|
+
>
|
|
7
|
+
测试
|
|
8
|
+
</el-button>
|
|
9
|
+
|
|
10
|
+
<MDialog
|
|
11
|
+
v-model="dialogVisible"
|
|
12
|
+
draggable
|
|
13
|
+
title="批量修改"
|
|
14
|
+
resize
|
|
15
|
+
@closed="closed"
|
|
16
|
+
>
|
|
17
|
+
<el-form
|
|
18
|
+
ref="ruleFormRef"
|
|
19
|
+
:model="ruleForm"
|
|
20
|
+
:rules="rules"
|
|
21
|
+
labelWidth="80px"
|
|
22
|
+
>
|
|
23
|
+
<div class="u-box">
|
|
24
|
+
<div class="u-row">
|
|
25
|
+
<div class="u-col">
|
|
26
|
+
<el-form-item
|
|
27
|
+
label="修改项目"
|
|
28
|
+
prop="modifyItem"
|
|
29
|
+
>
|
|
30
|
+
<el-select
|
|
31
|
+
v-model="ruleForm.modifyItem"
|
|
32
|
+
placeholder="请选择修改项目"
|
|
33
|
+
filterable
|
|
34
|
+
>
|
|
35
|
+
<el-option
|
|
36
|
+
v-for="item in modifyItemOptions"
|
|
37
|
+
:key="item.value"
|
|
38
|
+
:label="item.label"
|
|
39
|
+
:value="item.value"
|
|
40
|
+
/>
|
|
41
|
+
</el-select>
|
|
42
|
+
</el-form-item>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="u-row">
|
|
46
|
+
<div class="u-col">
|
|
47
|
+
<el-form-item
|
|
48
|
+
label="修改内容"
|
|
49
|
+
prop="modifyContent"
|
|
50
|
+
>
|
|
51
|
+
<el-input
|
|
52
|
+
v-if="modifyContentType === 'string'"
|
|
53
|
+
v-model="ruleForm.modifyContent"
|
|
54
|
+
placeholder="请输入修改内容"
|
|
55
|
+
clearable
|
|
56
|
+
/>
|
|
57
|
+
<MInputNumber
|
|
58
|
+
v-else-if="modifyContentType === 'number'"
|
|
59
|
+
v-model="ruleForm.modifyContent"
|
|
60
|
+
placeholder="请输入修改内容"
|
|
61
|
+
clearable
|
|
62
|
+
/>
|
|
63
|
+
</el-form-item>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</el-form>
|
|
68
|
+
<template #footer>
|
|
69
|
+
<div class="dialog-footer">
|
|
70
|
+
<el-button
|
|
71
|
+
type="primary"
|
|
72
|
+
@click="submit"
|
|
73
|
+
>
|
|
74
|
+
确定
|
|
75
|
+
</el-button>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
</MDialog>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script setup lang="ts">
|
|
83
|
+
import { ref, reactive, computed } from 'vue'
|
|
84
|
+
import { MDialog } from 'packages/MDialog'
|
|
85
|
+
import { MInputNumber } from 'packages/MInputNumber'
|
|
86
|
+
|
|
87
|
+
const props = withDefaults(defineProps<{
|
|
88
|
+
/** 选中列 */
|
|
89
|
+
selectionCell?: string;
|
|
90
|
+
/** 组件大小 */
|
|
91
|
+
size?: 'small' | 'large' | '';
|
|
92
|
+
/** 表格数据 */
|
|
93
|
+
tableData?: Record<string, any>[];
|
|
94
|
+
/** 表格列配置 */
|
|
95
|
+
tableTitle?: TableTitle[];
|
|
96
|
+
}>(), {
|
|
97
|
+
selectionCell: '',
|
|
98
|
+
size: '',
|
|
99
|
+
tableData: () => [],
|
|
100
|
+
tableTitle: () => []
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
const tableData = ref<Record<string, any>[]>(props.tableData)
|
|
104
|
+
const dialogVisible = ref<boolean>(false)
|
|
105
|
+
|
|
106
|
+
const emit = defineEmits<{
|
|
107
|
+
'update:tableData': [data: Record<string, any>[]];
|
|
108
|
+
}>()
|
|
109
|
+
|
|
110
|
+
const submit = () => {
|
|
111
|
+
tableData.value.forEach(item => {
|
|
112
|
+
item[ruleForm.modifyItem] = ruleForm.modifyContent
|
|
113
|
+
})
|
|
114
|
+
dialogVisible.value = false
|
|
115
|
+
emit('update:tableData', tableData.value)
|
|
116
|
+
}
|
|
117
|
+
interface RuleFormType {
|
|
118
|
+
/** 修改项目 */
|
|
119
|
+
modifyItem: string;
|
|
120
|
+
/** 修改内容 */
|
|
121
|
+
modifyContent: string;
|
|
122
|
+
}
|
|
123
|
+
const modifyItemOptions = computed<Option[]>(() => {
|
|
124
|
+
return props.tableTitle.filter(item => item.isBatchEdit).map(item => ({
|
|
125
|
+
label: item.label ?? '',
|
|
126
|
+
value: item.prop as string ?? ''
|
|
127
|
+
}))
|
|
128
|
+
})
|
|
129
|
+
const btnDisable = computed(() => {
|
|
130
|
+
return !modifyItemOptions.value.some(item => item.value === props.selectionCell)
|
|
131
|
+
})
|
|
132
|
+
const ruleForm: RuleFormType = reactive<RuleFormType>({
|
|
133
|
+
modifyItem: '',
|
|
134
|
+
modifyContent: ''
|
|
135
|
+
})
|
|
136
|
+
const rules = {
|
|
137
|
+
modifyItem: [
|
|
138
|
+
{ required: true, message: '请选择修改项目', trigger: 'change' }
|
|
139
|
+
],
|
|
140
|
+
modifyContent: [
|
|
141
|
+
{ required: true, message: '请输入修改内容', trigger: 'blur' }
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const modifyContentType = computed(() => {
|
|
146
|
+
const dataRow = tableData.value
|
|
147
|
+
.map(item => item)
|
|
148
|
+
.reverse()
|
|
149
|
+
.find((item, index) => {
|
|
150
|
+
return (item[ruleForm.modifyItem] !== '' && item[ruleForm.modifyItem] !== null && item[ruleForm.modifyItem] !== undefined) || index === 0
|
|
151
|
+
})
|
|
152
|
+
const data = dataRow ? dataRow[ruleForm.modifyItem] : ''
|
|
153
|
+
|
|
154
|
+
if (typeof data === 'number') return 'number'
|
|
155
|
+
if (typeof data === 'string') return 'string'
|
|
156
|
+
return 'string'
|
|
157
|
+
})
|
|
158
|
+
const open = (key: string = '') => {
|
|
159
|
+
dialogVisible.value = true
|
|
160
|
+
ruleForm.modifyItem = key
|
|
161
|
+
}
|
|
162
|
+
const closed = () => {
|
|
163
|
+
ruleForm.modifyItem = ''
|
|
164
|
+
ruleForm.modifyContent = ''
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
defineExpose({
|
|
168
|
+
open
|
|
169
|
+
})
|
|
170
|
+
</script>
|
|
171
|
+
|
|
172
|
+
<style scoped lang="scss">
|
|
173
|
+
|
|
174
|
+
</style>
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
:data="tableData"
|
|
11
11
|
:expandRowKeys="expandRowKeys"
|
|
12
12
|
:rowKey="props.rowKey"
|
|
13
|
+
:cellStyle="cellStyle"
|
|
13
14
|
@paste="paste"
|
|
14
15
|
@cellClick="cellClick"
|
|
15
16
|
@expandChange="expandChange"
|
|
@@ -28,31 +29,35 @@
|
|
|
28
29
|
</template>
|
|
29
30
|
|
|
30
31
|
<script setup lang="ts">
|
|
31
|
-
import { ref, onMounted, computed, useSlots, watch, provide } from 'vue'
|
|
32
|
+
import { ref, onMounted, computed, useSlots, watch, provide, reactive } from 'vue'
|
|
32
33
|
import checkType from '../../Tool/checkType/checkType'
|
|
33
34
|
import { TableConfig } from './../../Hook/useTableConfig/useTableConfig'
|
|
34
35
|
import { tableKey } from './token'
|
|
35
36
|
|
|
36
37
|
interface FilterValue {
|
|
37
|
-
[key: string]: Array<string | number
|
|
38
|
+
[key: string]: Array<string | number>;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
const props = withDefaults(defineProps<{
|
|
41
|
-
size?: 'small' | 'large' | ''
|
|
42
|
-
sole?: string
|
|
43
|
-
data?: Record<string, any>[]
|
|
42
|
+
size?: 'small' | 'large' | '';
|
|
43
|
+
sole?: string;
|
|
44
|
+
data?: Record<string, any>[];
|
|
44
45
|
/** 表格内容筛选(当为null时,不显示筛选图标) */
|
|
45
|
-
filtersValue?: FilterValue | null
|
|
46
|
+
filtersValue?: FilterValue | null;
|
|
46
47
|
/** 表格配置 */
|
|
47
|
-
tableConfig?: TableConfig | null
|
|
48
|
+
tableConfig?: TableConfig | null;
|
|
48
49
|
/** 展开图标列(如使用这个属性则必须存在rowKey属性) (标记,约束条件后面解决) */
|
|
49
|
-
expandProp?: string
|
|
50
|
+
expandProp?: string;
|
|
50
51
|
/** 可以通过该属性设置 Table 目前的展开行,需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。 */
|
|
51
|
-
expandRowKeys?: any[]
|
|
52
|
+
expandRowKeys?: any[];
|
|
52
53
|
/** 行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function。 */
|
|
53
|
-
rowKey?: Function | string
|
|
54
|
+
rowKey?: Function | string;
|
|
54
55
|
/** 表格配置key */
|
|
55
|
-
tableConfigKey?: string
|
|
56
|
+
tableConfigKey?: string;
|
|
57
|
+
/** 显示单元格选中状态 */
|
|
58
|
+
showSelectionCellStatus?: boolean;
|
|
59
|
+
/** 选中列(必须showSelection为true) */
|
|
60
|
+
selectionCell?: string;
|
|
56
61
|
}>(), {
|
|
57
62
|
size: '',
|
|
58
63
|
sole: 'key',
|
|
@@ -62,7 +67,9 @@ const props = withDefaults(defineProps<{
|
|
|
62
67
|
expandProp: '',
|
|
63
68
|
expandRowKeys: () => [],
|
|
64
69
|
rowKey: '',
|
|
65
|
-
tableConfigKey: ''
|
|
70
|
+
tableConfigKey: '',
|
|
71
|
+
showSelectionCellStatus: false,
|
|
72
|
+
selectionCell: ''
|
|
66
73
|
})
|
|
67
74
|
|
|
68
75
|
const expandRowKeys = ref<any[] | null>(props.rowKey ? props.expandRowKeys : null)
|
|
@@ -149,13 +156,37 @@ const emit = defineEmits<{
|
|
|
149
156
|
},
|
|
150
157
|
/** 粘贴完成后的表格数据 */
|
|
151
158
|
tableData: Array<{ [key: string]: any }>
|
|
152
|
-
]
|
|
159
|
+
];
|
|
153
160
|
/** 表格配置更新 */
|
|
154
|
-
'update:tableConfig': [tableConfig: TableConfig]
|
|
161
|
+
'update:tableConfig': [tableConfig: TableConfig];
|
|
155
162
|
/** expandProp模式下 当用户对某一行展开或者关闭的时候会触发该事件 */
|
|
156
|
-
privateExpandChange: [row: any, expandedRows: any[]]
|
|
163
|
+
privateExpandChange: [row: any, expandedRows: any[]];
|
|
164
|
+
/** 选中单元格更新 */
|
|
165
|
+
'update:selectionCell': [string];
|
|
157
166
|
}>()
|
|
158
167
|
|
|
168
|
+
interface SelectionCellInfoType {
|
|
169
|
+
/** 列索引 */
|
|
170
|
+
columnIndex: number | null;
|
|
171
|
+
/** 行索引 */
|
|
172
|
+
rowIndex: number | null;
|
|
173
|
+
/** 列key */
|
|
174
|
+
prop: string;
|
|
175
|
+
}
|
|
176
|
+
const selectionCellInfo: SelectionCellInfoType = reactive<SelectionCellInfoType>({
|
|
177
|
+
columnIndex: null,
|
|
178
|
+
rowIndex: null,
|
|
179
|
+
prop: ''
|
|
180
|
+
})
|
|
181
|
+
const cellStyle = (data: { row: any, column: any, rowIndex: number, columnIndex: number }): Record<string, any> => {
|
|
182
|
+
if (!props.selectionCell) return {}
|
|
183
|
+
if (!props.showSelectionCellStatus) return {}
|
|
184
|
+
if (data.columnIndex !== selectionCellInfo.columnIndex || data.rowIndex !== selectionCellInfo.rowIndex) return {}
|
|
185
|
+
return {
|
|
186
|
+
backgroundColor: 'var(--el-color-primary-light-9)'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
159
190
|
const privateExpandChange = (index: number) => {
|
|
160
191
|
const row = tableData.value[index]
|
|
161
192
|
const expandedRows = tableData.value.filter(item => (expandRowKeys?.value || []).includes(item[props?.rowKey as any || '']))
|
|
@@ -179,6 +210,15 @@ const cellClick = (row: any, column: { property: string; }, cell: any) => {
|
|
|
179
210
|
editRowSole.value = row[props.sole] // 保存操作的行的元素唯一值
|
|
180
211
|
editRow.value = row // 获取行的key名
|
|
181
212
|
elDom.value?.addEventListener('paste', disablePasteEvent)
|
|
213
|
+
|
|
214
|
+
const tr = cell.parentElement
|
|
215
|
+
if (!tr) return
|
|
216
|
+
const parent = tr.parentNode
|
|
217
|
+
const rowIndex = Array.from(parent.children).indexOf(tr)
|
|
218
|
+
selectionCellInfo.columnIndex = cell.cellIndex
|
|
219
|
+
selectionCellInfo.rowIndex = rowIndex
|
|
220
|
+
selectionCellInfo.prop = column.property
|
|
221
|
+
emit('update:selectionCell', props.selectionCell === column.property ? '' : column.property)
|
|
182
222
|
}
|
|
183
223
|
const disablePasteEvent = (e: { preventDefault: () => void; }) => {
|
|
184
224
|
e.preventDefault()
|
package/packages/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { TabPagePlugin } from './TabPage'
|
|
|
4
4
|
import { MInputNumberPlugin } from './MInputNumber'
|
|
5
5
|
import { MInlinePlugin } from './MInline'
|
|
6
6
|
import { SkinConfigPlugin } from './SkinConfig'
|
|
7
|
-
import { MTablePlugin } from './MTable'
|
|
7
|
+
import { MTablePlugin, MBatchEditPlugin } from './MTable'
|
|
8
8
|
import { MTableColumnPlugin } from './MTableColumn'
|
|
9
9
|
import { MTableColumnSetPlugin } from './MTableColumnSet'
|
|
10
10
|
import { MSelectPlugin, MOptionPlugin } from './MSelect'
|
|
@@ -35,6 +35,7 @@ const BrPlugin: Plugin = {
|
|
|
35
35
|
MInlinePlugin.install?.(app)
|
|
36
36
|
SkinConfigPlugin.install?.(app)
|
|
37
37
|
MTablePlugin.install?.(app)
|
|
38
|
+
MBatchEditPlugin.install?.(app)
|
|
38
39
|
MTableColumnPlugin.install?.(app)
|
|
39
40
|
MTableColumnSetPlugin.install?.(app)
|
|
40
41
|
MSelectPlugin.install?.(app)
|
|
@@ -38,38 +38,40 @@ type OptionsKeys = `${string}Options` | `${string}Map`
|
|
|
38
38
|
// }
|
|
39
39
|
|
|
40
40
|
/** 表头 */
|
|
41
|
-
interface TableTitle {
|
|
41
|
+
declare interface TableTitle<T extends Record<string, any> = any> {
|
|
42
42
|
/** 显示的标题 */
|
|
43
|
-
label
|
|
43
|
+
label: string;
|
|
44
44
|
/** 字段名称 对应列内容的字段名, 也可以使用 property属性 */
|
|
45
|
-
prop
|
|
45
|
+
prop: T extends Record<string, any> ? keyof T : string;
|
|
46
|
+
/** 对齐方式 */
|
|
47
|
+
align?: 'right' | 'left' | 'center';
|
|
46
48
|
/** 对应列的宽度 */
|
|
47
|
-
width?: number | string
|
|
49
|
+
width?: number | string;
|
|
48
50
|
/** 对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列 */
|
|
49
|
-
minWidth?: number | string
|
|
51
|
+
minWidth?: number | string;
|
|
50
52
|
/** 列的 className */
|
|
51
|
-
className?: string
|
|
53
|
+
className?: string;
|
|
52
54
|
/** 当前列标题的自定义类名 */
|
|
53
|
-
labelClassName?: string
|
|
55
|
+
labelClassName?: string;
|
|
54
56
|
/** 对应列是否可以排序, 如果设置为 'custom',则代表用户希望远程排序,需要监听 Table 的 sort-change 事件 */
|
|
55
|
-
sortable?: boolean
|
|
57
|
+
sortable?: boolean;
|
|
56
58
|
/** 指定数据按照哪个属性进行排序,仅当 sortable 设置为 true 且没有设置 sort-method 的时候有效。 如果 sort-by 为数组,则先按照第 1 个属性排序,如果第 1 个相等,再按照第 2 个排序,以此类推 */
|
|
57
|
-
sortBy?: (row: any, index: number) => string | string
|
|
59
|
+
sortBy?: (row: any, index: number) => string | string[];
|
|
58
60
|
/** 数据在排序时所使用排序策略的轮转顺序,仅当 sortable 为 true 时有效。 需传入一个数组,随着用户点击表头,该列依次按照数组中元素的顺序进行排序 */
|
|
59
|
-
sortOrders?: ('ascending' | 'descending' | null)[]
|
|
61
|
+
sortOrders?: ('ascending' | 'descending' | null)[];
|
|
60
62
|
/** 数据过滤的选项, 数组格式,数组中的元素需要有 text 和 value 属性。 数组中的每个元素都需要有 text 和 value 属性。 */
|
|
61
63
|
filters?: {
|
|
62
|
-
text: string | number
|
|
63
|
-
value: string | number
|
|
64
|
-
}[]
|
|
64
|
+
text: string | number;
|
|
65
|
+
value: string | number;
|
|
66
|
+
}[];
|
|
65
67
|
/** 数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示。 */
|
|
66
|
-
filterMethod?: Function
|
|
68
|
+
filterMethod?: Function;
|
|
67
69
|
/** 表头对齐方式, 若不设置该项,则使用表格的对齐方式 */
|
|
68
|
-
headerAlign?: 'left' | 'center' | 'right'
|
|
69
|
-
/** 对齐方式 */
|
|
70
|
-
align?: 'left' | 'center' | 'right',
|
|
70
|
+
headerAlign?: 'left' | 'center' | 'right';
|
|
71
71
|
/** 列是否固定在左侧或者右侧。 true 表示固定在左侧 */
|
|
72
|
-
fixed?: 'left' | 'right'
|
|
72
|
+
fixed?: true | 'left' | 'right';
|
|
73
|
+
/** 是否允许批改 */
|
|
74
|
+
isBatchEdit?: boolean;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
/** 要求对象中几个属性必有其一 */
|
|
@@ -78,31 +80,31 @@ type AtLeastOne<T, Keys extends keyof T> = Pick<T, Exclude<keyof T, Keys>> & { [
|
|
|
78
80
|
/** 表头(虚拟化表格) */
|
|
79
81
|
interface TableV2Title {
|
|
80
82
|
/** 显示的标题 */
|
|
81
|
-
title: string
|
|
83
|
+
title: string;
|
|
82
84
|
/** 唯一标志 */
|
|
83
|
-
key: string
|
|
85
|
+
key: string;
|
|
84
86
|
/** data 的唯一标志符 */
|
|
85
|
-
dataKey: string
|
|
87
|
+
dataKey: string;
|
|
86
88
|
/** 表格单元格内容对齐方式 */
|
|
87
|
-
align?: 'right' | 'left' | 'center'
|
|
89
|
+
align?: 'right' | 'left' | 'center';
|
|
88
90
|
/** 列的类名 */
|
|
89
|
-
class?: string
|
|
91
|
+
class?: string;
|
|
90
92
|
/** 列是否固定在左侧或者右侧。 true 表示固定在左侧 */
|
|
91
|
-
fixed?: true | 'left' | 'right'
|
|
93
|
+
fixed?: true | 'left' | 'right';
|
|
92
94
|
/** 自定义 header 头部类名 */
|
|
93
|
-
headerClass?: string
|
|
95
|
+
headerClass?: string;
|
|
94
96
|
/** 此列是否不可见 */
|
|
95
|
-
hidden?: boolean
|
|
97
|
+
hidden?: boolean;
|
|
96
98
|
/** 自定义列单元格的类名,将会与 gird 单元格合并 */
|
|
97
|
-
style?: object
|
|
99
|
+
style?: object;
|
|
98
100
|
/** 对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列 */
|
|
99
|
-
minWidth?: number | string
|
|
101
|
+
minWidth?: number | string;
|
|
100
102
|
/** 对应列的列的最大宽度 */
|
|
101
|
-
maxWidth?: number | string
|
|
103
|
+
maxWidth?: number | string;
|
|
102
104
|
/** 对应列的宽度 */
|
|
103
|
-
width: number | string
|
|
105
|
+
width: number | string;
|
|
104
106
|
/** 自定义单元格渲染器 */
|
|
105
|
-
cellRenderer?: any
|
|
107
|
+
cellRenderer?: any;
|
|
106
108
|
/** 自定义头部渲染器 */
|
|
107
|
-
headerCellRenderer?: any
|
|
109
|
+
headerCellRenderer?: any;
|
|
108
110
|
}
|
package/tags.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"demo":{"attributes":[],"description":"这是一个demo"},"m-dialog":{"attributes":["modelValue","width","insideHeight","minInsideHeight","maxInsideHeight","resize","draggable","insideClassName","drawerMode","resized","update:insideHeight","update:modelValue"],"description":"这是一个MDialog"},"m-inline":{"attributes":["minWidth","maxWidth","size","configKey","model","switch"],"description":"这是一个MInline"},"m-input-number":{"attributes":["modelValue","placeholder","disabled","size","min","max","step","stepStrictly","thousandthPlace","noBorder","noSpacing","update:modelValue","change","focus","blur"],"description":"这是一个MInputNumber"},"m-option":{"attributes":[],"description":"这是一个MOption"},"m-select":{"attributes":["checkboxMode","multiple","modelValue","update:modelValue","change"],"description":"这是一个MSelect"},"m-select-table":{"attributes":["modelValue","name","placeholder","disabled","size","total","filterMethod","filterable","remote","remoteMethod","options","tableTitle","multiple","keywords","reserveSelection","tableHeight","isAffirmBtn","scrollbarAlwaysOn","allowCreate","border","popupWidth","selected","selectMultiple","toPage","selectChange","update:modelValue","clear","removeTag"],"description":"这是一个MSelectTable"},"m-select-table-v1":{"attributes":["modelValue","placeholder","disabled","options","tableTitle","remoteMethod","allowCreate","focusShow","isSelect","clearable","size","labelKey","scrollbarAlwaysOn","total","update:modelValue","selectMultiple","change","selected","clear"],"description":"这是一个MSelectTableV1"},"m-select-v2":{"attributes":["modelValue","checkboxMode","multiple","showAll","options","update:modelValue"],"description":"这是一个MSelectV2"},"m-table":{"attributes":["size","sole","data","filtersValue","tableConfig","expandProp","expandRowKeys","rowKey","tableConfigKey","pasteData","update:tableConfig","privateExpandChange"],"description":"这是一个MTable"},"m-table-column":{"attributes":["filtersValue","filters","filterMethod","children","update:filtersValue"],"description":"这是一个MTableColumn"},"m-table-column-set":{"attributes":["modelValue","foldMode","link","tableConfigKey","update:modelValue","change"],"description":"这是一个MTableColumnSet"},"m-table-super":{"attributes":[],"description":"这是一个MTableSuper"},"m-table-v2":{"attributes":["size","data","height","border","columns","filtersValue","tableConfig","tableConfigKey","fixed","estimatedRowHeight","headerHeight","cellWidthAdaptive","pasteData","update:tableConfig"],"description":"这是一个MTableV2"},"skin-config":{"attributes":["change"],"description":"这是一个SkinConfig"},"tab-page":{"attributes":["modelValue","activeKey","showRightClickMenu","primaryColor","primaryBackgroundColor","close","click"],"description":"这是一个TabPage"}}
|
|
1
|
+
{"demo":{"attributes":[],"description":"这是一个demo"},"m-dialog":{"attributes":["modelValue","width","insideHeight","minInsideHeight","maxInsideHeight","resize","draggable","insideClassName","drawerMode","resized","update:insideHeight","update:modelValue"],"description":"这是一个MDialog"},"m-inline":{"attributes":["minWidth","maxWidth","size","configKey","model","switch"],"description":"这是一个MInline"},"m-input-number":{"attributes":["modelValue","placeholder","disabled","size","min","max","step","stepStrictly","thousandthPlace","noBorder","noSpacing","update:modelValue","change","focus","blur"],"description":"这是一个MInputNumber"},"m-option":{"attributes":[],"description":"这是一个MOption"},"m-select":{"attributes":["checkboxMode","multiple","modelValue","update:modelValue","change"],"description":"这是一个MSelect"},"m-select-table":{"attributes":["modelValue","name","placeholder","disabled","size","total","filterMethod","filterable","remote","remoteMethod","options","tableTitle","multiple","keywords","reserveSelection","tableHeight","isAffirmBtn","scrollbarAlwaysOn","allowCreate","border","popupWidth","selected","selectMultiple","toPage","selectChange","update:modelValue","clear","removeTag"],"description":"这是一个MSelectTable"},"m-select-table-v1":{"attributes":["modelValue","placeholder","disabled","options","tableTitle","remoteMethod","allowCreate","focusShow","isSelect","clearable","size","labelKey","scrollbarAlwaysOn","total","update:modelValue","selectMultiple","change","selected","clear"],"description":"这是一个MSelectTableV1"},"m-select-v2":{"attributes":["modelValue","checkboxMode","multiple","showAll","options","update:modelValue"],"description":"这是一个MSelectV2"},"m-batch-edit":{"attributes":["selectionCell","size","tableData","tableTitle","update:tableData"],"description":"这是一个MBatchEdit"},"m-table":{"attributes":["size","sole","data","filtersValue","tableConfig","expandProp","expandRowKeys","rowKey","tableConfigKey","showSelectionCellStatus","selectionCell","pasteData","update:tableConfig","privateExpandChange","update:selectionCell"],"description":"这是一个MTable"},"m-table-column":{"attributes":["filtersValue","filters","filterMethod","children","update:filtersValue"],"description":"这是一个MTableColumn"},"m-table-column-set":{"attributes":["modelValue","foldMode","link","tableConfigKey","update:modelValue","change"],"description":"这是一个MTableColumnSet"},"m-table-super":{"attributes":[],"description":"这是一个MTableSuper"},"m-table-v2":{"attributes":["size","data","height","border","columns","filtersValue","tableConfig","tableConfigKey","fixed","estimatedRowHeight","headerHeight","cellWidthAdaptive","pasteData","update:tableConfig"],"description":"这是一个MTableV2"},"skin-config":{"attributes":["change"],"description":"这是一个SkinConfig"},"tab-page":{"attributes":["modelValue","activeKey","showRightClickMenu","primaryColor","primaryBackgroundColor","close","click"],"description":"这是一个TabPage"}}
|
package/vite.config.ts
CHANGED
|
@@ -4,7 +4,7 @@ import eslint from 'vite-plugin-eslint'
|
|
|
4
4
|
import vue from '@vitejs/plugin-vue'
|
|
5
5
|
import Markdown from 'vite-plugin-md'
|
|
6
6
|
import VueDevTools from 'vite-plugin-vue-devtools'
|
|
7
|
-
import compressedFiles from './compressedFiles'
|
|
7
|
+
// import compressedFiles from './compressedFiles'
|
|
8
8
|
|
|
9
9
|
export default defineConfig({
|
|
10
10
|
resolve: {
|