@fangzhongya/fang-ui 0.1.37 → 0.1.39

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 (116) 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/css.d.ts +7 -0
  5. package/dist/components/common/list.d.ts +7 -0
  6. package/dist/components/common/urls.d.ts +6 -0
  7. package/dist/components/common/use.cjs +18 -35
  8. package/dist/components/common/use.d.ts +91 -5
  9. package/dist/components/common/use.js +18 -35
  10. package/dist/components/dates2/src/data.cjs +1 -1
  11. package/dist/components/dates2/src/data.d.ts +1 -1
  12. package/dist/components/dates2/src/data.js +1 -1
  13. package/dist/components/forms/src/setup.cjs +8 -23
  14. package/dist/components/forms/src/setup.d.ts +11 -1
  15. package/dist/components/forms/src/setup.js +11 -26
  16. package/dist/components/forms/src/util.cjs +85 -17
  17. package/dist/components/forms/src/util.d.ts +13 -7
  18. package/dist/components/forms/src/util.js +87 -19
  19. package/dist/components/forms-item/src/label.cjs +0 -1
  20. package/dist/components/forms-item/src/label.js +0 -1
  21. package/dist/components/list/index.css +1 -1
  22. package/dist/components/list/index.scss +1 -1
  23. package/dist/components/list/src/data.cjs +3 -0
  24. package/dist/components/list/src/data.d.ts +3 -0
  25. package/dist/components/list/src/data.js +3 -0
  26. package/dist/components/list/src/index2.cjs +19 -24
  27. package/dist/components/list/src/index2.js +17 -22
  28. package/dist/components/list/src/util.cjs +14 -6
  29. package/dist/components/list/src/util.d.ts +2 -1
  30. package/dist/components/list/src/util.js +14 -6
  31. package/dist/components/list/style/index2.scss +1 -0
  32. package/dist/components/lists/index.css +1 -1
  33. package/dist/components/lists/src/data.d.ts +3 -3
  34. package/dist/components/lists/src/index2.cjs +9 -9
  35. package/dist/components/lists/src/index2.js +9 -9
  36. package/dist/components/listsp/index.css +1 -1
  37. package/dist/components/listspd/index.css +1 -1
  38. package/dist/components/no-data/src/data.cjs +2 -2
  39. package/dist/components/no-data/src/data.d.ts +2 -2
  40. package/dist/components/no-data/src/data.js +2 -2
  41. package/dist/components/no-data/src/index2.cjs +2 -2
  42. package/dist/components/no-data/src/index2.js +2 -2
  43. package/dist/components/page/index.css +1 -1
  44. package/dist/components/tables/common/com-but.cjs +4 -0
  45. package/dist/components/tables/common/com-but.js +4 -0
  46. package/dist/components/tables/common/{table-but2.cjs → com-but2.cjs} +17 -13
  47. package/dist/components/tables/common/{table-but2.js → com-but2.js} +14 -10
  48. package/dist/components/tables/common/com-color.cjs +4 -0
  49. package/dist/components/tables/common/com-color.js +4 -0
  50. package/dist/components/tables/common/{table-color2.cjs → com-color2.cjs} +21 -8
  51. package/dist/components/tables/common/{table-color2.js → com-color2.js} +23 -10
  52. package/dist/components/tables/common/com-fig.cjs +4 -0
  53. package/dist/components/tables/common/com-fig.js +4 -0
  54. package/dist/components/tables/common/com-fig2.cjs +92 -0
  55. package/dist/components/tables/common/com-fig2.js +92 -0
  56. package/dist/components/tables/common/com-lis.cjs +4 -0
  57. package/dist/components/tables/common/com-lis.js +4 -0
  58. package/dist/components/tables/common/com-lis2.cjs +151 -0
  59. package/dist/components/tables/common/com-lis2.js +151 -0
  60. package/dist/components/tables/common/pagin.d.ts +24 -6
  61. package/dist/components/tables/common/util.cjs +56 -4
  62. package/dist/components/tables/common/util.d.ts +14 -0
  63. package/dist/components/tables/common/util.js +57 -5
  64. package/dist/components/tables/src/column.cjs +5 -3
  65. package/dist/components/tables/src/column.js +6 -4
  66. package/dist/components/tables/src/columns2.cjs +9 -7
  67. package/dist/components/tables/src/columns2.js +9 -7
  68. package/dist/components/tables/src/data.d.ts +3 -3
  69. package/dist/components/tables/src/index2.cjs +1 -1
  70. package/dist/components/tables/src/index2.js +1 -1
  71. package/dist/components/tables/style/index2.scss +1 -0
  72. package/dist/components/tablesv/src/column.cjs +5 -3
  73. package/dist/components/tablesv/src/column.js +6 -4
  74. package/dist/components/tablesv/src/columns2.cjs +9 -7
  75. package/dist/components/tablesv/src/columns2.js +9 -7
  76. package/dist/components/tablesv/src/data.d.ts +3 -3
  77. package/dist/components/tablesv/src/index2.cjs +1 -1
  78. package/dist/components/tablesv/src/index2.js +1 -1
  79. package/dist/components/window/src/data.cjs +1 -1
  80. package/dist/components/window/src/data.d.ts +1 -1
  81. package/dist/components/window/src/data.js +1 -1
  82. package/dist/css/index.css +1 -1
  83. package/dist/css/list.css +1 -1
  84. package/dist/css/lists.css +1 -1
  85. package/dist/css/listsp.css +1 -1
  86. package/dist/css/listspd.css +1 -1
  87. package/dist/css/page.css +1 -1
  88. package/dist/icons/index.json +1 -1
  89. package/dist/index.css +1 -1
  90. package/dist/locale/en.cjs +2 -1
  91. package/dist/locale/en.d.ts +1 -0
  92. package/dist/locale/en.js +2 -1
  93. package/dist/locale/zh-cn.cjs +2 -1
  94. package/dist/locale/zh-cn.d.ts +1 -0
  95. package/dist/locale/zh-cn.js +2 -1
  96. package/dist/type.d.ts +12 -3
  97. package/dist/utils/css.cjs +4 -0
  98. package/dist/utils/css.d.ts +1 -0
  99. package/dist/utils/css.js +4 -0
  100. package/package.json +2 -2
  101. package/dist/components/tables/common/img.cjs +0 -4
  102. package/dist/components/tables/common/img.js +0 -4
  103. package/dist/components/tables/common/img2.cjs +0 -37
  104. package/dist/components/tables/common/img2.js +0 -37
  105. package/dist/components/tables/common/table-but.cjs +0 -4
  106. package/dist/components/tables/common/table-but.js +0 -4
  107. package/dist/components/tables/common/table-color.cjs +0 -4
  108. package/dist/components/tables/common/table-color.js +0 -4
  109. package/dist/components/tables/common/table-list.cjs +0 -4
  110. package/dist/components/tables/common/table-list.js +0 -4
  111. package/dist/components/tables/common/table-list2.cjs +0 -125
  112. package/dist/components/tables/common/table-list2.js +0 -125
  113. /package/dist/components/{global-config → draggable}/index.css +0 -0
  114. /package/dist/components/{forms-item → forms-items}/index.css +0 -0
  115. /package/dist/css/{global-config.css → draggable.css} +0 -0
  116. /package/dist/css/{forms-item.css → forms-items.css} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/fang-ui",
3
3
  "private": false,
4
- "version": "0.1.37",
4
+ "version": "0.1.39",
5
5
  "type": "module",
6
6
  "description ": "fang-ui",
7
7
  "keywords": [
@@ -52,8 +52,8 @@
52
52
  "vxe-table": "4.6.20",
53
53
  "@fang-ui/components": "0.0.1-0",
54
54
  "@fang-ui/directives": "0.0.1-0",
55
- "@fang-ui/icons": "0.0.1-0",
56
55
  "@fang-ui/hooks": "0.0.1-0",
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",
59
59
  "@fang-ui/types": "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;
@@ -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
File without changes