@fangzhongya/fang-ui 0.1.37 → 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 (95) 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/common/use.cjs +4 -2
  5. package/dist/components/common/use.js +4 -2
  6. package/dist/components/dates2/src/data.cjs +1 -1
  7. package/dist/components/dates2/src/data.d.ts +1 -1
  8. package/dist/components/dates2/src/data.js +1 -1
  9. package/dist/components/forms/src/setup.cjs +8 -23
  10. package/dist/components/forms/src/setup.d.ts +1 -1
  11. package/dist/components/forms/src/setup.js +11 -26
  12. package/dist/components/forms/src/util.cjs +85 -17
  13. package/dist/components/forms/src/util.d.ts +2 -1
  14. package/dist/components/forms/src/util.js +87 -19
  15. package/dist/components/list/index.css +1 -1
  16. package/dist/components/list/index.scss +1 -1
  17. package/dist/components/list/src/data.cjs +3 -0
  18. package/dist/components/list/src/data.d.ts +3 -0
  19. package/dist/components/list/src/data.js +3 -0
  20. package/dist/components/list/src/index2.cjs +18 -13
  21. package/dist/components/list/src/index2.js +16 -11
  22. package/dist/components/list/src/util.cjs +12 -2
  23. package/dist/components/list/src/util.d.ts +1 -0
  24. package/dist/components/list/src/util.js +12 -2
  25. package/dist/components/list/style/index2.scss +1 -0
  26. package/dist/components/lists/index.css +1 -1
  27. package/dist/components/lists/src/data.d.ts +3 -3
  28. package/dist/components/lists/src/index2.cjs +9 -9
  29. package/dist/components/lists/src/index2.js +9 -9
  30. package/dist/components/listsp/index.css +1 -1
  31. package/dist/components/listspd/index.css +1 -1
  32. package/dist/components/no-data/src/data.cjs +2 -2
  33. package/dist/components/no-data/src/data.d.ts +2 -2
  34. package/dist/components/no-data/src/data.js +2 -2
  35. package/dist/components/no-data/src/index2.cjs +2 -2
  36. package/dist/components/no-data/src/index2.js +2 -2
  37. package/dist/components/page/index.css +1 -1
  38. package/dist/components/tables/common/com-but.cjs +4 -0
  39. package/dist/components/tables/common/com-but.js +4 -0
  40. package/dist/components/tables/common/{table-but2.cjs → com-but2.cjs} +17 -13
  41. package/dist/components/tables/common/{table-but2.js → com-but2.js} +14 -10
  42. package/dist/components/tables/common/com-color.cjs +4 -0
  43. package/dist/components/tables/common/com-color.js +4 -0
  44. package/dist/components/tables/common/{table-color2.cjs → com-color2.cjs} +21 -8
  45. package/dist/components/tables/common/{table-color2.js → com-color2.js} +23 -10
  46. package/dist/components/tables/common/com-fig.cjs +4 -0
  47. package/dist/components/tables/common/com-fig.js +4 -0
  48. package/dist/components/tables/common/com-fig2.cjs +92 -0
  49. package/dist/components/tables/common/com-fig2.js +92 -0
  50. package/dist/components/tables/common/com-lis.cjs +4 -0
  51. package/dist/components/tables/common/com-lis.js +4 -0
  52. package/dist/components/tables/common/com-lis2.cjs +151 -0
  53. package/dist/components/tables/common/com-lis2.js +151 -0
  54. package/dist/components/tables/common/pagin.d.ts +14 -6
  55. package/dist/components/tables/common/util.cjs +12 -0
  56. package/dist/components/tables/common/util.d.ts +1 -0
  57. package/dist/components/tables/common/util.js +12 -0
  58. package/dist/components/tables/src/column.cjs +5 -2
  59. package/dist/components/tables/src/column.js +6 -3
  60. package/dist/components/tables/src/columns2.cjs +9 -7
  61. package/dist/components/tables/src/columns2.js +9 -7
  62. package/dist/components/tables/src/data.d.ts +3 -3
  63. package/dist/components/tables/style/index2.scss +1 -0
  64. package/dist/components/tablesv/src/column.cjs +5 -2
  65. package/dist/components/tablesv/src/column.js +6 -3
  66. package/dist/components/tablesv/src/columns2.cjs +9 -7
  67. package/dist/components/tablesv/src/columns2.js +9 -7
  68. package/dist/components/tablesv/src/data.d.ts +3 -3
  69. package/dist/components/window/src/data.cjs +1 -1
  70. package/dist/components/window/src/data.d.ts +1 -1
  71. package/dist/components/window/src/data.js +1 -1
  72. package/dist/css/index.css +1 -1
  73. package/dist/css/list.css +1 -1
  74. package/dist/css/lists.css +1 -1
  75. package/dist/css/listsp.css +1 -1
  76. package/dist/css/listspd.css +1 -1
  77. package/dist/css/page.css +1 -1
  78. package/dist/icons/index.json +1 -1
  79. package/dist/index.css +1 -1
  80. package/dist/type.d.ts +12 -3
  81. package/package.json +2 -2
  82. package/dist/components/tables/common/img.cjs +0 -4
  83. package/dist/components/tables/common/img.js +0 -4
  84. package/dist/components/tables/common/img2.cjs +0 -37
  85. package/dist/components/tables/common/img2.js +0 -37
  86. package/dist/components/tables/common/table-but.cjs +0 -4
  87. package/dist/components/tables/common/table-but.js +0 -4
  88. package/dist/components/tables/common/table-color.cjs +0 -4
  89. package/dist/components/tables/common/table-color.js +0 -4
  90. package/dist/components/tables/common/table-list.cjs +0 -4
  91. package/dist/components/tables/common/table-list.js +0 -4
  92. package/dist/components/tables/common/table-list2.cjs +0 -125
  93. package/dist/components/tables/common/table-list2.js +0 -125
  94. /package/dist/components/{global-config → keep-com}/index.css +0 -0
  95. /package/dist/css/{global-config.css → keep-com.css} +0 -0
