br-dionysus 1.0.19 → 1.1.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 CHANGED
@@ -51,8 +51,19 @@
51
51
  draggable
52
52
  title="这是标题"
53
53
  resize
54
+ @resized="test"
55
+ @opened="opened"
54
56
  >
55
- <span>这是一条消息</span>
57
+ <div class="u-box j-box">
58
+ <p
59
+ class="u-table j-table"
60
+ :style="'height: ' + height + 'px'"
61
+ >
62
+ 这是一条消息{{ height }}
63
+ </p>
64
+ <div>这是干扰元素</div>
65
+ <div class="u-pa">这是绝对<br/>定位元素</div>
66
+ </div>
56
67
  <template #footer>
57
68
  <div class="dialog-footer">
58
69
  <el-button @click="dialogVisible = false">取消</el-button>
@@ -68,12 +79,40 @@
68
79
  <script setup lang="ts">
69
80
  import { ref } from 'vue'
70
81
  import { MDialog } from 'packages/MDialog'
82
+ import { useRemainingSpace } from 'packages/index'
71
83
 
72
84
  const dialogVisible = ref<boolean>(false)
85
+
86
+ const test = (size: { width: number, height: number }) => {
87
+ // console.log('size', size)
88
+ }
89
+
90
+ const { height, init } = useRemainingSpace('j-box', 'j-table')
91
+ const opened = () => {
92
+ init()
93
+ }
73
94
  </script>
74
95
 
75
96
  <style scoped lang="scss">
97
+ .u-box {
98
+ //position: relative;
99
+ display: flex;
100
+ width: 100%;
101
+ height: 100%;
102
+ border: 1px solid #000;
103
+ flex-direction: column;
104
+
105
+ .u-table {
106
+ border: 1px solid red;
107
+ box-sizing: border-box;
108
+ }
76
109
 
110
+ .u-pa {
111
+ position: absolute;
112
+ bottom: 0;
113
+ right: 0;
114
+ }
115
+ }
77
116
  </style>
78
117
 
79
118
 
@@ -88,9 +127,10 @@ const dialogVisible = ref<boolean>(false)
88
127
 
89
128
  ### 2) Events
90
129
 
91
- | 方法名 | 说明 | 参数 |
92
- |------|:-------------:|:-----------------------------------------------:|
93
- | 其余参数 | 参考el官网的dialog | https://element-plus.org/zh-CN/component/dialog |
130
+ | 方法名 | 说明 | 参数 |
131
+ |---------|:-------------:|:------------------------------------------------------:|
132
+ | resized | 窗口大小改变完成事件 | (contentsSize: { width: number, height: number })内容物大小 |
133
+ | 其余参数 | 参考el官网的dialog | https://element-plus.org/zh-CN/component/dialog |
94
134
 
95
135
 
96
136
 
