br-dionysus 1.6.3 → 1.6.5

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 CHANGED
@@ -477,7 +477,6 @@ const options: Option[] = [{
477
477
  multiple
478
478
  border
479
479
  :remoteMethod="remoteMethod"
480
- @clear="test"
481
480
  ></m-select-table>
482
481
  <p>单选</p>
483
482
  <p>第三个择器的值: {{ code3 }}</p>
@@ -519,10 +518,6 @@ const options: Option[] = [{
519
518
  import { ref, onMounted } from 'vue'
520
519
  import { Page } from 'packages/typings/class'
521
520
 
522
- const test = () => {
523
- console.log('xxx')
524
- }
525
-
526
521
  const commodityOptionsTitle: TableTitle[] = [{
527
522
  prop: 'PRDocType',
528
523
  label: '单据类型'
@@ -927,34 +922,37 @@ const options: Option[] = [{
927
922
 
928
923
  <template>
929
924
  <div class="g-box">
925
+ <p>{{ tableConfig }}</p>
930
926
  <MTable
927
+ class="style.box"
931
928
  :data="tableData"
932
- @pasteData="pasteData"
933
- sole="date"
929
+ border
930
+ @headerDragend="headerDragend"
931
+ :filtersValue="filtersValue"
932
+ scrollbarAlwaysOn
934
933
  v-model:tableConfig="tableConfig"
935
934
  >
936
- <el-table-column
937
- label="Date"
938
- prop="date"
935
+ <MTableColumn
936
+ v-for="item in tableTitle"
937
+ :key="item.prop"
938
+ :prop="item.prop"
939
+ :label="item.label"
940
+ :align="item.align"
941
+ :minWidth="item.minWidth"
942
+ :className="item.className"
943
+ :filters="item.filters"
944
+ :headerAlign="item.headerAlign"
945
+ :fixed="item.fixed"
946
+ v-model:filtersValue="filtersValue"
947
+ showOverflowTooltip
939
948
  />
940
- <el-table-column
941
- prop="address"
942
- label="Address"
943
- ></el-table-column>
944
- <el-table-column
945
- prop="name"
946
- label="name"
947
- >
948
- <template #default="scope">
949
- <el-input v-model="scope.row.name"></el-input>
950
- </template>
951
- </el-table-column>
952
949
  </MTable>
953
950
  </div>
954
951
  </template>
955
952
 
956
953
  <script setup lang="ts">
957
954
  import { ref } from 'vue'
955
+ import { useTableConfig } from 'packages/index'
958
956
 
959
957
  interface User {
960
958
  date: string;
@@ -963,9 +961,22 @@ interface User {
963
961
  tag: string;
964
962
  }
965
963
 
966
- const tableConfig = ref<any>({})
964
+ const tableData = ref<User[]>([])
965
+ const { tableTitle, headerDragend, tableConfig, filtersValue }= useTableConfig('MTableDemo', [{
966
+ label: 'Date',
967
+ prop: 'date',
968
+ minWidth: 200
969
+ }, {
970
+ label: 'Address',
971
+ prop: 'address',
972
+ minWidth: 200
973
+ }, {
974
+ label: 'name',
975
+ prop: 'name',
976
+ minWidth: 200
977
+ }], tableData)
967
978
 
968
- const tableData = ref(<User[]>[
979
+ tableData.value = [
969
980
  {
970
981
  date: '2016-05-03',
971
982
  name: 'Tom',
@@ -990,7 +1001,7 @@ const tableData = ref(<User[]>[
990
1001
  address: 'No. 189, Grove St, Los Angeles',
991
1002
  tag: 'Office'
992
1003
  }
993
- ])
1004
+ ]
994
1005
 
995
1006
  const pasteData = (obj: any, data: any) => {
996
1007
  tableData.value = data
@@ -2556,7 +2567,6 @@ const options: Option[] = [{
2556
2567
  multiple
2557
2568
  border
2558
2569
  :remoteMethod="remoteMethod"
2559
- @clear="test"
2560
2570
  ></m-select-table>
2561
2571
  <p>单选</p>
2562
2572
  <p>第三个择器的值: {{ code3 }}</p>
@@ -2598,10 +2608,6 @@ const options: Option[] = [{
2598
2608
  import { ref, onMounted } from 'vue'
2599
2609
  import { Page } from 'packages/typings/class'
2600
2610
 
2601
- const test = () => {
2602
- console.log('xxx')
2603
- }
2604
-
2605
2611
  const commodityOptionsTitle: TableTitle[] = [{
2606
2612
  prop: 'PRDocType',
2607
2613
  label: '单据类型'
@@ -3006,34 +3012,37 @@ const options: Option[] = [{
3006
3012
 
3007
3013
  <template>
3008
3014
  <div class="g-box">
3015
+ <p>{{ tableConfig }}</p>
3009
3016
  <MTable
3017
+ class="style.box"
3010
3018
  :data="tableData"
3011
- @pasteData="pasteData"
3012
- sole="date"
3019
+ border
3020
+ @headerDragend="headerDragend"
3021
+ :filtersValue="filtersValue"
3022
+ scrollbarAlwaysOn
3013
3023
  v-model:tableConfig="tableConfig"
3014
3024
  >
3015
- <el-table-column
3016
- label="Date"
3017
- prop="date"
3025
+ <MTableColumn
3026
+ v-for="item in tableTitle"
3027
+ :key="item.prop"
3028
+ :prop="item.prop"
3029
+ :label="item.label"
3030
+ :align="item.align"
3031
+ :minWidth="item.minWidth"
3032
+ :className="item.className"
3033
+ :filters="item.filters"
3034
+ :headerAlign="item.headerAlign"
3035
+ :fixed="item.fixed"
3036
+ v-model:filtersValue="filtersValue"
3037
+ showOverflowTooltip
3018
3038
  />
3019
- <el-table-column
3020
- prop="address"
3021
- label="Address"
3022
- ></el-table-column>
3023
- <el-table-column
3024
- prop="name"
3025
- label="name"
3026
- >
3027
- <template #default="scope">
3028
- <el-input v-model="scope.row.name"></el-input>
3029
- </template>
3030
- </el-table-column>
3031
3039
  </MTable>
3032
3040
  </div>
3033
3041
  </template>
3034
3042
 
3035
3043
  <script setup lang="ts">
3036
3044
  import { ref } from 'vue'
3045
+ import { useTableConfig } from 'packages/index'
3037
3046
 
3038
3047
  interface User {
3039
3048
  date: string;
@@ -3042,9 +3051,22 @@ interface User {
3042
3051
  tag: string;
3043
3052
  }
3044
3053
 
3045
- const tableConfig = ref<any>({})
3054
+ const tableData = ref<User[]>([])
3055
+ const { tableTitle, headerDragend, tableConfig, filtersValue }= useTableConfig('MTableDemo', [{
3056
+ label: 'Date',
3057
+ prop: 'date',
3058
+ minWidth: 200
3059
+ }, {
3060
+ label: 'Address',
3061
+ prop: 'address',
3062
+ minWidth: 200
3063
+ }, {
3064
+ label: 'name',
3065
+ prop: 'name',
3066
+ minWidth: 200
3067
+ }], tableData)
3046
3068
 
3047
- const tableData = ref(<User[]>[
3069
+ tableData.value = [
3048
3070
  {
3049
3071
  date: '2016-05-03',
3050
3072
  name: 'Tom',
@@ -3069,7 +3091,7 @@ const tableData = ref(<User[]>[
3069
3091
  address: 'No. 189, Grove St, Los Angeles',
3070
3092
  tag: 'Office'
3071
3093
  }
3072
- ])
3094
+ ]
3073
3095
 
3074
3096
  const pasteData = (obj: any, data: any) => {
3075
3097
  tableData.value = data
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/sole":{"type":"string","description":""},"m-table/data":{"type":"Array<{\n [key: string]: string | number\n }>","description":""},"m-table/filtersValue":{"type":"FilterValue","description":""},"m-table/tableConfig":{"type":"TableConfig | null","description":"表格配置"},"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":""}}
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]: string | number\n }>","description":""},"m-table/filtersValue":{"type":"FilterValue","description":""},"m-table/tableConfig":{"type":"TableConfig | null","description":"表格配置"},"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":""}}