@fangzhongya/fang-ui 0.1.5 → 0.1.7

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.
@@ -98,7 +98,7 @@ function comHandle(props2, obj) {
98
98
  } else {
99
99
  let list = props2.value || {};
100
100
  if (props2.onRequestAfter) {
101
- list = props2.onRequestAfter(list, obj) || {};
101
+ list = props2.onRequestAfter(list, obj, true) || {};
102
102
  }
103
103
  resolve(list);
104
104
  }
@@ -96,7 +96,7 @@ function comHandle(props2, obj) {
96
96
  } else {
97
97
  let list = props2.value || {};
98
98
  if (props2.onRequestAfter) {
99
- list = props2.onRequestAfter(list, obj) || {};
99
+ list = props2.onRequestAfter(list, obj, true) || {};
100
100
  }
101
101
  resolve(list);
102
102
  }
@@ -57,9 +57,6 @@
57
57
  .list-div .list-table.center .list-table-th {
58
58
  text-align: center;
59
59
  }
60
- .list-div .list-table.auto .list-table-th {
61
- padding-right: 0;
62
- }
63
60
  .list-div .list-table.top .list-table-th {
64
61
  padding-bottom: 0;
65
62
  }
@@ -61,11 +61,11 @@ $list: 'list';
61
61
  }
62
62
  }
63
63
 
64
- &.auto {
65
- .#{z($list, 'table-th')} {
66
- padding-right: 0;
67
- }
68
- }
64
+ // &.auto {
65
+ // .#{z($list, 'table-th')} {
66
+ // padding-right: 0;
67
+ // }
68
+ // }
69
69
  &.top {
70
70
  .#{z($list, 'table-th')} {
71
71
  padding-bottom: 0;
@@ -14,6 +14,8 @@
14
14
 
15
15
  .no-data {
16
16
  text-align: center;
17
- margin-top: 20px;
17
+ display: inline-flex;
18
+ align-items: center;
19
+ justify-content: center;
18
20
  color: #999;
19
21
  }
@@ -3,6 +3,8 @@
3
3
  $no-data: 'no-data';
4
4
  @include b($no-data) {
5
5
  text-align: center;
6
- margin-top: 20px;
6
+ display: inline-flex;
7
+ align-items: center;
8
+ justify-content: center;
7
9
  color: #999;
8
10
  }
@@ -669,9 +669,6 @@
669
669
  .list-div .list-table.center .list-table-th {
670
670
  text-align: center;
671
671
  }
672
- .list-div .list-table.auto .list-table-th {
673
- padding-right: 0;
674
- }
675
672
  .list-div .list-table.top .list-table-th {
676
673
  padding-bottom: 0;
677
674
  }
@@ -717,7 +714,7 @@
717
714
 
718
715
  .tables {
719
716
  width: 100%;
720
- min-height: 160px;
717
+ min-height: var(--tables-min-height, 70px);
721
718
  position: relative;
722
719
  flex: 1;
723
720
  display: flex;
@@ -562,7 +562,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
562
562
  return obj;
563
563
  }
564
564
  }
