@fangzhongya/fang-ui 0.1.36 → 0.1.38

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.
Files changed (111) hide show
  1. package/dist/components/box-adjust/src/data.cjs +2 -2
  2. package/dist/components/box-adjust/src/data.d.ts +2 -2
  3. package/dist/components/box-adjust/src/data.js +2 -2
  4. package/dist/components/buttons/src/data.cjs +8 -4
  5. package/dist/components/buttons/src/data.d.ts +33 -4
  6. package/dist/components/buttons/src/data.js +8 -4
  7. package/dist/components/buttons/src/index2.cjs +12 -2
  8. package/dist/components/buttons/src/index2.js +14 -4
  9. package/dist/components/common/use.cjs +5 -3
  10. package/dist/components/common/use.js +5 -3
  11. package/dist/components/dates2/src/data.cjs +1 -1
  12. package/dist/components/dates2/src/data.d.ts +1 -1
  13. package/dist/components/dates2/src/data.js +1 -1
  14. package/dist/components/double/index.css +2 -1
  15. package/dist/components/double/index.scss +2 -1
  16. package/dist/components/forms/index.css +2 -1
  17. package/dist/components/forms/src/setup.cjs +8 -23
  18. package/dist/components/forms/src/setup.d.ts +1 -1
  19. package/dist/components/forms/src/setup.js +11 -26
  20. package/dist/components/forms/src/util.cjs +85 -17
  21. package/dist/components/forms/src/util.d.ts +2 -1
  22. package/dist/components/forms/src/util.js +87 -19
  23. package/dist/components/list/index.css +1 -1
  24. package/dist/components/list/index.scss +1 -1
  25. package/dist/components/list/src/data.cjs +3 -0
  26. package/dist/components/list/src/data.d.ts +3 -0
  27. package/dist/components/list/src/data.js +3 -0
  28. package/dist/components/list/src/index2.cjs +18 -13
  29. package/dist/components/list/src/index2.js +16 -11
  30. package/dist/components/list/src/util.cjs +12 -2
  31. package/dist/components/list/src/util.d.ts +1 -0
  32. package/dist/components/list/src/util.js +12 -2
  33. package/dist/components/list/style/index2.scss +1 -0
  34. package/dist/components/lists/index.css +1 -1
  35. package/dist/components/lists/src/data.d.ts +3 -3
  36. package/dist/components/lists/src/index2.cjs +9 -9
  37. package/dist/components/lists/src/index2.js +9 -9
  38. package/dist/components/listsp/index.css +1 -1
  39. package/dist/components/listspd/index.css +1 -1
  40. package/dist/components/no-data/src/data.cjs +2 -2
  41. package/dist/components/no-data/src/data.d.ts +2 -2
  42. package/dist/components/no-data/src/data.js +2 -2
  43. package/dist/components/no-data/src/index2.cjs +2 -2
  44. package/dist/components/no-data/src/index2.js +2 -2
  45. package/dist/components/page/index.css +3 -2
  46. package/dist/components/selector/index.css +2 -1
  47. package/dist/components/tables/common/com-but.cjs +4 -0
  48. package/dist/components/tables/common/com-but.js +4 -0
  49. package/dist/components/tables/common/{table-but2.cjs → com-but2.cjs} +17 -13
  50. package/dist/components/tables/common/{table-but2.js → com-but2.js} +14 -10
  51. package/dist/components/tables/common/com-color.cjs +4 -0
  52. package/dist/components/tables/common/com-color.js +4 -0
  53. package/dist/components/tables/common/{table-color2.cjs → com-color2.cjs} +21 -8
  54. package/dist/components/tables/common/{table-color2.js → com-color2.js} +23 -10
  55. package/dist/components/tables/common/com-fig.cjs +4 -0
  56. package/dist/components/tables/common/com-fig.js +4 -0
  57. package/dist/components/tables/common/com-fig2.cjs +92 -0
  58. package/dist/components/tables/common/com-fig2.js +92 -0
  59. package/dist/components/tables/common/com-lis.cjs +4 -0
  60. package/dist/components/tables/common/com-lis.js +4 -0
  61. package/dist/components/tables/common/com-lis2.cjs +151 -0
  62. package/dist/components/tables/common/com-lis2.js +151 -0
  63. package/dist/components/tables/common/pagin.d.ts +14 -6
  64. package/dist/components/tables/common/util.cjs +12 -0
  65. package/dist/components/tables/common/util.d.ts +1 -0
  66. package/dist/components/tables/common/util.js +12 -0
  67. package/dist/components/tables/src/column.cjs +5 -2
  68. package/dist/components/tables/src/column.js +6 -3
  69. package/dist/components/tables/src/columns2.cjs +9 -7
  70. package/dist/components/tables/src/columns2.js +9 -7
  71. package/dist/components/tables/src/data.d.ts +3 -3
  72. package/dist/components/tables/style/index2.scss +1 -0
  73. package/dist/components/tablesv/src/column.cjs +7 -4
  74. package/dist/components/tablesv/src/column.js +8 -5
  75. package/dist/components/tablesv/src/columns2.cjs +9 -7
  76. package/dist/components/tablesv/src/columns2.js +9 -7
  77. package/dist/components/tablesv/src/data.d.ts +3 -3
  78. package/dist/components/tablesv/src/index2.cjs +10 -1
  79. package/dist/components/tablesv/src/index2.js +10 -1
  80. package/dist/components/window/src/data.cjs +1 -1
  81. package/dist/components/window/src/data.d.ts +1 -1
  82. package/dist/components/window/src/data.js +1 -1
  83. package/dist/css/double.css +2 -1
  84. package/dist/css/forms.css +2 -1
  85. package/dist/css/index.css +3 -2
  86. package/dist/css/list.css +1 -1
  87. package/dist/css/lists.css +1 -1
  88. package/dist/css/listsp.css +1 -1
  89. package/dist/css/listspd.css +1 -1
  90. package/dist/css/page.css +3 -2
  91. package/dist/css/selector.css +2 -1
  92. package/dist/icons/index.json +1 -1
  93. package/dist/index.css +3 -2
  94. package/dist/type.d.ts +12 -3
  95. package/package.json +2 -2
  96. package/dist/components/tables/common/img.cjs +0 -4
  97. package/dist/components/tables/common/img.js +0 -4
  98. package/dist/components/tables/common/img2.cjs +0 -37
  99. package/dist/components/tables/common/img2.js +0 -37
  100. package/dist/components/tables/common/table-but.cjs +0 -4
  101. package/dist/components/tables/common/table-but.js +0 -4
  102. package/dist/components/tables/common/table-color.cjs +0 -4
  103. package/dist/components/tables/common/table-color.js +0 -4
  104. package/dist/components/tables/common/table-list.cjs +0 -4
  105. package/dist/components/tables/common/table-list.js +0 -4
  106. package/dist/components/tables/common/table-list2.cjs +0 -125
  107. package/dist/components/tables/common/table-list2.js +0 -125
  108. /package/dist/components/{forms-items → forms-item}/index.css +0 -0
  109. /package/dist/components/{draggable → keep-com}/index.css +0 -0
  110. /package/dist/css/{forms-items.css → forms-item.css} +0 -0
  111. /package/dist/css/{draggable.css → keep-com.css} +0 -0