@@ -886,11 +926,11 @@ const options: Option[] = [{
886
926
  <template>
887
927
  <div>
888
928
  <MTable :data="tableData" @pasteData="pasteData" sole="date">
889
- <el-table-column label="Date" prop="date" />
890
- <el-table-column prop="address" label="Address"> </el-table-column>
929
+ <el-table-column label="Date" prop="date"/>
930
+ <el-table-column prop="address" label="Address"></el-table-column>
891
931
  <el-table-column prop="name" label="name">
892
932
  <template #default="scope">
893
- <el-input v-model="scope.row.name"> </el-input>
933
+ <el-input v-model="scope.row.name"></el-input>
894
934
  </template>
895
935
  </el-table-column>
896
936
  </MTable>
@@ -898,43 +938,44 @@ const options: Option[] = [{
898
938
  </template>
899
939
 
900
940
  <script setup lang="ts">
901
- import { ref } from "vue";
941
+ import { ref } from 'vue'
942
+
902
943
  interface User {
903
944
  date: string;
904
945
  name: string;
905
946
  address: string;
906
947
  tag: string;
907
948
  }
949
+
908
950
  const tableData = ref(<User[]>[
909
951
  {
910
- date: "2016-05-03",
911
- name: "Tom",
912
- address: "No. 189, Grove St, Los Angeles",
913
- tag: "Home",
952
+ date: '2016-05-03',
953
+ name: 'Tom',
954
+ address: 'No. 189, Grove St, Los Angeles',
955
+ tag: 'Home'
914
956
  },
915
957
  {
916
- date: "2016-05-02",
917
- name: "Tom",
918
- address: "No. 189, Grove St, Los Angeles",
919
- tag: "Office",
958
+ date: '2016-05-02',
959
+ name: 'Tom',
960
+ address: 'No. 189, Grove St, Los Angeles',
961
+ tag: 'Office'
920
962
  },
921
963
  {
922
- date: "2016-05-04",
923
- name: "Tom",
924
- address: "No. 189, Grove St, Los Angeles",
925
- tag: "Home",
964
+ date: '2016-05-04',
965
+ name: 'Tom',
966
+ address: 'No. 189, Grove St, Los Angeles',
967
+ tag: 'Home'
926
968
  },
927
969
  {
928
- date: "2016-05-01",
929
- name: "Tom",
930
- address: "No. 189, Grove St, Los Angeles",
931
- tag: "Office",
932
- },
970
+ date: '2016-05-01',
971
+ name: 'Tom',
972
+ address: 'No. 189, Grove St, Los Angeles',
973
+ tag: 'Office'
974
+ }
933
975
  ])
934
976
 
935
977
  const pasteData = (obj: any, data: any) => {
936
978
  tableData.value = data
937
-
938
979
  }
939
980
  </script>
940
981
 
@@ -1941,6 +1982,7 @@ const list = ref<{ name: string, className: string }[]>([
1941
1982
  |--------------|--------------------------------|-------------|
1942
1983
  | height | 计算之后的高度 | ref<number> |
1943
1984
  | tableCovered | 重新进行计算高度 (如弹窗表 抽屉表 等默认无DOM时使用) | function |
1985
+ | tableCovered | 重新初始化 (如弹窗表 抽屉表 等默认无DOM时使用) | function |
1944
1986
 
1945
1987
 
1946
1988
 
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-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","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":"any[]","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":"any","description":""},"m-select-table/selectMultiple":{"type":"any","description":""},"m-select-table/toPage":{"type":"[page: Page, query?: string]","description":"当没有使用filterMethod时候才会有回调否则没有"},"m-select-table/update:modelValue":{"type":"any","description":""},"m-select-table/clear":{"type":"any","description":""},"m-select-table/removeTag":{"type":"[tag: any]","description":"多选模式下移除tag时触发"},"m-select-table/focusShow":{"type":"boolean","description":""},"m-select-table/isSelect":{"type":"boolean","description":""},"m-select-table/clearable":{"type":"boolean","description":""},"m-select-table/labelKey":{"type":"string","description":""},"m-select-table/change":{"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/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-column/filtersValue":{"type":"FilterValue","description":""},"m-table-column/filters":{"type":"Array<{ text: string | number, value: string | number }>","description":""},"m-table-column/filterMethod":{"type":"Function","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":""},"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","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":"any[]","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":"any","description":""},"m-select-table/selectMultiple":{"type":"any","description":""},"m-select-table/toPage":{"type":"[page: Page, query?: string]","description":"当没有使用filterMethod时候才会有回调否则没有"},"m-select-table/update:modelValue":{"type":"any","description":""},"m-select-table/clear":{"type":"any","description":""},"m-select-table/removeTag":{"type":"[tag: any]","description":"多选模式下移除tag时触发"},"m-select-table/focusShow":{"type":"boolean","description":""},"m-select-table/isSelect":{"type":"boolean","description":""},"m-select-table/clearable":{"type":"boolean","description":""},"m-select-table/labelKey":{"type":"string","description":""},"m-select-table/change":{"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/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-column/filtersValue":{"type":"FilterValue","description":""},"m-table-column/filters":{"type":"Array<{ text: string | number, value: string | number }>","description":""},"m-table-column/filterMethod":{"type":"Function","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":""},"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":""}}