565
- function inDataFilter(data2, obj) {
565
+ function inDataFilter(data2, obj, isValue) {
566
566
  var _a2, _b2;
567
567
  let after = props2.onRequestAfter;
568
568
  let ajaxData = {};
@@ -575,7 +575,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
575
575
  } else {
576
576
  const l = (ajaxData == null ? void 0 : ajaxData.list) ?? mpagconfig.data.list;
577
577
  const t = (ajaxData == null ? void 0 : ajaxData.total) ?? mpagconfig.data.total;
578
- const list = objValue.getObjValue(l, data2) ?? data2;
578
+ const list = objValue.getObjValue(l, data2) ?? (isValue ? data2 : []);
579
579
  const total = t == "" ? list.length : objValue.getObjValue(t, data2);
580
580
  return {
581
581
  list,
@@ -560,7 +560,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
560
560
  return obj;
561
561
  }
562
562
  }
563
- function inDataFilter(data2, obj) {
563
+ function inDataFilter(data2, obj, isValue) {
564
564
  var _a2, _b2;
565
565
  let after = props2.onRequestAfter;
566
566
  let ajaxData = {};
@@ -573,7 +573,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
573
573
  } else {
574
574
  const l = (ajaxData == null ? void 0 : ajaxData.list) ?? mpagconfig.data.list;
575
575
  const t = (ajaxData == null ? void 0 : ajaxData.total) ?? mpagconfig.data.total;
576
- const list = getObjValue(l, data2) ?? data2;
576
+ const list = getObjValue(l, data2) ?? (isValue ? data2 : []);
577
577
  const total = t == "" ? list.length : getObjValue(t, data2);
578
578
  return {
579
579
  list,
@@ -14,7 +14,7 @@
14
14
 
15
15
  .tables {
16
16
  width: 100%;
17
- min-height: 160px;
17
+ min-height: var(--tables-min-height, 70px);
18
18
  position: relative;
19
19
  flex: 1;
20
20
  display: flex;
@@ -4,7 +4,7 @@ $tables: 'tables';
4
4
  @include b($tables) {
5
5
  // height: 100%;
6
6
  width: 100%;
7
- min-height: 160px;
7
+ min-height: var(vdm('min-height', $tables), 70px);
8
8
  position: relative;
9
9
  flex: 1;
10
10
  display: flex;
@@ -19,6 +19,20 @@ const dataProps = {
19
19
  return "auto";
20
20
  }
21
21
  },
22
+ /**
23
+ * @props { String, Number } maxHeight
24
+ * 最大高度 设置了最大高度 height 值将无效化
25
+ */
26
+ maxHeight: {
27
+ type: String
28
+ },
29
+ /**
30
+ * @props { String, Number } minHeight
31
+ * 最小高度
32
+ */
33
+ minHeight: {
34
+ type: String
35
+ },
22
36
  /**
23
37
  * 加载中
24
38
  */
@@ -24,6 +24,20 @@ export declare const dataProps: {
24
24
  type: (StringConstructor | NumberConstructor)[];
25
25
  default(): string;
26
26
  };
27
+ /**
28
+ * @props { String, Number } maxHeight
29
+ * 最大高度 设置了最大高度 height 值将无效化
30
+ */
31
+ maxHeight: {
32
+ type: StringConstructor;
33
+ };
34
+ /**
35
+ * @props { String, Number } minHeight
36
+ * 最小高度
37
+ */
38
+ minHeight: {
39
+ type: StringConstructor;
40
+ };
27
41
  /**
28
42
  * 加载中
29
43
  */
@@ -17,6 +17,20 @@ const dataProps = {
17
17
  return "auto";
18
18
  }
19
19
  },
20
+ /**
21
+ * @props { String, Number } maxHeight
22
+ * 最大高度 设置了最大高度 height 值将无效化
23
+ */
24
+ maxHeight: {
25
+ type: String
26
+ },
27
+ /**
28
+ * @props { String, Number } minHeight
29
+ * 最小高度
30
+ */
31
+ minHeight: {
32
+ type: String
33
+ },
20
34
  /**
21
35
  * 加载中
22
36
  */
@@ -131,7 +131,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
131
131
  }, vue.unref(attrs).root, {
132
132
  style: vue.unref(cs).vdo({
133
133
  interval: _ctx.interval,
134
- intervalHorizon: _ctx.intervalHorizon
134
+ intervalHorizon: _ctx.intervalHorizon,
135
+ minHeight: _ctx.minHeight
135
136
  })
136
137
  }), [
137
138
  vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$2.Table), vue.mergeProps(vue.unref(attrs).assem, {
@@ -139,7 +140,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
139
140
  ref_key: "tableRef",
140
141
  ref: tableRef,
141
142
  class: [vue.unref(cs).z("table"), vue.unref(cs).is("absolute", props.adaptive)],
142
- height: props.height,
143
+ height: props.maxHeight ? "" : props.height,
144
+ "max-height": props.maxHeight,
143
145
  "scroll-selector": ".el-scrollbar .el-scrollbar__wrap",
144
146
  "row-style": rowStyle.value,
145
147
  data: props.value,
@@ -175,7 +177,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
175
177
  ]), 1032, ["table", "value", "list", "options"])
176
178
  ]),
177
179
  _: 3
178
- }, 16, ["class", "height", "row-style", "data", "default-sort"])), [
180
+ }, 16, ["class", "height", "max-height", "row-style", "data", "default-sort"])), [
179
181
  [vue.unref(index$4.vLoading), props.loading]
180
182
  ])
181
183
  ], 16);
@@ -129,7 +129,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
129
129
  }, unref(attrs).root, {
130
130
  style: unref(cs).vdo({
131
131
  interval: _ctx.interval,
132
- intervalHorizon: _ctx.intervalHorizon
132
+ intervalHorizon: _ctx.intervalHorizon,
133
+ minHeight: _ctx.minHeight
133
134
  })
134
135
  }), [
135
136
  withDirectives((openBlock(), createBlock(unref(Table), mergeProps(unref(attrs).assem, {
@@ -137,7 +138,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
137
138
  ref_key: "tableRef",
138
139
  ref: tableRef,
139
140
  class: [unref(cs).z("table"), unref(cs).is("absolute", props.adaptive)],
140
- height: props.height,
141
+ height: props.maxHeight ? "" : props.height,
142
+ "max-height": props.maxHeight,
141
143
  "scroll-selector": ".el-scrollbar .el-scrollbar__wrap",
142
144
  "row-style": rowStyle.value,
143
145
  data: props.value,
@@ -173,7 +175,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
173
175
  ]), 1032, ["table", "value", "list", "options"])
174
176
  ]),
175
177
  _: 3
176
- }, 16, ["class", "height", "row-style", "data", "default-sort"])), [
178
+ }, 16, ["class", "height", "max-height", "row-style", "data", "default-sort"])), [
177
179
  [unref(vLoading), props.loading]
178
180
  ])
179
181
  ], 16);
@@ -14,7 +14,7 @@
14
14
 