@@ -3,7 +3,7 @@ import { useSetSlot, useSetCompon, useGetDomValue, useGetDomLabel } from "../../
3
3
  import { getAttrValue } from "../../../utils/vues/getAttrValue.js";
4
4
  import { useComponsGet } from "../../../hooks/compons/index.js";
5
5
  import { provides } from "../../tables/common/config.js";
6
- import { setMinWidth } from "../../tables/common/util.js";
6
+ import { setEmptyDisplay, setMinWidth } from "../../tables/common/util.js";
7
7
  import { lineToSmallHump } from "@fangzhongya/utils/name/lineToSmallHump";
8
8
  import { VxeColumn } from "vxe-table/es/column";
9
9
  import { Radio } from "../../radio/index.js";
@@ -38,7 +38,7 @@ function handlePropertyMapping(value, ckey, obj, robj, vxeconfig, table) {
38
38
  const propertyHandlers = {
39
39
  showOverflow: () => robj["show-overflow"] = value ? "tooltip" : void 0,
40
40
  showOverflowTooltip: () => robj["show-overflow"] = value ? "tooltip" : void 0,
41
- label: () => robj["title"] = value,
41
+ // label: () => (robj['title'] = value),
42
42
  sortable: () => robj[ckey] = value ? true : void 0,
43
43
  prop: () => robj["field"] = value,
44
44
  fixed: () => robj["fixed"] = value === true ? "left" : value,
@@ -84,7 +84,7 @@ function setSslot(obj, scope, emit, slots, props, index) {
84
84
  useComponsGet(provides.compons),
85
85
  emit,
86
86
  index,
87
- scope
87
+ { ...scope, options: props.options, config: props.table }
88
88
  );
89
89
  if (column) {
90
90
  return column;
@@ -109,7 +109,7 @@ function defaultDom(obj, scope, props, index) {
109
109
  } else if (obj.type == "selection") {
110
110
  return;
111
111
  }
112
- domValue = useGetDomValue(obj, scope.row, props.options, scope.$index);
112
+ domValue = useGetDomValue(obj, scope.row, props.options, scope.$rowIndex);
113
113
  return h(
114
114
  "span",
115
115
  {
@@ -120,9 +120,12 @@ function defaultDom(obj, scope, props, index) {
120
120
  }
121
121
  }
122
122
  },
123
- domValue ?? table.emptyDisplay ?? ""
123
+ setDomValue(domValue, table)
124
124
  );
125
125
  }
126
+ function setDomValue(domValue, table) {
127
+ return (setEmptyDisplay(domValue, table.emptyDisplay, table.isEmptyStr) || domValue) ?? "";
128
+ }
126
129
  function setHeader(obj, scope, slots, emit, props, index) {
127
130
  const optionss = props.options || {};
128
131
  return useGetDomLabel(
@@ -3,15 +3,17 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const columns = require("./columns3.cjs");
5
5
  const index = require("../../tooltip/index.cjs");
6
- require("../../tables/common/table-but.cjs");
7
- require("../../tables/common/table-color.cjs");
8
- require("../../tables/common/table-list.cjs");
9
- const tableList_vue_vue_type_script_setup_true_lang = require("../../tables/common/table-list2.cjs");
10
- const tableColor_vue_vue_type_script_setup_true_lang = require("../../tables/common/table-color2.cjs");
11
- const tableBut_vue_vue_type_script_setup_true_lang = require("../../tables/common/table-but2.cjs");
6
+ require("../../tables/common/com-but.cjs");
7
+ require("../../tables/common/com-color.cjs");
8
+ require("../../tables/common/com-lis.cjs");
9
+ require("../../tables/common/com-fig.cjs");
10
+ const comFig_vue_vue_type_script_setup_true_lang = require("../../tables/common/com-fig2.cjs");
11
+ const comLis_vue_vue_type_script_setup_true_lang = require("../../tables/common/com-lis2.cjs");
12
+ const comColor_vue_vue_type_script_setup_true_lang = require("../../tables/common/com-color2.cjs");
13
+ const comBut_vue_vue_type_script_setup_true_lang = require("../../tables/common/com-but2.cjs");
12
14
  const _sfc_main = vue.defineComponent({
13
15
  emits: ["list-events"],
14
- components: { VxeTooltip: index.Tooltip, But: tableBut_vue_vue_type_script_setup_true_lang.default, Color: tableColor_vue_vue_type_script_setup_true_lang.default, List: tableList_vue_vue_type_script_setup_true_lang.default },
16
+ components: { VxeTooltip: index.Tooltip, But: comBut_vue_vue_type_script_setup_true_lang.default, Color: comColor_vue_vue_type_script_setup_true_lang.default, Lis: comLis_vue_vue_type_script_setup_true_lang.default, Fig: comFig_vue_vue_type_script_setup_true_lang.default },
15
17
  expose: [],
16
18
  props: {
17
19
  list: Array,
@@ -1,15 +1,17 @@
1
1
  import { defineComponent } from "vue";
2
2
  import { render } from "./columns3.js";
3
3
  import { Tooltip } from "../../tooltip/index.js";
4
- import "../../tables/common/table-but.js";
5
- import "../../tables/common/table-color.js";
6
- import "../../tables/common/table-list.js";
7
- import _sfc_main$1 from "../../tables/common/table-list2.js";
8
- import _sfc_main$2 from "../../tables/common/table-color2.js";
9
- import _sfc_main$3 from "../../tables/common/table-but2.js";
4
+ import "../../tables/common/com-but.js";
5
+ import "../../tables/common/com-color.js";
6
+ import "../../tables/common/com-lis.js";
7
+ import "../../tables/common/com-fig.js";
8
+ import _sfc_main$1 from "../../tables/common/com-fig2.js";
9
+ import _sfc_main$2 from "../../tables/common/com-lis2.js";
10
+ import _sfc_main$3 from "../../tables/common/com-color2.js";
11
+ import _sfc_main$4 from "../../tables/common/com-but2.js";
10
12
  const _sfc_main = defineComponent({
11
13
  emits: ["list-events"],
12
- components: { VxeTooltip: Tooltip, But: _sfc_main$3, Color: _sfc_main$2, List: _sfc_main$1 },
14
+ components: { VxeTooltip: Tooltip, But: _sfc_main$4, Color: _sfc_main$3, Lis: _sfc_main$2, Fig: _sfc_main$1 },
13
15
  expose: [],
14
16
  props: {
15
17
  list: Array,
@@ -166,10 +166,10 @@ export declare const dataEmits: string[];
166
166
  export type DataEmits = typeof dataEmits;
167
167
  /**
168
168
  * @expose clearSelection ( ) 清除多选
169
- * @expose toggleRowSelectionList (row, selected, key ) 切换选择
170
- * @expose clearSelectionList ( ) 清空选中
169
+ * @expose toggleRowSelection (row, selected, key ) 切换选择
170
+ * @expose clearCurrentRow ( ) 清空选中
171
171
  * @expose { Object: { value: 值,
172
172
  list: 当前列,
173
- key: key的名称,} } getRowSelectionsCheckList (row, key ) 获取选中的值
173
+ key: key的名称,} } getSelections (row, key ) 获取选中的值
174
174
  */
175
175
  export declare const dataExpose: {};
@@ -27,7 +27,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
27
  index$3.useCompons(config.provides.compons, props);
28
28
  const tableRef = vue.ref();
29
29
  const emit = __emit;
30
- console.log("props.maxHeight", props.maxHeight);
31
30
  const rowObj = vue.ref();
32
31
  const isfocus = vue.ref(false);
33
32
  function onClick() {
@@ -105,6 +104,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
105
104
  trigger: attrs.assem.isRowSelect ? "row" : "cell"
106
105
  }
107
106
  });
107
+ const spanMethod = function(obj) {
108
+ const method = attrs.assem.spanMethod;
109
+ if (method) {
110
+ const v = method(obj);
111
+ if (v) {
112
+ return { rowspan: v[0], colspan: v[1] };
113
+ }
114
+ }
115
+ };
108
116
  const rowStyle = vue.computed(() => {
109
117
  const height = props.lineHeight;
110
118
  const rowStyle2 = attrs.assem.rowStyle;
@@ -233,6 +241,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
233
241
  "sort-config": config$1.value.sort,
234
242
  "checkbox-config": config$1.value.checkbox,
235
243
  "radio-config": config$1.value.radio,
244
+ "span-method": spanMethod,
236
245
  data: vue.unref(props).value,
237
246
  onCellClick,
238
247
  onSortChange: sortChange,
@@ -25,7 +25,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  useCompons(provides.compons, props);
26
26
  const tableRef = ref();
27
27
  const emit = __emit;
28
- console.log("props.maxHeight", props.maxHeight);
29
28
  const rowObj = ref();
30
29
  const isfocus = ref(false);
31
30
  function onClick() {
@@ -103,6 +102,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
102
  trigger: attrs.assem.isRowSelect ? "row" : "cell"
104
103
  }
105
104
  });
105
+ const spanMethod = function(obj) {
106
+ const method = attrs.assem.spanMethod;
107
+ if (method) {
108
+ const v = method(obj);
109
+ if (v) {
110
+ return { rowspan: v[0], colspan: v[1] };
111
+ }
112
+ }
113
+ };
106
114
  const rowStyle = computed(() => {
107
115
  const height = props.lineHeight;
108
116
  const rowStyle2 = attrs.assem.rowStyle;
@@ -231,6 +239,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
231
239
  "sort-config": config.value.sort,
232
240
  "checkbox-config": config.value.checkbox,
233
241
  "radio-config": config.value.radio,
242
+ "span-method": spanMethod,
234
243
  data: unref(props).value,
235
244
  onCellClick,
236
245
  onSortChange: sortChange,
@@ -77,7 +77,7 @@ const dataProps = buildProps.buildProps({
77
77
  },
78
78
  /**
79
79
  * @props { Boolean } max= ( )
80
- * 是否要最大化
80
+ * 是否最大化
81
81
  */
82
82
  max: {
83
83
  type: Boolean
@@ -81,7 +81,7 @@ export declare const dataProps: {
81
81
  };
82
82
  /**
83
83
  * @props { Boolean } max= ( )
84
- * 是否要最大化
84
+ * 是否最大化
85
85
  */
86
86
  max: {
87
87
  type: BooleanConstructor;
@@ -75,7 +75,7 @@ const dataProps = buildProps({
75
75
  },
76
76
  /**
77
77
  * @props { Boolean } max= ( )
78
- * 是否要最大化
78
+ * 是否最大化
79
79
  */
80
80
  max: {
81
81
  type: Boolean
@@ -26,7 +26,8 @@
26
26
  width: 100%;
27
27
  display: inline-flex;
28
28
  align-items: center;
29
- padding: 1px;
29
+ box-sizing: content-box;
30
+ padding: 1.2px 1px;
30
31
  position: relative;
31
32
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
32
33
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -53,7 +53,8 @@
53
53
  width: 100%;
54
54
  display: inline-flex;
55
55
  align-items: center;
56
- padding: 1px;
56
+ box-sizing: content-box;
57
+ padding: 1.2px 1px;
57
58
  position: relative;
58
59
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
59
60
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -53,7 +53,8 @@
53
53
  width: 100%;
54
54
  display: inline-flex;
55
55
  align-items: center;
56
- padding: 1px;
56
+ box-sizing: content-box;
57
+ padding: 1.2px 1px;
57
58
  position: relative;
58
59
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
59
60
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -1130,7 +1131,7 @@
1130
1131
  }
1131
1132
  .list-div .list-table .list-table-value {
1132
1133
  word-break: break-all;
1133
- white-space: normal;
1134
+ white-space: pre-wrap;
1134
1135
  max-height: var(--list-row-max-height);
1135
1136
  display: -webkit-box;
1136
1137
  -webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
package/dist/css/list.css CHANGED
@@ -101,7 +101,7 @@
101
101
  }
102
102
  .list-div .list-table .list-table-value {
103
103
  word-break: break-all;
104
- white-space: normal;
104
+ white-space: pre-wrap;
105
105
  max-height: var(--list-row-max-height);
106
106
  display: -webkit-box;
107
107
  -webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
@@ -101,7 +101,7 @@
101
101
  }
102
102
  .list-div .list-table .list-table-value {
103
103
  word-break: break-all;
104
- white-space: normal;
104
+ white-space: pre-wrap;
105
105
  max-height: var(--list-row-max-height);
106
106
  display: -webkit-box;
107
107
  -webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
@@ -101,7 +101,7 @@
101
101
  }
102
102
  .list-div .list-table .list-table-value {
103
103
  word-break: break-all;
104
- white-space: normal;
104
+ white-space: pre-wrap;
105
105
  max-height: var(--list-row-max-height);
106
106
  display: -webkit-box;
107
107
  -webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
@@ -101,7 +101,7 @@
101
101
  }
102
102
  .list-div .list-table .list-table-value {
103
103
  word-break: break-all;
104
- white-space: normal;
104
+ white-space: pre-wrap;
105
105
  max-height: var(--list-row-max-height);
106
106
  display: -webkit-box;
107
107
  -webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
package/dist/css/page.css CHANGED
@@ -53,7 +53,8 @@
53
53
  width: 100%;
54
54
  display: inline-flex;
55
55
  align-items: center;
56
- padding: 1px;
56
+ box-sizing: content-box;
57
+ padding: 1.2px 1px;
57
58
  position: relative;
58
59
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
59
60
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -718,7 +719,7 @@
718
719
  }
719
720
  .list-div .list-table .list-table-value {
720
721
  word-break: break-all;
721
- white-space: normal;
722
+ white-space: pre-wrap;
722
723
  max-height: var(--list-row-max-height);
723
724
  display: -webkit-box;
724
725
  -webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
@@ -78,7 +78,8 @@
78
78
  width: 100%;
79
79
  display: inline-flex;
80
80
  align-items: center;
81
- padding: 1px;
81
+ box-sizing: content-box;
82
+ padding: 1.2px 1px;
82
83
  position: relative;
83
84
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
84
85
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-ui",
3
3
  "info": {},
4
- "lastModified": 1764065519442,
4
+ "lastModified": 1764162535212,
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
@@ -53,7 +53,8 @@
53
53
  width: 100%;
54
54
  display: inline-flex;
55
55
  align-items: center;
56
- padding: 1px;
56
+ box-sizing: content-box;
57
+ padding: 1.2px 1px;
57
58
  position: relative;
58
59
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
59
60
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -1130,7 +1131,7 @@
1130
1131
  }
1131
1132
  .list-div .list-table .list-table-value {
1132
1133
  word-break: break-all;
1133
- white-space: normal;
1134
+ white-space: pre-wrap;
1134
1135
  max-height: var(--list-row-max-height);
1135
1136
  display: -webkit-box;
1136
1137
  -webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
package/dist/type.d.ts CHANGED
@@ -29,19 +29,28 @@ type Rule = {
29
29
  /**
30
30
  * 类型
31
31
  */
32
- type: 1 | 2;
32
+ trigger?: string | string[] | number;
33
33
  /**
34
34
  * 是否必传
35
35
  */
36
- must: boolean;
36
+ required?: boolean;
37
37
  /**
38
38
  * 校验方法
39
39
  */
40
- judge: string;
40
+ judge?: string | Function;
41
41
  /**
42
42
  * 校验失败提示
43
43
  */
44
44
  error?: string;
45
+ /**
46
+ * 校验联动配置
47
+ */
48
+ linkage?:
49
+ | string
50
+ | {
51
+ prop?: string;
52
+ judge?: Function;
53
+ };
45
54
  };
46
55
 
47
56
  type ListObj = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/fang-ui",
3
3
  "private": false,
4
- "version": "0.1.36",
4
+ "version": "0.1.38",
5
5
  "type": "module",
6
6
  "description ": "fang-ui",
7
7
  "keywords": [
@@ -51,8 +51,8 @@
51
51
  "vue-tsc": "^3.1.5",
52
52
  "vxe-table": "4.6.20",
53
53
  "@fang-ui/components": "0.0.1-0",
54
- "@fang-ui/hooks": "0.0.1-0",
55
54
  "@fang-ui/directives": "0.0.1-0",
55
+ "@fang-ui/hooks": "0.0.1-0",
56
56
  "@fang-ui/icons": "0.0.1-0",
57
57
  "@fang-ui/locale": "0.0.1-0",
58
58
  "@fang-ui/theme": "0.0.1-0",
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const img_vue_vue_type_script_setup_true_lang = require("./img2.cjs");
4
- exports.default = img_vue_vue_type_script_setup_true_lang.default;
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./img2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const vue = require("vue");
4
- const index$1 = require("../../image/index.cjs");
5
- const index = require("../../../hooks/cssname/index.cjs");
6
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
7
- __name: "img",
8
- props: {
9
- modelValue: String,
10
- prefix: String
11
- },
12
- setup(__props, { expose: __expose }) {
13
- const cs = index.useCssName("lists-com");
14
- const props = __props;
15
- const value = vue.computed(() => {
16
- if (props.modelValue) {
17
- return props.prefix + "/" + props.modelValue;
18
- } else {
19
- return "";
20
- }
21
- });
22
- __expose({});
23
- return (_ctx, _cache) => {
24
- return vue.openBlock(), vue.createElementBlock("div", {
25
- class: vue.normalizeClass(vue.unref(cs).z())
26
- }, [
27
- vue.createVNode(vue.unref(index$1.Image), {
28
- fit: "contain",
29
- class: vue.normalizeClass(vue.unref(cs).z("img")),
30
- src: value.value,
31
- "preview-src-list": [value.value]
32
- }, null, 8, ["class", "src", "preview-src-list"])
33
- ], 2);
34
- };
35
- }
36
- });
37
- exports.default = _sfc_main;
@@ -1,37 +0,0 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
2
- import { Image } from "../../image/index.js";
3
- import { useCssName } from "../../../hooks/cssname/index.js";
4
- const _sfc_main = /* @__PURE__ */ defineComponent({
5
- __name: "img",
6
- props: {
7
- modelValue: String,
8
- prefix: String
9
- },
10
- setup(__props, { expose: __expose }) {
11
- const cs = useCssName("lists-com");
12
- const props = __props;
13
- const value = computed(() => {
14
- if (props.modelValue) {
15
- return props.prefix + "/" + props.modelValue;
16
- } else {
17
- return "";
18
- }
19
- });
20
- __expose({});
21
- return (_ctx, _cache) => {
22
- return openBlock(), createElementBlock("div", {
23
- class: normalizeClass(unref(cs).z())
24
- }, [
25
- createVNode(unref(Image), {
26
- fit: "contain",
27
- class: normalizeClass(unref(cs).z("img")),
28
- src: value.value,
29
- "preview-src-list": [value.value]
30
- }, null, 8, ["class", "src", "preview-src-list"])
31
- ], 2);
32
- };
33
- }
34
- });
35
- export {
36
- _sfc_main as default
37
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const tableBut_vue_vue_type_script_setup_true_lang = require("./table-but2.cjs");
4
- exports.default = tableBut_vue_vue_type_script_setup_true_lang.default;
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./table-but2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const tableColor_vue_vue_type_script_setup_true_lang = require("./table-color2.cjs");
4
- exports.default = tableColor_vue_vue_type_script_setup_true_lang.default;
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./table-color2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const tableList_vue_vue_type_script_setup_true_lang = require("./table-list2.cjs");
4
- exports.default = tableList_vue_vue_type_script_setup_true_lang.default;
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./table-list2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,125 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const vue = require("vue");
4
- const util = require("./util.cjs");
5
- const isObject = require("@fangzhongya/utils/basic/object/isObject");
6
- const isArray = require("@fangzhongya/utils/basic/array/isArray");
7
- const _hoisted_1 = ["onClick"];
8
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9
- __name: "table-list",
10
- props: {
11
- /**
12
- * table列表
13
- * {
14
- * label:"列表名称"
15
- * prop:"列表取值"
16
- * type:"列表类型"
17
- * }
18
- *
19
- */
20
- tableListObj: {
21
- type: Object,
22
- default() {
23
- return {};
24
- }
25
- },
26
- /**
27
- * table数据
28
- * row, column, $index
29
- *
30
- */
31
- tableScope: {
32
- type: Object,
33
- default() {
34
- return {};
35
- }
36
- }
37
- },
38
- emits: ["scope-click"],
39
- setup(__props, { emit: __emit }) {
40
- const props = __props;
41
- const emit = __emit;
42
- function setValue(v) {
43
- if (isArray.isArray(v)) {
44
- return v;
45
- } else if (isObject.isObject(v)) {
46
- return [v];
47
- } else {
48
- return [
49
- {
50
- value: v
51
- }
52
- ];
53
- }
54
- }
55
- function getValue(row, column, cellValue, index, formatter) {
56
- if (formatter) {
57
- const v = formatter(row, column, cellValue, index);
58
- return setValue(v);
59
- } else {
60
- return setValue(cellValue);
61
- }
62
- }
63
- const valueArr = vue.computed(() => {
64
- var _a;
65
- const prop = props.tableListObj.prop || "";
66
- const row = props.tableScope.row || {};
67
- const column = props.tableScope.column || {};
68
- const cellValue = row[prop];
69
- const index = props.tableScope.$index;
70
- const formatter = props.tableListObj.formatter;
71
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
72
- if (configFormatter) {
73
- const arr = configFormatter(row, column, cellValue, index);
74
- return setValue(arr);
75
- } else {
76
- return getValue(row, column, cellValue, index, formatter);
77
- }
78
- });
79
- function onClick($event) {
80
- let obj = valueArr.value;
81
- util.eventAliass(
82
- (callback) => {
83
- callback(obj, props.tableScope, props.tableListObj, "list-li");
84
- },
85
- "click",
86
- props.tableListObj,
87
- $event
88
- );
89
- emit("scope-click", obj, props.tableScope, props.tableListObj, "list");
90
- }
91
- function onClickList(obj, $event) {
92
- util.eventAliass(
93
- (callback) => {
94
- callback(obj, props.tableScope, props.tableListObj, "list-li");
95
- },
96
- "click",
97
- obj,
98
- $event
99
- );
100
- emit(
101
- "scope-click",
102
- obj,
103
- props.tableScope,
104
- props.tableListObj,
105
- "list-li"
106
- );
107
- }
108
- return (_ctx, _cache) => {
109
- return vue.openBlock(), vue.createElementBlock("span", {
110
- onClick: _cache[0] || (_cache[0] = ($event) => onClick($event)),
111
- class: "table-list"
112
- }, [
113
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(valueArr.value, (item, index) => {
114
- return vue.openBlock(), vue.createElementBlock("span", {
115
- class: vue.normalizeClass(["table-list-li", item.class]),
116
- key: index,
117
- onClick: ($event) => onClickList(item, $event),
118
- style: vue.normalizeStyle(item.style)
119
- }, vue.toDisplayString(item.value), 15, _hoisted_1);
120
- }), 128))
121
- ]);
122
- };
123
- }
124
- });
125
- exports.default = _sfc_main;