@@ -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;
@@ -1,125 +0,0 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, normalizeStyle, normalizeClass, toDisplayString } from "vue";
2
- import { eventAliass } from "./util.js";
3
- import { isObject } from "@fangzhongya/utils/basic/object/isObject";
4
- import { isArray } from "@fangzhongya/utils/basic/array/isArray";
5
- const _hoisted_1 = ["onClick"];
6
- const _sfc_main = /* @__PURE__ */ defineComponent({
7
- __name: "table-list",
8
- props: {
9
- /**
10
- * table列表
11
- * {
12
- * label:"列表名称"
13
- * prop:"列表取值"
14
- * type:"列表类型"
15
- * }
16
- *
17
- */
18
- tableListObj: {
19
- type: Object,
20
- default() {
21
- return {};
22
- }
23
- },
24
- /**
25
- * table数据
26
- * row, column, $index
27
- *
28
- */
29
- tableScope: {
30
- type: Object,
31
- default() {
32
- return {};
33
- }
34
- }
35
- },
36
- emits: ["scope-click"],
37
- setup(__props, { emit: __emit }) {
38
- const props = __props;
39
- const emit = __emit;
40
- function setValue(v) {
41
- if (isArray(v)) {
42
- return v;
43
- } else if (isObject(v)) {
44
- return [v];
45
- } else {
46
- return [
47
- {
48
- value: v
49
- }
50
- ];
51
- }
52
- }
53
- function getValue(row, column, cellValue, index, formatter) {
54
- if (formatter) {
55
- const v = formatter(row, column, cellValue, index);
56
- return setValue(v);
57
- } else {
58
- return setValue(cellValue);
59
- }
60
- }
61
- const valueArr = computed(() => {
62
- var _a;
63
- const prop = props.tableListObj.prop || "";
64
- const row = props.tableScope.row || {};
65
- const column = props.tableScope.column || {};
66
- const cellValue = row[prop];
67
- const index = props.tableScope.$index;
68
- const formatter = props.tableListObj.formatter;
69
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
70
- if (configFormatter) {
71
- const arr = configFormatter(row, column, cellValue, index);
72
- return setValue(arr);
73
- } else {
74
- return getValue(row, column, cellValue, index, formatter);
75
- }
76
- });
77
- function onClick($event) {
78
- let obj = valueArr.value;
79
- eventAliass(
80
- (callback) => {
81
- callback(obj, props.tableScope, props.tableListObj, "list-li");
82
- },
83
- "click",
84
- props.tableListObj,
85
- $event
86
- );
87
- emit("scope-click", obj, props.tableScope, props.tableListObj, "list");
88
- }
89
- function onClickList(obj, $event) {
90
- eventAliass(
91
- (callback) => {
92
- callback(obj, props.tableScope, props.tableListObj, "list-li");
93
- },
94
- "click",
95
- obj,
96
- $event
97
- );
98
- emit(
99
- "scope-click",
100
- obj,
101
- props.tableScope,
102
- props.tableListObj,
103
- "list-li"
104
- );
105
- }
106
- return (_ctx, _cache) => {
107
- return openBlock(), createElementBlock("span", {
108
- onClick: _cache[0] || (_cache[0] = ($event) => onClick($event)),
109
- class: "table-list"
110
- }, [
111
- (openBlock(true), createElementBlock(Fragment, null, renderList(valueArr.value, (item, index) => {
112
- return openBlock(), createElementBlock("span", {
113
- class: normalizeClass(["table-list-li", item.class]),
114
- key: index,
115
- onClick: ($event) => onClickList(item, $event),
116
- style: normalizeStyle(item.style)
117
- }, toDisplayString(item.value), 15, _hoisted_1);
118
- }), 128))
119
- ]);
120
- };
121
- }
122
- });
123
- export {
124
- _sfc_main as default
125
- };
File without changes