br-dionysus 1.6.8 → 1.6.10
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 +48 -40
- package/attributes.json +1 -1
- package/dist/br-dionysus.es.js +4113 -4152
- package/dist/br-dionysus.umd.js +8 -8
- package/dist/index.css +1 -1
- package/dist/packages/MTable/src/MTable.vue.d.ts +3 -3
- package/dist/packages/MTable/src/token.d.ts +2 -2
- package/package.json +1 -1
- package/packages/MTable/docs/demo.vue +24 -20
- package/packages/MTable/src/MTable.vue +19 -4
- package/packages/MTable/src/token.ts +2 -2
- package/packages/MTableColumn/src/MTableColumn.vue +67 -54
- package/web-types.json +1 -1
package/README.md
CHANGED
|
@@ -930,14 +930,13 @@ const options: Option[] = [{
|
|
|
930
930
|
:filtersValue="filtersValue"
|
|
931
931
|
scrollbarAlwaysOn
|
|
932
932
|
v-model:tableConfig="tableConfig"
|
|
933
|
-
expandProp="name"
|
|
934
933
|
rowKey="id"
|
|
935
934
|
>
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
935
|
+
<!--<MTableColumn type="expand">-->
|
|
936
|
+
<!-- <template #default>-->
|
|
937
|
+
<!-- <h1>测试</h1>-->
|
|
938
|
+
<!-- </template>-->
|
|
939
|
+
<!--</MTableColumn>-->
|
|
941
940
|
<MTableColumn
|
|
942
941
|
v-for="item in tableTitle"
|
|
943
942
|
:key="item.prop"
|
|
@@ -962,15 +961,7 @@ const options: Option[] = [{
|
|
|
962
961
|
import { ref } from 'vue'
|
|
963
962
|
import { useTableConfig } from 'packages/index'
|
|
964
963
|
|
|
965
|
-
|
|
966
|
-
id: number;
|
|
967
|
-
date: string;
|
|
968
|
-
name: string;
|
|
969
|
-
address: string;
|
|
970
|
-
tag: string;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
const tableData = ref<User[]>([])
|
|
964
|
+
const tableData = ref<any[]>([])
|
|
974
965
|
const { tableTitle, headerDragend, tableConfig, filtersValue }= useTableConfig('MTableDemo', [{
|
|
975
966
|
label: 'Date',
|
|
976
967
|
prop: 'date',
|
|
@@ -989,28 +980,41 @@ tableData.value = [
|
|
|
989
980
|
{
|
|
990
981
|
id: 1,
|
|
991
982
|
date: '2016-05-03',
|
|
992
|
-
name: '
|
|
983
|
+
name: 'Tom1',
|
|
993
984
|
address: 'No. 189, Grove St, Los Angeles',
|
|
994
985
|
tag: 'Home'
|
|
995
986
|
},
|
|
996
987
|
{
|
|
997
988
|
id: 2,
|
|
998
989
|
date: '2016-05-02',
|
|
999
|
-
name: '
|
|
990
|
+
name: 'Tom2',
|
|
1000
991
|
address: 'No. 189, Grove St, Los Angeles',
|
|
1001
|
-
tag: 'Office'
|
|
992
|
+
tag: 'Office',
|
|
993
|
+
children: [{
|
|
994
|
+
id: 21,
|
|
995
|
+
date: '2016-05-02',
|
|
996
|
+
name: 'Tom21',
|
|
997
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
998
|
+
tag: 'Office',
|
|
999
|
+
}, {
|
|
1000
|
+
id: 22,
|
|
1001
|
+
date: '2016-05-02',
|
|
1002
|
+
name: 'Tom22',
|
|
1003
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
1004
|
+
tag: 'Office',
|
|
1005
|
+
}]
|
|
1002
1006
|
},
|
|
1003
1007
|
{
|
|
1004
1008
|
id: 3,
|
|
1005
1009
|
date: '2016-05-04',
|
|
1006
|
-
name: '
|
|
1010
|
+
name: 'Tom3',
|
|
1007
1011
|
address: 'No. 189, Grove St, Los Angeles',
|
|
1008
1012
|
tag: 'Home'
|
|
1009
1013
|
},
|
|
1010
1014
|
{
|
|
1011
1015
|
id: 4,
|
|
1012
1016
|
date: '2016-05-01',
|
|
1013
|
-
name: '
|
|
1017
|
+
name: 'Tom4',
|
|
1014
1018
|
address: 'No. 189, Grove St, Los Angeles',
|
|
1015
1019
|
tag: 'Office'
|
|
1016
1020
|
}
|
|
@@ -3039,14 +3043,13 @@ const options: Option[] = [{
|
|
|
3039
3043
|
:filtersValue="filtersValue"
|
|
3040
3044
|
scrollbarAlwaysOn
|
|
3041
3045
|
v-model:tableConfig="tableConfig"
|
|
3042
|
-
expandProp="name"
|
|
3043
3046
|
rowKey="id"
|
|
3044
3047
|
>
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3048
|
+
<!--<MTableColumn type="expand">-->
|
|
3049
|
+
<!-- <template #default>-->
|
|
3050
|
+
<!-- <h1>测试</h1>-->
|
|
3051
|
+
<!-- </template>-->
|
|
3052
|
+
<!--</MTableColumn>-->
|
|
3050
3053
|
<MTableColumn
|
|
3051
3054
|
v-for="item in tableTitle"
|
|
3052
3055
|
:key="item.prop"
|
|
@@ -3071,15 +3074,7 @@ const options: Option[] = [{
|
|
|
3071
3074
|
import { ref } from 'vue'
|
|
3072
3075
|
import { useTableConfig } from 'packages/index'
|
|
3073
3076
|
|
|
3074
|
-
|
|
3075
|
-
id: number;
|
|
3076
|
-
date: string;
|
|
3077
|
-
name: string;
|
|
3078
|
-
address: string;
|
|
3079
|
-
tag: string;
|
|
3080
|
-
}
|
|
3081
|
-
|
|
3082
|
-
const tableData = ref<User[]>([])
|
|
3077
|
+
const tableData = ref<any[]>([])
|
|
3083
3078
|
const { tableTitle, headerDragend, tableConfig, filtersValue }= useTableConfig('MTableDemo', [{
|
|
3084
3079
|
label: 'Date',
|
|
3085
3080
|
prop: 'date',
|
|
@@ -3098,28 +3093,41 @@ tableData.value = [
|
|
|
3098
3093
|
{
|
|
3099
3094
|
id: 1,
|
|
3100
3095
|
date: '2016-05-03',
|
|
3101
|
-
name: '
|
|
3096
|
+
name: 'Tom1',
|
|
3102
3097
|
address: 'No. 189, Grove St, Los Angeles',
|
|
3103
3098
|
tag: 'Home'
|
|
3104
3099
|
},
|
|
3105
3100
|
{
|
|
3106
3101
|
id: 2,
|
|
3107
3102
|
date: '2016-05-02',
|
|
3108
|
-
name: '
|
|
3103
|
+
name: 'Tom2',
|
|
3109
3104
|
address: 'No. 189, Grove St, Los Angeles',
|
|
3110
|
-
tag: 'Office'
|
|
3105
|
+
tag: 'Office',
|
|
3106
|
+
children: [{
|
|
3107
|
+
id: 21,
|
|
3108
|
+
date: '2016-05-02',
|
|
3109
|
+
name: 'Tom21',
|
|
3110
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
3111
|
+
tag: 'Office',
|
|
3112
|
+
}, {
|
|
3113
|
+
id: 22,
|
|
3114
|
+
date: '2016-05-02',
|
|
3115
|
+
name: 'Tom22',
|
|
3116
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
3117
|
+
tag: 'Office',
|
|
3118
|
+
}]
|
|
3111
3119
|
},
|
|
3112
3120
|
{
|
|
3113
3121
|
id: 3,
|
|
3114
3122
|
date: '2016-05-04',
|
|
3115
|
-
name: '
|
|
3123
|
+
name: 'Tom3',
|
|
3116
3124
|
address: 'No. 189, Grove St, Los Angeles',
|
|
3117
3125
|
tag: 'Home'
|
|
3118
3126
|
},
|
|
3119
3127
|
{
|
|
3120
3128
|
id: 4,
|
|
3121
3129
|
date: '2016-05-01',
|
|
3122
|
-
name: '
|
|
3130
|
+
name: 'Tom4',
|
|
3123
3131
|
address: 'No. 189, Grove St, Los Angeles',
|
|
3124
3132
|
tag: 'Office'
|
|
3125
3133
|
}
|
package/attributes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"m-dialog/modelValue":{"type":"boolean","description":""},"m-dialog/width":{"type":"string | number","description":"对话框的宽度,默认值为 50%"},"m-dialog/resize":{"type":"boolean","description":"是否开启拖拽改变大小"},"m-dialog/draggable":{"type":"boolean","description":"是否可拖动"},"m-dialog/resized":{"type":"[contentsSize: { width: number, height: number }]","description":"窗口大小改变完成事件"},"m-inline/minWidth":{"type":"number","description":"列最小宽度"},"m-inline/maxWidth":{"type":"number","description":"列最大宽度"},"m-inline/size":{"type":"Size","description":"组件尺寸"},"m-inline/switch":{"type":"[status: boolean]","description":"切换折叠展开事件"},"m-input-number/modelValue":{"type":"string | number","description":""},"m-input-number/placeholder":{"type":"string","description":""},"m-input-number/disabled":{"type":"boolean","description":"是否禁用数值输入框"},"m-input-number/size":{"type":"string","description":"数值输入框尺寸"},"m-input-number/min":{"type":"number","description":"设置数值输入框允许的最小值"},"m-input-number/max":{"type":"number","description":"设置数值输入框允许的最大值"},"m-input-number/step":{"type":"number","description":"数值输入框步长"},"m-input-number/stepStrictly":{"type":"boolean","description":"是否只能输入 step 的倍数"},"m-input-number/thousandthPlace":{"type":"boolean","description":"输入框是否显示千分位"},"m-input-number/noBorder":{"type":"boolean","description":"是否不要边框"},"m-input-number/noSpacing":{"type":"boolean","description":"不要边距"},"m-input-number/update:modelValue":{"type":"any","description":""},"m-input-number/change":{"type":"any","description":""},"m-input-number/focus":{"type":"any","description":""},"m-input-number/blur":{"type":"any","description":""},"m-select/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select/multiple":{"type":"boolean","description":"多选"},"m-select-table/modelValue":{"type":"string | number | Array<number | string>","description":""},"m-select-table/name":{"type":"string | number | Array<number | string>","description":"显示值"},"m-select-table/placeholder":{"type":"string","description":""},"m-select-table/disabled":{"type":"boolean","description":""},"m-select-table/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table/total":{"type":"number | null","description":"总数据量,当有值时,出现分页器"},"m-select-table/filterMethod":{"type":"Function | null","description":"自定义搜索"},"m-select-table/filterable":{"type":"boolean","description":"是否使用搜索"},"m-select-table/remote":{"type":"boolean","description":"是否使用 远程搜索"},"m-select-table/remoteMethod":{"type":"Function","description":"自定义远程搜索"},"m-select-table/options":{"type":"Option[]","description":""},"m-select-table/tableTitle":{"type":"TableTitle[]","description":""},"m-select-table/multiple":{"type":"boolean","description":"是否多选"},"m-select-table/keywords":{"type":"Option","description":"定义默认的 label 和value"},"m-select-table/reserveSelection":{"type":"boolean","description":"是否开启翻页多选"},"m-select-table/tableHeight":{"type":"string | number","description":""},"m-select-table/isAffirmBtn":{"type":"boolean","description":"是否有确认按钮"},"m-select-table/scrollbarAlwaysOn":{"type":"boolean","description":"是否常态显示滚动条"},"m-select-table/allowCreate":{"type":"boolean","description":"是否能够创建条目"},"m-select-table/border":{"type":"boolean","description":"表格边框"},"m-select-table/popupWidth":{"type":"number | string","description":"弹窗的宽度"},"m-select-table/selected":{"type":"[values: string | number | Array<string | number>, rows: Option[] | Option]","description":"单选或多选之后的回调"},"m-select-table/selectMultiple":{"type":"[values: Array<string | number>, rows: Option[]]","description":"多选确认按钮时的回调 配合isAffirmBtn使用"},"m-select-table/toPage":{"type":"[page: Page, query?: string]","description":"当没有使用filterMethod时候才会有回调否则没有"},"m-select-table/update:modelValue":{"type":"[value: string | number | Array<string | number>]","description":""},"m-select-table/clear":{"type":"[]","description":"用户点击清空按钮时触发"},"m-select-table/removeTag":{"type":"[tag: any]","description":"多选模式下移除tag时触发"},"m-select-table-v1/modelValue":{"type":"string | number","description":""},"m-select-table-v1/placeholder":{"type":"string","description":""},"m-select-table-v1/disabled":{"type":"boolean","description":""},"m-select-table-v1/options":{"type":"Option[]","description":""},"m-select-table-v1/tableTitle":{"type":"any[]","description":""},"m-select-table-v1/remoteMethod":{"type":"Function","description":""},"m-select-table-v1/allowCreate":{"type":"boolean","description":""},"m-select-table-v1/focusShow":{"type":"boolean","description":""},"m-select-table-v1/isSelect":{"type":"boolean","description":""},"m-select-table-v1/clearable":{"type":"boolean","description":""},"m-select-table-v1/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table-v1/labelKey":{"type":"string","description":""},"m-select-table-v1/scrollbarAlwaysOn":{"type":"boolean","description":""},"m-select-table-v1/total":{"type":"number | null","description":""},"m-select-table-v1/update:modelValue":{"type":"any","description":""},"m-select-table-v1/selectMultiple":{"type":"any","description":""},"m-select-table-v1/change":{"type":"any","description":""},"m-select-table-v1/selected":{"type":"any","description":""},"m-select-table-v1/clear":{"type":"any","description":""},"m-select-v2/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select-v2/multiple":{"type":"boolean","description":"多选"},"m-select-v2/showAll":{"type":"boolean","description":"是否显示全选"},"m-select-v2/options":{"type":"Option[]","description":"选项"},"m-select-v2/update:modelValue":{"type":"[data: any]","description":""},"m-table/size":{"type":"'small' | 'large' | ''","description":""},"m-table/sole":{"type":"string","description":""},"m-table/data":{"type":"Array<{\n [key: string]:
|
|
1
|
+
{"m-dialog/modelValue":{"type":"boolean","description":""},"m-dialog/width":{"type":"string | number","description":"对话框的宽度,默认值为 50%"},"m-dialog/resize":{"type":"boolean","description":"是否开启拖拽改变大小"},"m-dialog/draggable":{"type":"boolean","description":"是否可拖动"},"m-dialog/resized":{"type":"[contentsSize: { width: number, height: number }]","description":"窗口大小改变完成事件"},"m-inline/minWidth":{"type":"number","description":"列最小宽度"},"m-inline/maxWidth":{"type":"number","description":"列最大宽度"},"m-inline/size":{"type":"Size","description":"组件尺寸"},"m-inline/switch":{"type":"[status: boolean]","description":"切换折叠展开事件"},"m-input-number/modelValue":{"type":"string | number","description":""},"m-input-number/placeholder":{"type":"string","description":""},"m-input-number/disabled":{"type":"boolean","description":"是否禁用数值输入框"},"m-input-number/size":{"type":"string","description":"数值输入框尺寸"},"m-input-number/min":{"type":"number","description":"设置数值输入框允许的最小值"},"m-input-number/max":{"type":"number","description":"设置数值输入框允许的最大值"},"m-input-number/step":{"type":"number","description":"数值输入框步长"},"m-input-number/stepStrictly":{"type":"boolean","description":"是否只能输入 step 的倍数"},"m-input-number/thousandthPlace":{"type":"boolean","description":"输入框是否显示千分位"},"m-input-number/noBorder":{"type":"boolean","description":"是否不要边框"},"m-input-number/noSpacing":{"type":"boolean","description":"不要边距"},"m-input-number/update:modelValue":{"type":"any","description":""},"m-input-number/change":{"type":"any","description":""},"m-input-number/focus":{"type":"any","description":""},"m-input-number/blur":{"type":"any","description":""},"m-select/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select/multiple":{"type":"boolean","description":"多选"},"m-select-table/modelValue":{"type":"string | number | Array<number | string>","description":""},"m-select-table/name":{"type":"string | number | Array<number | string>","description":"显示值"},"m-select-table/placeholder":{"type":"string","description":""},"m-select-table/disabled":{"type":"boolean","description":""},"m-select-table/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table/total":{"type":"number | null","description":"总数据量,当有值时,出现分页器"},"m-select-table/filterMethod":{"type":"Function | null","description":"自定义搜索"},"m-select-table/filterable":{"type":"boolean","description":"是否使用搜索"},"m-select-table/remote":{"type":"boolean","description":"是否使用 远程搜索"},"m-select-table/remoteMethod":{"type":"Function","description":"自定义远程搜索"},"m-select-table/options":{"type":"Option[]","description":""},"m-select-table/tableTitle":{"type":"TableTitle[]","description":""},"m-select-table/multiple":{"type":"boolean","description":"是否多选"},"m-select-table/keywords":{"type":"Option","description":"定义默认的 label 和value"},"m-select-table/reserveSelection":{"type":"boolean","description":"是否开启翻页多选"},"m-select-table/tableHeight":{"type":"string | number","description":""},"m-select-table/isAffirmBtn":{"type":"boolean","description":"是否有确认按钮"},"m-select-table/scrollbarAlwaysOn":{"type":"boolean","description":"是否常态显示滚动条"},"m-select-table/allowCreate":{"type":"boolean","description":"是否能够创建条目"},"m-select-table/border":{"type":"boolean","description":"表格边框"},"m-select-table/popupWidth":{"type":"number | string","description":"弹窗的宽度"},"m-select-table/selected":{"type":"[values: string | number | Array<string | number>, rows: Option[] | Option]","description":"单选或多选之后的回调"},"m-select-table/selectMultiple":{"type":"[values: Array<string | number>, rows: Option[]]","description":"多选确认按钮时的回调 配合isAffirmBtn使用"},"m-select-table/toPage":{"type":"[page: Page, query?: string]","description":"当没有使用filterMethod时候才会有回调否则没有"},"m-select-table/update:modelValue":{"type":"[value: string | number | Array<string | number>]","description":""},"m-select-table/clear":{"type":"[]","description":"用户点击清空按钮时触发"},"m-select-table/removeTag":{"type":"[tag: any]","description":"多选模式下移除tag时触发"},"m-select-table-v1/modelValue":{"type":"string | number","description":""},"m-select-table-v1/placeholder":{"type":"string","description":""},"m-select-table-v1/disabled":{"type":"boolean","description":""},"m-select-table-v1/options":{"type":"Option[]","description":""},"m-select-table-v1/tableTitle":{"type":"any[]","description":""},"m-select-table-v1/remoteMethod":{"type":"Function","description":""},"m-select-table-v1/allowCreate":{"type":"boolean","description":""},"m-select-table-v1/focusShow":{"type":"boolean","description":""},"m-select-table-v1/isSelect":{"type":"boolean","description":""},"m-select-table-v1/clearable":{"type":"boolean","description":""},"m-select-table-v1/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table-v1/labelKey":{"type":"string","description":""},"m-select-table-v1/scrollbarAlwaysOn":{"type":"boolean","description":""},"m-select-table-v1/total":{"type":"number | null","description":""},"m-select-table-v1/update:modelValue":{"type":"any","description":""},"m-select-table-v1/selectMultiple":{"type":"any","description":""},"m-select-table-v1/change":{"type":"any","description":""},"m-select-table-v1/selected":{"type":"any","description":""},"m-select-table-v1/clear":{"type":"any","description":""},"m-select-v2/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select-v2/multiple":{"type":"boolean","description":"多选"},"m-select-v2/showAll":{"type":"boolean","description":"是否显示全选"},"m-select-v2/options":{"type":"Option[]","description":"选项"},"m-select-v2/update:modelValue":{"type":"[data: any]","description":""},"m-table/size":{"type":"'small' | 'large' | ''","description":""},"m-table/sole":{"type":"string","description":""},"m-table/data":{"type":"Array<{\n [key: string]: any\n }>","description":""},"m-table/filtersValue":{"type":"FilterValue","description":""},"m-table/tableConfig":{"type":"TableConfig | null","description":"表格配置"},"m-table/expandProp":{"type":"string","description":"展开图标列(如使用这个属性则必须存在rowKey属性,并且expand列必须为第一列) (标记,约束条件后面解决)"},"m-table/expandRowKeys":{"type":"any[]","description":"可以通过该属性设置 Table 目前的展开行,需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。"},"m-table/rowKey":{"type":"Function | string","description":"行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function。"},"m-table/pasteData":{"type":"[data: {\n /** 粘贴行的行数据 */\n editRow: { [key: string]: any },\n /** 粘贴列的列名 */\n editColumn: string,\n /** 粘贴的数据 */\n arr: Array<string | number>,\n /** 起始行 */\n rowIndex: number,\n },\n /** 粘贴完成后的表格数据 */\n tableData: Array<{ [key: string]: any\n }>]","description":""},"m-table/update:tableConfig":{"type":"[tableConfig: TableConfig]","description":""},"m-table-column/filtersValue":{"type":"FilterValue","description":"过滤值"},"m-table-column/filters":{"type":"Array<{ text: string | number, value: string | number }>","description":"过滤选项"},"m-table-column/filterMethod":{"type":"Function | null","description":"过滤方法"},"m-table-column/children":{"type":"Array<PropChildren>","description":""},"m-table-column/update:filtersValue":{"type":"any","description":""},"m-table-column-set/modelValue":{"type":"TableConfig","description":"配置"},"m-table-column-set/foldMode":{"type":"boolean","description":"是否为折叠模式"},"m-table-column-set/link":{"type":"boolean","description":"是否为链接按钮"},"m-table-column-set/update:modelValue":{"type":"any","description":""},"m-table-column-set/change":{"type":"any","description":""},"skin-config/change":{"type":"any","description":""},"tab-page/modelValue":{"type":"MenuItem[]","description":""},"tab-page/activeKey":{"type":"string","description":""},"tab-page/showRightClickMenu":{"type":"boolean","description":""},"tab-page/primaryColor":{"type":"string","description":""},"tab-page/primaryBackgroundColor":{"type":"string | null","description":""},"tab-page/close":{"type":"any","description":""},"tab-page/click":{"type":"any","description":""}}
|