15
15
  .tables {
16
16
  width: 100%;
17
- min-height: 160px;
17
+ min-height: var(--tables-min-height, 70px);
18
18
  position: relative;
19
19
  flex: 1;
20
20
  display: flex;
@@ -787,7 +787,9 @@
787
787
 
788
788
  .no-data {
789
789
  text-align: center;
790
- margin-top: 20px;
790
+ display: inline-flex;
791
+ align-items: center;
792
+ justify-content: center;
791
793
  color: #999;
792
794
  }
793
795
 
@@ -1076,9 +1078,6 @@
1076
1078
  .list-div .list-table.center .list-table-th {
1077
1079
  text-align: center;
1078
1080
  }
1079
- .list-div .list-table.auto .list-table-th {
1080
- padding-right: 0;
1081
- }
1082
1081
  .list-div .list-table.top .list-table-th {
1083
1082
  padding-bottom: 0;
1084
1083
  }
@@ -1124,7 +1123,7 @@
1124
1123
 
1125
1124
  .tables {
1126
1125
  width: 100%;
1127
- min-height: 160px;
1126
+ min-height: var(--tables-min-height, 70px);
1128
1127
  position: relative;
1129
1128
  flex: 1;
1130
1129
  display: flex;
package/dist/css/list.css CHANGED
@@ -57,9 +57,6 @@
57
57
  .list-div .list-table.center .list-table-th {
58
58
  text-align: center;
59
59
  }
60
- .list-div .list-table.auto .list-table-th {
61
- padding-right: 0;
62
- }
63
60
  .list-div .list-table.top .list-table-th {
64
61
  padding-bottom: 0;
65
62
  }
@@ -14,6 +14,8 @@
14
14
 
15
15
  .no-data {
16
16
  text-align: center;
17
- margin-top: 20px;
17
+ display: inline-flex;
18
+ align-items: center;
19
+ justify-content: center;
18
20
  color: #999;
19
21
  }
package/dist/css/page.css CHANGED
@@ -669,9 +669,6 @@
669
669
  .list-div .list-table.center .list-table-th {
670
670
  text-align: center;
671
671
  }
672
- .list-div .list-table.auto .list-table-th {
673
- padding-right: 0;
674
- }
675
672
  .list-div .list-table.top .list-table-th {
676
673
  padding-bottom: 0;
677
674
  }
@@ -717,7 +714,7 @@
717
714
 
718
715
  .tables {
719
716
  width: 100%;
720
- min-height: 160px;
717
+ min-height: var(--tables-min-height, 70px);
721
718
  position: relative;
722
719
  flex: 1;
723
720
  display: flex;
@@ -14,7 +14,7 @@
14
14
 
15
15
  .tables {
16
16
  width: 100%;
17
- min-height: 160px;
17
+ min-height: var(--tables-min-height, 70px);
18
18
  position: relative;
19
19
  flex: 1;
20
20
  display: flex;
@@ -14,7 +14,7 @@
14
14
 
15
15
  .tables {
16
16
  width: 100%;
17
- min-height: 160px;
17
+ min-height: var(--tables-min-height, 70px);
18
18
  position: relative;
19
19
  flex: 1;
20
20
  display: flex;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-ui",
3
3
  "info": {},
4
- "lastModified": 1762508522818,
4
+ "lastModified": 1762573604669,
5
5
  "icons": {
6
6
  "bar": {
7
7
  "body": " <path fill=\"currentColor\" d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\" ></path> "
package/dist/index.css CHANGED
@@ -787,7 +787,9 @@
787
787
 
788
788
  .no-data {
789
789
  text-align: center;
790
- margin-top: 20px;
790
+ display: inline-flex;
791
+ align-items: center;
792
+ justify-content: center;
791
793
  color: #999;
792
794
  }
793
795
 
@@ -1076,9 +1078,6 @@
1076
1078
  .list-div .list-table.center .list-table-th {
1077
1079
  text-align: center;
1078
1080
  }
1079
- .list-div .list-table.auto .list-table-th {
1080
- padding-right: 0;
1081
- }
1082
1081
  .list-div .list-table.top .list-table-th {
1083
1082
  padding-bottom: 0;
1084
1083
  }
@@ -1124,7 +1123,7 @@
1124
1123
 
1125
1124
  .tables {
1126
1125
  width: 100%;
1127
- min-height: 160px;
1126
+ min-height: var(--tables-min-height, 70px);
1128
1127
  position: relative;
1129
1128
  flex: 1;
1130
1129
  display: flex;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/fang-ui",
3
3
  "private": false,
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "type": "module",
6
6
  "description ": "fang-ui",
7
7
  "keywords": [
@@ -54,9 +54,9 @@
54
54
  "@fang-ui/hooks": "0.0.1-0",
55
55
  "@fang-ui/icons": "0.0.1-0",
56
56
  "@fang-ui/locale": "0.0.1-0",
57
- "@fang-ui/theme": "0.0.1-0",
57
+ "@fang-ui/utils": "0.0.1-0",
58
58
  "@fang-ui/types": "0.0.1-0",
59
- "@fang-ui/utils": "0.0.1-0"
59
+ "@fang-ui/theme": "0.0.1-0"
60
60
  },
61
61
  "main": "./dist/index.cjs",
62
62
  "module": "./dist/index.js",
File without changes