@fangzhongya/fang-ui 0.0.100 → 0.1.2

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.
@@ -190,7 +190,7 @@ function setComponString(value, obj, componObj, data, optionss, compons) {
190
190
  if (Object.keys(compons).includes(tcom)) {
191
191
  return vue.h(compons[tcom], componObj);
192
192
  } else {
193
- return vue.h(compon, componObj);
193
+ return vue.h(vue.resolveComponent(compon), componObj);
194
194
  }
195
195
  }
196
196
  function getOnObjs(obj, data, emit, ...arrs) {
@@ -204,15 +204,15 @@ function getOnObjs(obj, data, emit, ...arrs) {
204
204
  ml = firstLower.firstLower(lineToLargeHump.lineToLargeHump(ml));
205
205
  objs[ml] = (...v) => {
206
206
  if (es[key] && typeof es[key] == "function") {
207
- es[key](...v, data, obj);
207
+ es[key](...v, data, obj, ...arrs);
208
208
  } else {
209
- emit("list-events", key, ...v, data, obj, ...arrs);
209
+ emit("list-events", es[key] || key, ...v, data, obj, ...arrs);
210
210
  }
211
211
  };
212
212
  });
213
213
  return objs;
214
214
  }
215
- function useSetSlot(obj, data, slots, index) {
215
+ function useSetSlot(obj, data, slots, index, scope) {
216
216
  const slotname = obj.slot ?? obj.prop;
217
217
  if (slotname) {
218
218
  const slot = slots[slotname];
@@ -226,6 +226,7 @@ function useSetSlot(obj, data, slots, index) {
226
226
  }
227
227
  });
228
228
  return slot({
229
+ comscope: scope,
229
230
  column: obj,
230
231
  row: data,
231
232
  value,
@@ -234,18 +235,21 @@ function useSetSlot(obj, data, slots, index) {
234
235
  }
235
236
  }
236
237
  }
237
- function useSetCompon(obj, data, optionss, compons, emit, index) {
238
+ function useSetCompon(obj, data, optionss, compons, emit, index, scope) {
238
239
  if (obj.compon) {
239
240
  const value = getValue(obj, data, index);
240
241
  const componValueName = obj.componValueName || "modelValue";
242
+ const attrs = vue.useAttrs();
241
243
  const componObj = {
244
+ ...attrs,
242
245
  ...obj.config,
243
- ...getOnObjs(obj, data, emit),
246
+ ...getOnObjs(obj, data, emit, scope),
244
247
  multiple: obj.multiple,
245
248
  [componValueName]: value,
246
249
  ["onUpdate:" + componValueName]: (v) => setValue(v, obj, data),
247
250
  listobj: obj,
248
- valueobj: data
251
+ valueobj: data,
252
+ comscope: scope
249
253
  };
250
254
  if (typeof obj.compon == "string") {
251
255
  return setComponString(
@@ -10,8 +10,8 @@ export declare function getOnObjs(obj: ListObj, data: ObjAny, emit: Function, ..
10
10
  type Compons = {
11
11
  [key: string]: Component;
12
12
  };
13
- export declare function useSetSlot(obj: ListObj, data: ObjAny, slots: ObjAny, index?: number): any;
14
- export declare function useSetCompon(obj: ListObj, data: ObjAny, optionss: ObjAny, compons: Compons, emit: Function, index?: number): VNode<RendererNode, RendererElement, {
13
+ export declare function useSetSlot(obj: ListObj, data: ObjAny, slots: ObjAny, index?: number, scope?: ObjAny): any;
14
+ export declare function useSetCompon(obj: ListObj, data: ObjAny, optionss: ObjAny, compons: Compons, emit: Function, index?: number, scope?: ObjAny): VNode<RendererNode, RendererElement, {
15
15
  [key: string]: any;
16
16
  }> | undefined;
17
17
  export declare const useGetDomValue: (obj: ListObj, data: ObjAny, options: ObjAny, index?: number) => any;
@@ -1,4 +1,4 @@
1
- import { h, computed } from "vue";
1
+ import { h, resolveComponent, computed, useAttrs } from "vue";
2
2
  import "../../utils/index.js";
3
3
  import { isObject } from "@fangzhongya/utils/basic/object/isObject";
4
4
  import { getFathers, getChildrenData } from "../../utils/util.js";
@@ -188,7 +188,7 @@ function setComponString(value, obj, componObj, data, optionss, compons) {
188
188
  if (Object.keys(compons).includes(tcom)) {
189
189
  return h(compons[tcom], componObj);
190
190
  } else {
191
- return h(compon, componObj);
191
+ return h(resolveComponent(compon), componObj);
192
192
  }
193
193
  }
194
194
  function getOnObjs(obj, data, emit, ...arrs) {
@@ -202,15 +202,15 @@ function getOnObjs(obj, data, emit, ...arrs) {
202
202
  ml = firstLower(lineToLargeHump(ml));
203
203
  objs[ml] = (...v) => {
204
204
  if (es[key] && typeof es[key] == "function") {
205
- es[key](...v, data, obj);
205
+ es[key](...v, data, obj, ...arrs);
206
206
  } else {
207
- emit("list-events", key, ...v, data, obj, ...arrs);
207
+ emit("list-events", es[key] || key, ...v, data, obj, ...arrs);
208
208
  }
209
209
  };
210
210
  });
211
211
  return objs;
212
212
  }
213
- function useSetSlot(obj, data, slots, index) {
213
+ function useSetSlot(obj, data, slots, index, scope) {
214
214
  const slotname = obj.slot ?? obj.prop;
215
215
  if (slotname) {
216
216
  const slot = slots[slotname];
@@ -224,6 +224,7 @@ function useSetSlot(obj, data, slots, index) {
224
224
  }
225
225
  });
226
226
  return slot({
227
+ comscope: scope,
227
228
  column: obj,
228
229
  row: data,
229
230
  value,
@@ -232,18 +233,21 @@ function useSetSlot(obj, data, slots, index) {
232
233
  }
233
234
  }
234
235
  }
235
- function useSetCompon(obj, data, optionss, compons, emit, index) {
236
+ function useSetCompon(obj, data, optionss, compons, emit, index, scope) {
236
237
  if (obj.compon) {
237
238
  const value = getValue(obj, data, index);
238
239
  const componValueName = obj.componValueName || "modelValue";
240
+ const attrs = useAttrs();
239
241
  const componObj = {
242
+ ...attrs,
240
243
  ...obj.config,
241
- ...getOnObjs(obj, data, emit),
244
+ ...getOnObjs(obj, data, emit, scope),
242
245
  multiple: obj.multiple,
243
246
  [componValueName]: value,
244
247
  ["onUpdate:" + componValueName]: (v) => setValue(v, obj, data),
245
248
  listobj: obj,
246
- valueobj: data
249
+ valueobj: data,
250
+ comscope: scope
247
251
  };
248
252
  if (typeof obj.compon == "string") {
249
253
  return setComponString(
@@ -1,4 +1,7 @@
1
+ /**
2
+ * @config cover=true
3
+ */
1
4
  @use 'element-plus/theme-chalk/src/base.scss' as *;
2
- @use '../../date-picker-panel/style/index2.scss' as *;
5
+ // @use '../../date-picker-panel/style/index2.scss' as *;
3
6
  @use 'element-plus/theme-chalk/src/popper.scss' as *;
4
- @use 'element-plus/theme-chalk/src/date-picker.scss' as *;
7
+ @use 'element-plus/theme-chalk/src/date-picker.scss' as *;
@@ -3,22 +3,18 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const index = require("../../button/index.cjs");
5
5
  const util = require("./util.cjs");
6
- const isObject = require("@fangzhongya/utils/basic/object/isObject");
7
- const isArray = require("@fangzhongya/utils/basic/array/isArray");
8
6
  const _hoisted_1 = { class: "table-but" };
9
7
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
8
  __name: "table-but",
11
9
  props: {
12
- /**
13
- * table列表
14
- * {
15
- * label:"列表名称"
16
- * prop:"列表取值"
17
- * type:"列表类型"
18
- * }
19
- *
20
- */
21
- tableListObj: {
10
+ list: {
11
+ type: Array
12
+ },
13
+ isText: { type: Boolean },
14
+ isHide: {
15
+ type: Boolean
16
+ },
17
+ listobj: {
22
18
  type: Object,
23
19
  default() {
24
20
  return {};
@@ -29,82 +25,95 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
29
25
  * row, column, $index
30
26
  *
31
27
  */
32
- tableScope: {
28
+ valueobj: {
29
+ type: Object,
30
+ default() {
31
+ return {};
32
+ }
33
+ },
34
+ comscope: {
33
35
  type: Object,
34
36
  default() {
35
37
  return {};
36
38
  }
37
39
  }
38
40
  },
39
- emits: ["scope-click"],
41
+ emits: ["but"],
40
42
  setup(__props, { emit: __emit }) {
41
43
  const props = __props;
42
44
  const emit = __emit;
43
- function setValue(v) {
44
- if (isArray.isArray(v)) {
45
- return v;
46
- } else if (isObject.isObject(v)) {
47
- return [v];
45
+ function setShow(item) {
46
+ if (item.formatter) {
47
+ return item.formatter(
48
+ props.valueobj,
49
+ props.listobj,
50
+ item,
51
+ 0,
52
+ props.comscope
53
+ );
54
+ } else {
55
+ return false;
56
+ }
57
+ }
58
+ function getHide(item) {
59
+ if (props.isHide) {
60
+ return !setShow(item);
48
61
  } else {
49
- return [
50
- {
51
- value: v
52
- }
53
- ];
62
+ if (item.hide) {
63
+ return item.hide;
64
+ } else {
65
+ return true;
66
+ }
54
67
  }
55
68
  }
56
- function getValue(row, column, cellValue, index2, formatter) {
57
- if (formatter) {
58
- const v = formatter(row, column, cellValue, index2);
59
- return setValue(v);
69
+ function getDisabled(item) {
70
+ if (props.isHide) {
71
+ if (item.disabled) {
72
+ return item.disabled;
73
+ } else {
74
+ return false;
75
+ }
60
76
  } else {
61
- return setValue(cellValue);
77
+ return setShow(item);
62
78
  }
63
79
  }
64
80
  function onClick(obj, $event) {
81
+ var _a;
65
82
  util.eventAliass(
66
83
  (callback) => {
67
- callback(obj, props.tableScope, props.tableListObj, "but");
84
+ callback(
85
+ "but",
86
+ obj,
87
+ props.valueobj,
88
+ props.listobj,
89
+ props.comscope
90
+ );
68
91
  },
69
92
  "click",
70
- props.tableListObj,
93
+ ((_a = props.listobj) == null ? void 0 : _a.events) || {},
71
94
  $event
72
95
  );
73
- emit("scope-click", obj, props.tableScope, props.tableListObj, "but");
96
+ emit("but", obj);
74
97
  }
75
- const valueArr = vue.computed(() => {
76
- var _a;
77
- const prop = props.tableListObj.prop || "";
78
- const row = props.tableScope.row || {};
79
- const column = props.tableScope.column || {};
80
- const cellValue = row[prop];
81
- const index2 = props.tableScope.$index;
82
- const formatter = props.tableListObj.formatter;
83
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
84
- if (configFormatter) {
85
- const arr = configFormatter(row, column, cellValue, index2);
86
- return setValue(arr);
87
- } else {
88
- return getValue(row, column, cellValue, index2, formatter);
89
- }
90
- });
91
98
  return (_ctx, _cache) => {
92
99
  return vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
93
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(valueArr.value, (item, index$1) => {
94
- return vue.openBlock(), vue.createBlock(vue.unref(index.Button), {
95
- class: vue.normalizeClass(["table-but-li", item.class]),
96
- key: index$1,
97
- style: vue.normalizeStyle(item.style),
98
- onClick: ($event) => onClick(item, $event),
99
- type: item.type,
100
- round: item.round,
101
- text: typeof item.text == "undefined" ? true : item.text
102
- }, {
103
- default: vue.withCtx(() => [
104
- vue.createTextVNode(vue.toDisplayString(item.value), 1)
105
- ]),
106
- _: 2
107
- }, 1032, ["class", "style", "onClick", "type", "round", "text"]);
100
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.list, (item, index$1) => {
101
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index$1 }, [
102
+ getHide(item) ? (vue.openBlock(), vue.createBlock(vue.unref(index.Button), vue.mergeProps({
103
+ key: 0,
104
+ class: "table-but-li"
105
+ }, { ref_for: true }, item, {
106
+ link: props.isText ? true : item.link,
107
+ type: item.type ?? "primary",
108
+ disabled: getDisabled(item),
109
+ onClick: ($event) => onClick(item, $event)
110
+ }), {
111
+ default: vue.withCtx(() => [
112
+ vue.createTextVNode(vue.toDisplayString(item.label), 1)
113
+ ]),
114
+ _: 2
115
+ }, 1040, ["link", "type", "disabled", "onClick"])) : vue.createCommentVNode("", true)
116
+ ], 64);
108
117
  }), 128))
109
118
  ]);
110
119
  };
@@ -1,22 +1,18 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, Fragment, renderList, createBlock, createCommentVNode, unref, mergeProps, withCtx, createTextVNode, toDisplayString } from "vue";
2
2
  import { Button } from "../../button/index.js";
3
3
  import { eventAliass } from "./util.js";
4
- import { isObject } from "@fangzhongya/utils/basic/object/isObject";
5
- import { isArray } from "@fangzhongya/utils/basic/array/isArray";
6
4
  const _hoisted_1 = { class: "table-but" };
7
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
6
  __name: "table-but",
9
7
  props: {
10
- /**
11
- * table列表
12
- * {
13
- * label:"列表名称"
14
- * prop:"列表取值"
15
- * type:"列表类型"
16
- * }
17
- *
18
- */
19
- tableListObj: {
8
+ list: {
9
+ type: Array
10
+ },
11
+ isText: { type: Boolean },
12
+ isHide: {
13
+ type: Boolean
14
+ },
15
+ listobj: {
20
16
  type: Object,
21
17
  default() {
22
18
  return {};
@@ -27,82 +23,95 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
23
  * row, column, $index
28
24
  *
29
25
  */
30
- tableScope: {
26
+ valueobj: {
27
+ type: Object,
28
+ default() {
29
+ return {};
30
+ }
31
+ },
32
+ comscope: {
31
33
  type: Object,
32
34
  default() {
33
35
  return {};
34
36
  }
35
37
  }
36
38
  },
37
- emits: ["scope-click"],
39
+ emits: ["but"],
38
40
  setup(__props, { emit: __emit }) {
39
41
  const props = __props;
40
42
  const emit = __emit;
41
- function setValue(v) {
42
- if (isArray(v)) {
43
- return v;
44
- } else if (isObject(v)) {
45
- return [v];
43
+ function setShow(item) {
44
+ if (item.formatter) {
45
+ return item.formatter(
46
+ props.valueobj,
47
+ props.listobj,
48
+ item,
49
+ 0,
50
+ props.comscope
51
+ );
52
+ } else {
53
+ return false;
54
+ }
55
+ }
56
+ function getHide(item) {
57
+ if (props.isHide) {
58
+ return !setShow(item);
46
59
  } else {
47
- return [
48
- {
49
- value: v
50
- }
51
- ];
60
+ if (item.hide) {
61
+ return item.hide;
62
+ } else {
63
+ return true;
64
+ }
52
65
  }
53
66
  }
54
- function getValue(row, column, cellValue, index, formatter) {
55
- if (formatter) {
56
- const v = formatter(row, column, cellValue, index);
57
- return setValue(v);
67
+ function getDisabled(item) {
68
+ if (props.isHide) {
69
+ if (item.disabled) {
70
+ return item.disabled;
71
+ } else {
72
+ return false;
73
+ }
58
74
  } else {
59
- return setValue(cellValue);
75
+ return setShow(item);
60
76
  }
61
77
  }
62
78
  function onClick(obj, $event) {
79
+ var _a;
63
80
  eventAliass(
64
81
  (callback) => {
65
- callback(obj, props.tableScope, props.tableListObj, "but");
82
+ callback(
83
+ "but",
84
+ obj,
85
+ props.valueobj,
86
+ props.listobj,
87
+ props.comscope
88
+ );
66
89
  },
67
90
  "click",
68
- props.tableListObj,
91
+ ((_a = props.listobj) == null ? void 0 : _a.events) || {},
69
92
  $event
70
93
  );
71
- emit("scope-click", obj, props.tableScope, props.tableListObj, "but");
94
+ emit("but", obj);
72
95
  }
73
- const valueArr = computed(() => {
74
- var _a;
75
- const prop = props.tableListObj.prop || "";
76
- const row = props.tableScope.row || {};
77
- const column = props.tableScope.column || {};
78
- const cellValue = row[prop];
79
- const index = props.tableScope.$index;
80
- const formatter = props.tableListObj.formatter;
81
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
82
- if (configFormatter) {
83
- const arr = configFormatter(row, column, cellValue, index);
84
- return setValue(arr);
85
- } else {
86
- return getValue(row, column, cellValue, index, formatter);
87
- }
88
- });
89
96
  return (_ctx, _cache) => {
90
97
  return openBlock(), createElementBlock("span", _hoisted_1, [
91
- (openBlock(true), createElementBlock(Fragment, null, renderList(valueArr.value, (item, index) => {
92
- return openBlock(), createBlock(unref(Button), {
93
- class: normalizeClass(["table-but-li", item.class]),
94
- key: index,
95
- style: normalizeStyle(item.style),
96
- onClick: ($event) => onClick(item, $event),
97
- type: item.type,
98
- round: item.round,
99
- text: typeof item.text == "undefined" ? true : item.text
100
- }, {
101
- default: withCtx(() => [
102
- createTextVNode(toDisplayString(item.value), 1)
103
- ]),
104
- _: 2
105
- }, 1032, ["class", "style", "onClick", "type", "round", "text"]);
98
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.list, (item, index) => {
99
+ return openBlock(), createElementBlock(Fragment, { key: index }, [
100
+ getHide(item) ? (openBlock(), createBlock(unref(Button), mergeProps({
101
+ key: 0,
102
+ class: "table-but-li"
103
+ }, { ref_for: true }, item, {
104
+ link: props.isText ? true : item.link,
105
+ type: item.type ?? "primary",
106
+ disabled: getDisabled(item),
107
+ onClick: ($event) => onClick(item, $event)
108
+ }), {
109
+ default: withCtx(() => [
110
+ createTextVNode(toDisplayString(item.label), 1)
111
+ ]),
112
+ _: 2
113
+ }, 1040, ["link", "type", "disabled", "onClick"])) : createCommentVNode("", true)
114
+ ], 64);
106
115
  }), 128))
107
116
  ]);
108
117
  };
@@ -2,21 +2,23 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const util = require("./util.cjs");
5
- const isObject = require("@fangzhongya/utils/basic/object/isObject");
6
- const _hoisted_1 = { class: "table-color-value" };
7
5
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
6
  __name: "table-color",
9
7
  props: {
10
- /**
11
- * table列表
12
- * {
13
- * label:"列表名称"
14
- * prop:"列表取值"
15
- * type:"列表类型"
16
- * }
17
- *
18
- */
19
- tableListObj: {
8
+ class: {
9
+ type: [String, Function]
10
+ },
11
+ style: {
12
+ type: [String, Object]
13
+ },
14
+ isWhite: Boolean,
15
+ isBackg: Boolean,
16
+ color: String,
17
+ formatter: Function,
18
+ modelValue: {
19
+ type: String
20
+ },
21
+ listobj: {
20
22
  type: Object,
21
23
  default() {
22
24
  return {};
@@ -27,92 +29,100 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
29
  * row, column, $index
28
30
  *
29
31
  */
30
- tableScope: {
32
+ valueobj: {
33
+ type: Object,
34
+ default() {
35
+ return {};
36
+ }
37
+ },
38
+ comscope: {
31
39
  type: Object,
32
40
  default() {
33
41
  return {};
34
42
  }
35
43
  }
36
44
  },
37
- emits: ["scope-click"],
45
+ emits: ["color"],
38
46
  setup(__props, { emit: __emit }) {
39
47
  const props = __props;
40
48
  const emit = __emit;
41
- function setValue(v) {
42
- if (isObject.isObject(v)) {
43
- return v;
44
- } else {
45
- return {
46
- value: v
47
- };
48
- }
49
- }
50
- function getValue(row, column, cellValue, index, formatter) {
51
- if (formatter) {
52
- const v = formatter(row, column, cellValue, index);
53
- return setValue(v);
54
- } else {
55
- return setValue(cellValue);
56
- }
57
- }
58
- const valueObj = vue.computed(() => {
59
- var _a, _b, _c, _d;
60
- const prop = props.tableListObj.prop || "";
61
- const row = ((_a = props.tableScope) == null ? void 0 : _a.row) || {};
62
- const column = ((_b = props.tableScope) == null ? void 0 : _b.column) || {};
63
- const cellValue = row[prop];
64
- const index = (_c = props.tableScope) == null ? void 0 : _c.$index;
65
- const formatter = props.tableListObj.formatter;
66
- const configFormatter = (_d = props.tableListObj.config) == null ? void 0 : _d.formatter;
67
- if (configFormatter) {
68
- const obj = configFormatter(row, column, cellValue, index);
69
- let css;
70
- let value = "";
71
- let style;
72
- if (isObject.isObject(obj)) {
73
- value = obj.value;
74
- css = obj.class;
75
- style = obj.style;
49
+ const className = vue.computed(() => {
50
+ if (props.class) {
51
+ if (typeof props.class == "function") {
52
+ return props.class(
53
+ props.valueobj,
54
+ props.listobj,
55
+ props.modelValue,
56
+ 0,
57
+ props.comscope
58
+ );
76
59
  } else {
77
- css = obj;
60
+ return props.class;
78
61
  }
79
- if (!value) {
80
- value = getValue(
81
- row,
82
- column,
83
- cellValue,
84
- index,
85
- formatter
86
- ).value;
62
+ }
63
+ return;
64
+ });
65
+ const color = vue.computed(() => {
66
+ if (props.isBackg) {
67
+ if (props.isWhite) {
68
+ return "#fff";
87
69
  }
88
- return {
89
- class: css,
90
- value,
91
- style
92
- };
93
70
  } else {
94
- return getValue(row, column, cellValue, index, formatter);
71
+ return getValue();
72
+ }
73
+ return;
74
+ });
75
+ const backgroundColor = vue.computed(() => {
76
+ if (props.isBackg) {
77
+ return getValue();
95
78
  }
79
+ return;
96
80
  });
81
+ function getValue() {
82
+ if (props.formatter) {
83
+ return props.formatter(
84
+ props.valueobj,
85
+ props.listobj,
86
+ props.color,
87
+ 0,
88
+ props.comscope
89
+ );
90
+ } else {
91
+ return props.color;
92
+ }
93
+ }
97
94
  function onClick($event) {
98
- let obj = valueObj.value;
95
+ var _a;
96
+ const obj = {};
99
97
  util.eventAliass(
100
98
  (callback) => {
101
- callback(obj, props.tableScope, props.tableListObj, "color");
99
+ callback(
100
+ "color",
101
+ obj,
102
+ props.valueobj,
103
+ props.listobj,
104
+ props.comscope
105
+ );
102
106
  },
103
107
  "click",
104
- props.tableListObj,
108
+ ((_a = props.listobj) == null ? void 0 : _a.events) || {},
105
109
  $event
106
110
  );
107
- emit("scope-click", obj, props.tableScope, props.tableListObj, "color");
111
+ emit("color", obj);
108
112
  }
109
113
  return (_ctx, _cache) => {
110
114
  return vue.openBlock(), vue.createElementBlock("span", {
111
- class: vue.normalizeClass(["table-color", valueObj.value.class]),
115
+ class: vue.normalizeClass(["table-color", className.value]),
112
116
  onClick: _cache[0] || (_cache[0] = ($event) => onClick($event)),
113
- style: vue.normalizeStyle(valueObj.value.style)
117
+ style: vue.normalizeStyle(props.style)
114
118
  }, [
115
- vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(valueObj.value.value), 1)
119
+ vue.createElementVNode("span", {
120
+ style: vue.normalizeStyle({
121
+ color: color.value,
122
+ backgroundColor: backgroundColor.value
123
+ }),
124
+ class: "table-color-value"
125
+ }, vue.toDisplayString(props.modelValue), 5)
116
126
  ], 6);
117
127
  };
118
128
  }
@@ -1,20 +1,22 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, toDisplayString } from "vue";
2
2
  import { eventAliass } from "./util.js";
3
- import { isObject } from "@fangzhongya/utils/basic/object/isObject";
4
- const _hoisted_1 = { class: "table-color-value" };
5
3
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
4
  __name: "table-color",
7
5
  props: {
8
- /**
9
- * table列表
10
- * {
11
- * label:"列表名称"
12
- * prop:"列表取值"
13
- * type:"列表类型"
14
- * }
15
- *
16
- */
17
- tableListObj: {
6
+ class: {
7
+ type: [String, Function]
8
+ },
9
+ style: {
10
+ type: [String, Object]
11
+ },
12
+ isWhite: Boolean,
13
+ isBackg: Boolean,
14
+ color: String,
15
+ formatter: Function,
16
+ modelValue: {
17
+ type: String
18
+ },
19
+ listobj: {
18
20
  type: Object,
19
21
  default() {
20
22
  return {};
@@ -25,92 +27,100 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
27
  * row, column, $index
26
28
  *
27
29
  */
28
- tableScope: {
30
+ valueobj: {
31
+ type: Object,
32
+ default() {
33
+ return {};
34
+ }
35
+ },
36
+ comscope: {
29
37
  type: Object,
30
38
  default() {
31
39
  return {};
32
40
  }
33
41
  }
34
42
  },
35
- emits: ["scope-click"],
43
+ emits: ["color"],
36
44
  setup(__props, { emit: __emit }) {
37
45
  const props = __props;
38
46
  const emit = __emit;
39
- function setValue(v) {
40
- if (isObject(v)) {
41
- return v;
42
- } else {
43
- return {
44
- value: v
45
- };
46
- }
47
- }
48
- function getValue(row, column, cellValue, index, formatter) {
49
- if (formatter) {
50
- const v = formatter(row, column, cellValue, index);
51
- return setValue(v);
52
- } else {
53
- return setValue(cellValue);
54
- }
55
- }
56
- const valueObj = computed(() => {
57
- var _a, _b, _c, _d;
58
- const prop = props.tableListObj.prop || "";
59
- const row = ((_a = props.tableScope) == null ? void 0 : _a.row) || {};
60
- const column = ((_b = props.tableScope) == null ? void 0 : _b.column) || {};
61
- const cellValue = row[prop];
62
- const index = (_c = props.tableScope) == null ? void 0 : _c.$index;
63
- const formatter = props.tableListObj.formatter;
64
- const configFormatter = (_d = props.tableListObj.config) == null ? void 0 : _d.formatter;
65
- if (configFormatter) {
66
- const obj = configFormatter(row, column, cellValue, index);
67
- let css;
68
- let value = "";
69
- let style;
70
- if (isObject(obj)) {
71
- value = obj.value;
72
- css = obj.class;
73
- style = obj.style;
47
+ const className = computed(() => {
48
+ if (props.class) {
49
+ if (typeof props.class == "function") {
50
+ return props.class(
51
+ props.valueobj,
52
+ props.listobj,
53
+ props.modelValue,
54
+ 0,
55
+ props.comscope
56
+ );
74
57
  } else {
75
- css = obj;
58
+ return props.class;
76
59
  }
77
- if (!value) {
78
- value = getValue(
79
- row,
80
- column,
81
- cellValue,
82
- index,
83
- formatter
84
- ).value;
60
+ }
61
+ return;
62
+ });
63
+ const color = computed(() => {
64
+ if (props.isBackg) {
65
+ if (props.isWhite) {
66
+ return "#fff";
85
67
  }
86
- return {
87
- class: css,
88
- value,
89
- style
90
- };
91
68
  } else {
92
- return getValue(row, column, cellValue, index, formatter);
69
+ return getValue();
70
+ }
71
+ return;
72
+ });
73
+ const backgroundColor = computed(() => {
74
+ if (props.isBackg) {
75
+ return getValue();
93
76
  }
77
+ return;
94
78
  });
79
+ function getValue() {
80
+ if (props.formatter) {
81
+ return props.formatter(
82
+ props.valueobj,
83
+ props.listobj,
84
+ props.color,
85
+ 0,
86
+ props.comscope
87
+ );
88
+ } else {
89
+ return props.color;
90
+ }
91
+ }
95
92
  function onClick($event) {
96
- let obj = valueObj.value;
93
+ var _a;
94
+ const obj = {};
97
95
  eventAliass(
98
96
  (callback) => {
99
- callback(obj, props.tableScope, props.tableListObj, "color");
97
+ callback(
98
+ "color",
99
+ obj,
100
+ props.valueobj,
101
+ props.listobj,
102
+ props.comscope
103
+ );
100
104
  },
101
105
  "click",
102
- props.tableListObj,
106
+ ((_a = props.listobj) == null ? void 0 : _a.events) || {},
103
107
  $event
104
108
  );
105
- emit("scope-click", obj, props.tableScope, props.tableListObj, "color");
109
+ emit("color", obj);
106
110
  }
107
111
  return (_ctx, _cache) => {
108
112
  return openBlock(), createElementBlock("span", {
109
- class: normalizeClass(["table-color", valueObj.value.class]),
113
+ class: normalizeClass(["table-color", className.value]),
110
114
  onClick: _cache[0] || (_cache[0] = ($event) => onClick($event)),
111
- style: normalizeStyle(valueObj.value.style)
115
+ style: normalizeStyle(props.style)
112
116
  }, [
113
- createElementVNode("span", _hoisted_1, toDisplayString(valueObj.value.value), 1)
117
+ createElementVNode("span", {
118
+ style: normalizeStyle({
119
+ color: color.value,
120
+ backgroundColor: backgroundColor.value
121
+ }),
122
+ class: "table-color-value"
123
+ }, toDisplayString(props.modelValue), 5)
114
124
  ], 6);
115
125
  };
116
126
  }
@@ -29,7 +29,7 @@ function setProps(obj, props) {
29
29
  return robj;
30
30
  }
31
31
  function setSslot(obj, scope, emit, slots, props, index2) {
32
- const slot = use.useSetSlot(obj, scope.row, slots, index2);
32
+ const slot = use.useSetSlot(obj, scope.row, slots, index2, scope);
33
33
  if (slot) {
34
34
  return slot;
35
35
  }
@@ -44,7 +44,8 @@ function setSslot(obj, scope, emit, slots, props, index2) {
44
44
  optionss,
45
45
  compons.getCompons(compons$1),
46
46
  emit,
47
- index2
47
+ index2,
48
+ scope
48
49
  );
49
50
  if (column) {
50
51
  return column;
@@ -27,7 +27,7 @@ function setProps(obj, props) {
27
27
  return robj;
28
28
  }
29
29
  function setSslot(obj, scope, emit, slots, props, index) {
30
- const slot = useSetSlot(obj, scope.row, slots, index);
30
+ const slot = useSetSlot(obj, scope.row, slots, index, scope);
31
31
  if (slot) {
32
32
  return slot;
33
33
  }
@@ -42,7 +42,8 @@ function setSslot(obj, scope, emit, slots, props, index) {
42
42
  optionss,
43
43
  getCompons(compons),
44
44
  emit,
45
- index
45
+ index,
46
+ scope
46
47
  );
47
48
  if (column) {
48
49
  return column;
@@ -1,4 +1,5 @@
1
1
  @use '../../loading/style/index2.scss' as *;
2
2
  @use '../../table-column/style/index2.scss' as *;
3
3
  @use '../../table/style/index2.scss' as *;
4
+ @use '../../button/style/index2.scss' as *;
4
5
  @use '../index.scss' as *;
@@ -15,17 +15,17 @@
15
15
  --icon-svg-edit: url("data:image/svg+xml;utf8,%3Csvg id='icon-edit' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill='currentColor' d='M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640V512z' %3E%3C/path%3E %3Cpath fill='currentColor' d='m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z' %3E%3C/path%3E %3C/svg%3E");
16
16
  --icon-svg-enter: url("data:image/svg+xml;utf8,%3Csvg id='icon-enter' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M656.36179153 933.07378604a68.79342673 68.79342673 0 0 1-27.51737036-5.96209735 71.08654065 71.08654065 0 0 1-42.1933016-65.58306674v-256.82879141L226.17356421 915.64611825a67.87618066 67.87618066 0 0 1-73.8382772 12.38281651A71.08654065 71.08654065 0 0 1 110.14198542 861.52862195V161.67016327A71.08654065 71.08654065 0 0 1 152.79390964 96.08709734a67.87618066 67.87618066 0 0 1 73.838278 12.84143913l359.56030848 310.94628772V161.67016327a71.08654065 71.08654065 0 0 1 42.65192505-65.58306592 67.87618066 67.87618066 0 0 1 74.29690063 12.84143912L1107.64666924 457.02327451a72.00378671 72.00378671 0 0 1 0 105.94187704L702.22407574 915.64611825a68.33480328 68.33480328 0 0 1-45.86228422 17.42766779z m-476.96775677-72.00378671l405.88121611-349.47060672-404.50534743-351.76372064v701.69294998z m476.0505107 0l405.88121696-349.47060672-404.50534827-351.76372064v701.69294998z' fill='%232c2c2c' p-id='2173'%3E%3C/path%3E%3C/svg%3E");
17
17
  --icon-svg-frame: url("data:image/svg+xml;utf8,%3Csvg id='icon-frame' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M782 912.00000031h-540C170 912.00000031 111.99999969 854 111.99999969 782v-540C111.99999969 170 170 111.99999969 242 111.99999969h538.00000031c72 0 130.00000031 58.00000031 129.99999938 130.00000031v538.00000031c1.99999969 73.99999969-55.99999969 132-127.99999969 132z m-540-740.00000062C204.00000031 171.99999969 171.99999969 204.00000031 171.99999969 242v538.00000031c0 37.99999969 31.99999969 70.00000031 70.00000031 69.99999938h538.00000031c37.99999969 0 70.00000031-31.99999969 69.99999938-69.99999938V242C852.00000031 204.00000031 819.99999969 171.99999969 782 171.99999969h-540z'%3E%3C/path%3E %3C/svg%3E");
18
- --icon-svg-pause: url("data:image/svg+xml;utf8,%3Csvg id='icon-pause' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M512.75766904 961.99942783A449.99971348 449.99971348 0 0 1 337.51316182 97.22502617a449.99971348 449.99971348 0 0 1 350.48901357 828.66874922 447.35783643 447.35783643 0 0 1-175.24450635 36.10565244z m0-829.5493746C303.16876104 132.45005323 133.20800791 302.41080635 133.20800791 511.99971347s169.96075312 379.54966113 379.54966113 379.54966114 379.54966113-170.84137852 379.54966026-379.54966113S721.46595078 132.45005323 512.75766904 132.45005323z' fill='' p-id='1388'%3E%3C/path%3E%3Cpath d='M409.72446583 725.11112393a35.22502617 35.22502617 0 0 1-35.22502619-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005323 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617zM619.31337383 725.11112393a35.22502617 35.22502617 0 0 1-35.22502617-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005322 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617z' fill='' p-id='1389'%3E%3C/path%3E%3C/svg%3E");
19
18
  --icon-svg-left: url("data:image/svg+xml;utf8,%3Csvg id='icon-left' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill='currentColor' d='M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z' %3E%3C/path%3E %3C/svg%3E");
19
+ --icon-svg-mute: url("data:image/svg+xml;utf8,%3Csvg id='icon-mute' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M878.04586667 942.39857813l-796.4444448-796.4444448 64.35271146-64.35271146 796.4444448 796.4444448-64.35271146 64.35271146zM466.48888853 227.3507552V352.71111147h91.02222294V130.2755552c0-41.3923552-48.99271147-63.21493333-79.75822294-35.52142187l-109.9776 98.98666667 60.89386667 67.65226667L466.48888853 227.328z m348.63786667 446.91911147c68.97208853-142.9504 48.58311147-302.6944-68.4259552-419.72622187l64.35271147-64.35271147c146.09066667 146.06791147 170.8032 348.00071147 86.0615104 523.62808854l-81.98826667-39.5491552zM170.66666667 375.46666667h22.7555552v-91.02222187H127.43111147A47.78666667 47.78666667 0 0 0 79.6444448 332.23111147v359.53777706c0 26.3964448 21.39022187 47.78666667 47.78666667 47.78666667h139.55982186l210.7619552 189.69031147c30.76551147 27.69351147 79.75822187 5.87093333 79.75822294-35.49866667V671.28888853h-91.02222294v125.38311147L301.8979552 648.53333333H170.66666667V375.46666667z m499.3024 165.13706666c17.68106667-44.19128853-2.2755552-107.61102187-51.9964448-157.33191146l64.35271146-64.37546667c62.41848853 62.41848853 109.1356448 163.15733333 72.13511147 255.5448896l-84.49137813-33.83751147z' p-id='1906'%3E%3C/path%3E%3C/svg%3E");
20
+ --icon-svg-pause: url("data:image/svg+xml;utf8,%3Csvg id='icon-pause' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M512.75766904 961.99942783A449.99971348 449.99971348 0 0 1 337.51316182 97.22502617a449.99971348 449.99971348 0 0 1 350.48901357 828.66874922 447.35783643 447.35783643 0 0 1-175.24450635 36.10565244z m0-829.5493746C303.16876104 132.45005323 133.20800791 302.41080635 133.20800791 511.99971347s169.96075312 379.54966113 379.54966113 379.54966114 379.54966113-170.84137852 379.54966026-379.54966113S721.46595078 132.45005323 512.75766904 132.45005323z' fill='' p-id='1388'%3E%3C/path%3E%3Cpath d='M409.72446583 725.11112393a35.22502617 35.22502617 0 0 1-35.22502619-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005323 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617zM619.31337383 725.11112393a35.22502617 35.22502617 0 0 1-35.22502617-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005322 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617z' fill='' p-id='1389'%3E%3C/path%3E%3C/svg%3E");
20
21
  --icon-svg-play: url("data:image/svg+xml;utf8,%3Csvg id='icon-play' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M512.01404492 62C263.87572168 62 62 263.87572168 62 512.01404492s201.87572168 449.98595508 450.01404492 449.98595508c248.11023339 0 449.98595508-201.87572168 449.98595508-449.98595508S760.12427832 62 512.01404492 62zM512.01404492 905.82197802C294.85790088 905.82197802 118.17802198 729.14209912 118.17802198 512.01404492S294.85790088 118.17802198 512.01404492 118.17802198c217.12805508 0 393.80793398 176.67987891 393.80793399 393.83602294S729.14209912 905.82197802 512.01404492 905.82197802zM715.09759385 477.01513672l-245.94737959-150.44474268-3.62348262-1.88196415c-2.07858692-0.89884864-21.06675791-8.73568213-41.26275703-8.73568213-34.9427294 0-57.55438301 23.22961172-57.554383 59.12736766l0 285.55288507 1.51680673 4.40997451c5.28073418 15.53322305 23.0049 41.79644825 55.70050869 41.79644825l0 0c10.39293369 0 21.15102568-2.80890088 33.00458818-8.87612784l243.13847872-137.8046874 2.38756552-1.5448957c16.74105029-11.8535625 34.83037354-41.62791445 16.20735909-75.16619297L715.09759385 477.01513672zM430.30311172 648.55472714c-3.53921573 1.79769638-5.53353487 2.07858692-6.17958281 2.13476486-0.33706846-0.28089053-0.75840293-0.75840293-1.20782725-1.34827296l0-274.26110273c0-1.20782724 0.05617793-2.19094277 0.16853379-2.92125674 5.19646729-0.28089053 14.91526494 2.16285381 18.9039041 3.62348262l225.80755928 138.11366689L430.30311172 648.55472714z' fill='%232c2c2c' p-id='1545'%3E%3C/path%3E%3C/svg%3E");
21
22
  --icon-svg-plus: url("data:image/svg+xml;utf8,%3Csvg id='icon-plus' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill='currentColor' d='M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z'%3E%3C/path%3E %3C/svg%3E");
22
- --icon-svg-mute: url("data:image/svg+xml;utf8,%3Csvg id='icon-mute' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M878.04586667 942.39857813l-796.4444448-796.4444448 64.35271146-64.35271146 796.4444448 796.4444448-64.35271146 64.35271146zM466.48888853 227.3507552V352.71111147h91.02222294V130.2755552c0-41.3923552-48.99271147-63.21493333-79.75822294-35.52142187l-109.9776 98.98666667 60.89386667 67.65226667L466.48888853 227.328z m348.63786667 446.91911147c68.97208853-142.9504 48.58311147-302.6944-68.4259552-419.72622187l64.35271147-64.35271147c146.09066667 146.06791147 170.8032 348.00071147 86.0615104 523.62808854l-81.98826667-39.5491552zM170.66666667 375.46666667h22.7555552v-91.02222187H127.43111147A47.78666667 47.78666667 0 0 0 79.6444448 332.23111147v359.53777706c0 26.3964448 21.39022187 47.78666667 47.78666667 47.78666667h139.55982186l210.7619552 189.69031147c30.76551147 27.69351147 79.75822187 5.87093333 79.75822294-35.49866667V671.28888853h-91.02222294v125.38311147L301.8979552 648.53333333H170.66666667V375.46666667z m499.3024 165.13706666c17.68106667-44.19128853-2.2755552-107.61102187-51.9964448-157.33191146l64.35271146-64.37546667c62.41848853 62.41848853 109.1356448 163.15733333 72.13511147 255.5448896l-84.49137813-33.83751147z' p-id='1906'%3E%3C/path%3E%3C/svg%3E");
23
23
  --icon-svg-retreat: url("data:image/svg+xml;utf8,%3Csvg id='icon-retreat' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M559.63820844 90.92621397a68.79342673 68.79342673 0 0 1 27.51737036 5.96209734 71.08654065 71.08654065 0 0 1 42.1933016 65.58306674l0 256.82879141L989.82643576 108.35388176a67.87618066 67.87618066 0 0 1 73.8382772-12.38281652A71.08654065 71.08654065 0 0 1 1105.85801454 162.47137805L1105.85801455 862.32983673A71.08654065 71.08654065 0 0 1 1063.20609033 927.91290266a67.87618066 67.87618066 0 0 1-73.838278-12.84143913l-359.56030848-310.94628772L629.80750385 862.32983672a71.08654065 71.08654065 0 0 1-42.65192505 65.58306593 67.87618066 67.87618066 0 0 1-74.29690062-12.84143912L108.35333073 566.97672549a72.00378671 72.00378671 0 0 1-1e-8-105.94187704L513.77592423 108.35388176a68.33480328 68.33480328 0 0 1 45.86228422-17.4276678z m476.96775677 72.0037867l-405.88121611 349.47060672 404.50534743 351.76372064 0-701.69294998z m-476.05051069 0l-405.88121697 349.47060672 404.50534827 351.76372064 0-701.69294998z' fill='%232c2c2c' p-id='2329'%3E%3C/path%3E%3C/svg%3E");
24
24
  --icon-svg-right: url("data:image/svg+xml;utf8,%3Csvg id='icon-right' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill='currentColor' d='M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z' %3E%3C/path%3E %3C/svg%3E");
25
25
  --icon-svg-sound: url("data:image/svg+xml;utf8,%3Csvg id='icon-sound' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M572.16 104.96a47.04 47.04 0 0 0-49.92 4.48L181.76 360.96H70.4c-26.24 0-48 21.76-48 48v245.12c0 26.24 21.76 48 48 48h111.36l344.32 203.52c7.68 4.48 16 6.4 24.32 6.4s16.64-1.92 23.68-6.4c14.72-8.32 24.32-24.32 24.32-41.6V147.84a48.64 48.64 0 0 0-26.24-42.88zM502.4 780.16L230.4 619.52l-11.52-6.4a47.744 47.744 0 0 0-24.32-6.4H118.4V456.96h78.72c10.24 0 20.48-3.2 28.8-9.6l276.48-204.8v537.6zM760.32 338.56c-18.56-18.56-49.28-18.56-67.84 0s-18.56 49.28 0 67.84c51.84 51.84 51.84 136.32 0 188.16-18.56 18.56-18.56 49.28 0 67.84 9.6 9.6 21.76 14.08 33.92 14.08s24.32-4.48 33.92-14.08c88.96-88.96 88.96-234.24 0-323.84z' p-id='1749'%3E%3C/path%3E%3Cpath d='M888.32 210.56c-18.56-18.56-49.28-18.56-67.84 0s-18.56 49.28 0 67.84a314.816 314.816 0 0 1 0 444.16c-18.56 18.56-18.56 49.28 0 67.84 9.6 9.6 21.76 14.08 33.92 14.08s24.32-4.48 33.92-14.08a410.24 410.24 0 0 0 0-579.84z' p-id='1750'%3E%3C/path%3E%3C/svg%3E");
26
26
  --icon-svg-star: url("data:image/svg+xml;utf8,%3Csvg id='icon-star' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M213.875 956.375c-78.75 0-146.25-61.875-146.25-146.25V450.125c0-78.75 61.875-146.25 146.25-146.25h365.62500001c78.75 0 146.25 61.875 146.24999999 146.25v365.625c0 78.75-61.875 146.25-146.25000001 146.25l-365.62499999-5.625z m0-579.375c-45 0-78.75 33.75-78.75 78.75v365.625c0 45 33.75 78.75 78.75 78.75h365.62500001c45 0 78.75-33.75 78.74999999-78.75V450.125c0-45-33.75-78.75-78.74999999-78.75H213.875z' p-id='1087'%3E%3C/path%3E%3Cpath d='M810.125 78.875H444.49999999C360.125 78.875 298.25 146.375 298.25 225.125v22.5h61.875v-22.5c0-45 33.75-78.75 78.75-78.75h360c45 0 78.75 33.75 78.75 78.75v360c0 45-33.75 78.75-78.75 78.75h-33.75V737h45c84.375 0 146.25-67.50000001 146.25-146.25V225.125c0-84.375-67.50000001-146.25-146.25-146.25z' p-id='1088'%3E%3C/path%3E %3C/svg%3E");
27
- --icon-svg-views: url("data:image/svg+xml;utf8,%3Csvg id='icon-views' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z'%3E%3C/path%3E%3C/svg%3E");
28
27
  --icon-svg-up: url("data:image/svg+xml;utf8,%3Csvg id='icon-up' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M149.33333334 887.33013334c0 18.8416 15.29173333 34.13333333 34.13333333 34.13333333S217.6 906.17173333 217.6 887.33013333l0-301.73866666L807.90186667 914.56853333c19.38773333 10.78613333 42.5984 10.71786667 61.98613334 0C889.344 903.71413332 900.88106667 884.39466667 900.88106667 862.75413333l0-700.416c0-21.57226667-11.53706667-41.02826667-30.99306667-51.8144C860.19413334 105.13066667 849.6128 102.4 838.9632 102.4s-21.29919999 2.73066667-30.99306666 8.12373333L217.6 439.5008l0-303.03573333c0-18.8416-15.29173333-34.13333333-34.13333333-34.13333334s-34.13333333 15.29173333-34.13333334 34.13333334L149.33333334 887.33013334zM832.2048 173.60213333L835.54986667 853.33333333l-611.53279999-340.7872L832.2048 173.60213333z' p-id='2637'%3E%3C/path%3E%3C/svg%3E");
28
+ --icon-svg-views: url("data:image/svg+xml;utf8,%3Csvg id='icon-views' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z'%3E%3C/path%3E%3C/svg%3E");
29
29
  }
30
30
  .icon-bar {
31
31
  height: 1em;
@@ -172,13 +172,6 @@
172
172
  background-size: 100% 100%;
173
173
  background-color: transparent;
174
174
  }
175
- .icon-pause {
176
- height: 1em;
177
- width: 1em;
178
- background: var(--icon-svg-pause) no-repeat;
179
- background-size: 100% 100%;
180
- background-color: transparent;
181
- }
182
175
  .icon-left {
183
176
  height: 1em;
184
177
  width: 1em;
@@ -189,6 +182,20 @@
189
182
  mask-size: 100% 100%;
190
183
  color: inherit;
191
184
  }
185
+ .icon-mute {
186
+ height: 1em;
187
+ width: 1em;
188
+ background: var(--icon-svg-mute) no-repeat;
189
+ background-size: 100% 100%;
190
+ background-color: transparent;
191
+ }
192
+ .icon-pause {
193
+ height: 1em;
194
+ width: 1em;
195
+ background: var(--icon-svg-pause) no-repeat;
196
+ background-size: 100% 100%;
197
+ background-color: transparent;
198
+ }
192
199
  .icon-play {
193
200
  height: 1em;
194
201
  width: 1em;
@@ -206,13 +213,6 @@
206
213
  mask-size: 100% 100%;
207
214
  color: inherit;
208
215
  }
209
- .icon-mute {
210
- height: 1em;
211
- width: 1em;
212
- background: var(--icon-svg-mute) no-repeat;
213
- background-size: 100% 100%;
214
- background-color: transparent;
215
- }
216
216
  .icon-retreat {
217
217
  height: 1em;
218
218
  width: 1em;
@@ -244,6 +244,13 @@
244
244
  background-size: 100% 100%;
245
245
  background-color: transparent;
246
246
  }
247
+ .icon-up {
248
+ height: 1em;
249
+ width: 1em;
250
+ background: var(--icon-svg-up) no-repeat;
251
+ background-size: 100% 100%;
252
+ background-color: transparent;
253
+ }
247
254
  .icon-views {
248
255
  height: 1em;
249
256
  width: 1em;
@@ -253,11 +260,4 @@
253
260
  -webkit-mask-size: 100% 100%;
254
261
  mask-size: 100% 100%;
255
262
  color: inherit;
256
- }
257
- .icon-up {
258
- height: 1em;
259
- width: 1em;
260
- background: var(--icon-svg-up) no-repeat;
261
- background-size: 100% 100%;
262
- background-color: transparent;
263
263
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-ui",
3
3
  "info": {},
4
- "lastModified": 1762441979228,
4
+ "lastModified": 1762493553133,
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> "
@@ -51,21 +51,21 @@
51
51
  "frame": {
52
52
  "body": "<path d=\"M782 912.00000031h-540C170 912.00000031 111.99999969 854 111.99999969 782v-540C111.99999969 170 170 111.99999969 242 111.99999969h538.00000031c72 0 130.00000031 58.00000031 129.99999938 130.00000031v538.00000031c1.99999969 73.99999969-55.99999969 132-127.99999969 132z m-540-740.00000062C204.00000031 171.99999969 171.99999969 204.00000031 171.99999969 242v538.00000031c0 37.99999969 31.99999969 70.00000031 70.00000031 69.99999938h538.00000031c37.99999969 0 70.00000031-31.99999969 69.99999938-69.99999938V242C852.00000031 204.00000031 819.99999969 171.99999969 782 171.99999969h-540z\"></path> "
53
53
  },
54
- "pause": {
55
- "body": "<path d=\"M512.75766904 961.99942783A449.99971348 449.99971348 0 0 1 337.51316182 97.22502617a449.99971348 449.99971348 0 0 1 350.48901357 828.66874922 447.35783643 447.35783643 0 0 1-175.24450635 36.10565244z m0-829.5493746C303.16876104 132.45005323 133.20800791 302.41080635 133.20800791 511.99971347s169.96075312 379.54966113 379.54966113 379.54966114 379.54966113-170.84137852 379.54966026-379.54966113S721.46595078 132.45005323 512.75766904 132.45005323z\" fill=\"\" p-id=\"1388\"></path><path d=\"M409.72446583 725.11112393a35.22502617 35.22502617 0 0 1-35.22502619-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005323 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617zM619.31337383 725.11112393a35.22502617 35.22502617 0 0 1-35.22502617-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005322 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617z\" fill=\"\" p-id=\"1389\"></path>"
56
- },
57
54
  "left": {
58
55
  "body": " <path fill=\"currentColor\" d=\"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z\" ></path> "
59
56
  },
57
+ "mute": {
58
+ "body": "<path d=\"M878.04586667 942.39857813l-796.4444448-796.4444448 64.35271146-64.35271146 796.4444448 796.4444448-64.35271146 64.35271146zM466.48888853 227.3507552V352.71111147h91.02222294V130.2755552c0-41.3923552-48.99271147-63.21493333-79.75822294-35.52142187l-109.9776 98.98666667 60.89386667 67.65226667L466.48888853 227.328z m348.63786667 446.91911147c68.97208853-142.9504 48.58311147-302.6944-68.4259552-419.72622187l64.35271147-64.35271147c146.09066667 146.06791147 170.8032 348.00071147 86.0615104 523.62808854l-81.98826667-39.5491552zM170.66666667 375.46666667h22.7555552v-91.02222187H127.43111147A47.78666667 47.78666667 0 0 0 79.6444448 332.23111147v359.53777706c0 26.3964448 21.39022187 47.78666667 47.78666667 47.78666667h139.55982186l210.7619552 189.69031147c30.76551147 27.69351147 79.75822187 5.87093333 79.75822294-35.49866667V671.28888853h-91.02222294v125.38311147L301.8979552 648.53333333H170.66666667V375.46666667z m499.3024 165.13706666c17.68106667-44.19128853-2.2755552-107.61102187-51.9964448-157.33191146l64.35271146-64.37546667c62.41848853 62.41848853 109.1356448 163.15733333 72.13511147 255.5448896l-84.49137813-33.83751147z\" p-id=\"1906\"></path>"
59
+ },
60
+ "pause": {
61
+ "body": "<path d=\"M512.75766904 961.99942783A449.99971348 449.99971348 0 0 1 337.51316182 97.22502617a449.99971348 449.99971348 0 0 1 350.48901357 828.66874922 447.35783643 447.35783643 0 0 1-175.24450635 36.10565244z m0-829.5493746C303.16876104 132.45005323 133.20800791 302.41080635 133.20800791 511.99971347s169.96075312 379.54966113 379.54966113 379.54966114 379.54966113-170.84137852 379.54966026-379.54966113S721.46595078 132.45005323 512.75766904 132.45005323z\" fill=\"\" p-id=\"1388\"></path><path d=\"M409.72446583 725.11112393a35.22502617 35.22502617 0 0 1-35.22502619-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005323 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617zM619.31337383 725.11112393a35.22502617 35.22502617 0 0 1-35.22502617-35.22502617V354.36772021a35.22502617 35.22502617 0 0 1 70.45005322 0v335.51837755a35.22502617 35.22502617 0 0 1-35.22502705 35.22502617z\" fill=\"\" p-id=\"1389\"></path>"
62
+ },
60
63
  "play": {
61
64
  "body": "<path d=\"M512.01404492 62C263.87572168 62 62 263.87572168 62 512.01404492s201.87572168 449.98595508 450.01404492 449.98595508c248.11023339 0 449.98595508-201.87572168 449.98595508-449.98595508S760.12427832 62 512.01404492 62zM512.01404492 905.82197802C294.85790088 905.82197802 118.17802198 729.14209912 118.17802198 512.01404492S294.85790088 118.17802198 512.01404492 118.17802198c217.12805508 0 393.80793398 176.67987891 393.80793399 393.83602294S729.14209912 905.82197802 512.01404492 905.82197802zM715.09759385 477.01513672l-245.94737959-150.44474268-3.62348262-1.88196415c-2.07858692-0.89884864-21.06675791-8.73568213-41.26275703-8.73568213-34.9427294 0-57.55438301 23.22961172-57.554383 59.12736766l0 285.55288507 1.51680673 4.40997451c5.28073418 15.53322305 23.0049 41.79644825 55.70050869 41.79644825l0 0c10.39293369 0 21.15102568-2.80890088 33.00458818-8.87612784l243.13847872-137.8046874 2.38756552-1.5448957c16.74105029-11.8535625 34.83037354-41.62791445 16.20735909-75.16619297L715.09759385 477.01513672zM430.30311172 648.55472714c-3.53921573 1.79769638-5.53353487 2.07858692-6.17958281 2.13476486-0.33706846-0.28089053-0.75840293-0.75840293-1.20782725-1.34827296l0-274.26110273c0-1.20782724 0.05617793-2.19094277 0.16853379-2.92125674 5.19646729-0.28089053 14.91526494 2.16285381 18.9039041 3.62348262l225.80755928 138.11366689L430.30311172 648.55472714z\" fill=\"#2c2c2c\" p-id=\"1545\"></path>"
62
65
  },
63
66
  "plus": {
64
67
  "body": " <path fill=\"currentColor\" d=\"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z\"></path> "
65
68
  },
66
- "mute": {
67
- "body": "<path d=\"M878.04586667 942.39857813l-796.4444448-796.4444448 64.35271146-64.35271146 796.4444448 796.4444448-64.35271146 64.35271146zM466.48888853 227.3507552V352.71111147h91.02222294V130.2755552c0-41.3923552-48.99271147-63.21493333-79.75822294-35.52142187l-109.9776 98.98666667 60.89386667 67.65226667L466.48888853 227.328z m348.63786667 446.91911147c68.97208853-142.9504 48.58311147-302.6944-68.4259552-419.72622187l64.35271147-64.35271147c146.09066667 146.06791147 170.8032 348.00071147 86.0615104 523.62808854l-81.98826667-39.5491552zM170.66666667 375.46666667h22.7555552v-91.02222187H127.43111147A47.78666667 47.78666667 0 0 0 79.6444448 332.23111147v359.53777706c0 26.3964448 21.39022187 47.78666667 47.78666667 47.78666667h139.55982186l210.7619552 189.69031147c30.76551147 27.69351147 79.75822187 5.87093333 79.75822294-35.49866667V671.28888853h-91.02222294v125.38311147L301.8979552 648.53333333H170.66666667V375.46666667z m499.3024 165.13706666c17.68106667-44.19128853-2.2755552-107.61102187-51.9964448-157.33191146l64.35271146-64.37546667c62.41848853 62.41848853 109.1356448 163.15733333 72.13511147 255.5448896l-84.49137813-33.83751147z\" p-id=\"1906\"></path>"
68
- },
69
69
  "retreat": {
70
70
  "body": "<path d=\"M559.63820844 90.92621397a68.79342673 68.79342673 0 0 1 27.51737036 5.96209734 71.08654065 71.08654065 0 0 1 42.1933016 65.58306674l0 256.82879141L989.82643576 108.35388176a67.87618066 67.87618066 0 0 1 73.8382772-12.38281652A71.08654065 71.08654065 0 0 1 1105.85801454 162.47137805L1105.85801455 862.32983673A71.08654065 71.08654065 0 0 1 1063.20609033 927.91290266a67.87618066 67.87618066 0 0 1-73.838278-12.84143913l-359.56030848-310.94628772L629.80750385 862.32983672a71.08654065 71.08654065 0 0 1-42.65192505 65.58306593 67.87618066 67.87618066 0 0 1-74.29690062-12.84143912L108.35333073 566.97672549a72.00378671 72.00378671 0 0 1-1e-8-105.94187704L513.77592423 108.35388176a68.33480328 68.33480328 0 0 1 45.86228422-17.4276678z m476.96775677 72.0037867l-405.88121611 349.47060672 404.50534743 351.76372064 0-701.69294998z m-476.05051069 0l-405.88121697 349.47060672 404.50534827 351.76372064 0-701.69294998z\" fill=\"#2c2c2c\" p-id=\"2329\"></path>"
71
71
  },
@@ -78,11 +78,11 @@
78
78
  "star": {
79
79
  "body": "<path d=\"M213.875 956.375c-78.75 0-146.25-61.875-146.25-146.25V450.125c0-78.75 61.875-146.25 146.25-146.25h365.62500001c78.75 0 146.25 61.875 146.24999999 146.25v365.625c0 78.75-61.875 146.25-146.25000001 146.25l-365.62499999-5.625z m0-579.375c-45 0-78.75 33.75-78.75 78.75v365.625c0 45 33.75 78.75 78.75 78.75h365.62500001c45 0 78.75-33.75 78.74999999-78.75V450.125c0-45-33.75-78.75-78.74999999-78.75H213.875z\" p-id=\"1087\"></path><path d=\"M810.125 78.875H444.49999999C360.125 78.875 298.25 146.375 298.25 225.125v22.5h61.875v-22.5c0-45 33.75-78.75 78.75-78.75h360c45 0 78.75 33.75 78.75 78.75v360c0 45-33.75 78.75-78.75 78.75h-33.75V737h45c84.375 0 146.25-67.50000001 146.25-146.25V225.125c0-84.375-67.50000001-146.25-146.25-146.25z\" p-id=\"1088\"></path> "
80
80
  },
81
- "views": {
82
- "body": "<path fill=\"currentColor\" d=\"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z\"></path>"
83
- },
84
81
  "up": {
85
82
  "body": "<path d=\"M149.33333334 887.33013334c0 18.8416 15.29173333 34.13333333 34.13333333 34.13333333S217.6 906.17173333 217.6 887.33013333l0-301.73866666L807.90186667 914.56853333c19.38773333 10.78613333 42.5984 10.71786667 61.98613334 0C889.344 903.71413332 900.88106667 884.39466667 900.88106667 862.75413333l0-700.416c0-21.57226667-11.53706667-41.02826667-30.99306667-51.8144C860.19413334 105.13066667 849.6128 102.4 838.9632 102.4s-21.29919999 2.73066667-30.99306666 8.12373333L217.6 439.5008l0-303.03573333c0-18.8416-15.29173333-34.13333333-34.13333333-34.13333334s-34.13333333 15.29173333-34.13333334 34.13333334L149.33333334 887.33013334zM832.2048 173.60213333L835.54986667 853.33333333l-611.53279999-340.7872L832.2048 173.60213333z\" p-id=\"2637\"></path>"
83
+ },
84
+ "views": {
85
+ "body": "<path fill=\"currentColor\" d=\"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z\"></path>"
86
86
  }
87
87
  },
88
88
  "aliases": {},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/fang-ui",
3
3
  "private": false,
4
- "version": "0.0.100",
4
+ "version": "0.1.2",
5
5
  "type": "module",
6
6
  "description ": "fang-ui",
7
7
  "keywords": [
@@ -50,13 +50,13 @@
50
50
  "vuedraggable": "4.1.0",
51
51
  "vxe-table": "4.17.10",
52
52
  "@fang-ui/components": "0.0.1-0",
53
- "@fang-ui/directives": "0.0.1-0",
54
- "@fang-ui/theme": "0.0.1-0",
55
- "@fang-ui/hooks": "0.0.1-0",
56
53
  "@fang-ui/icons": "0.0.1-0",
54
+ "@fang-ui/hooks": "0.0.1-0",
55
+ "@fang-ui/directives": "0.0.1-0",
57
56
  "@fang-ui/locale": "0.0.1-0",
58
- "@fang-ui/utils": "0.0.1-0",
59
- "@fang-ui/types": "0.0.1-0"
57
+ "@fang-ui/theme": "0.0.1-0",
58
+ "@fang-ui/types": "0.0.1-0",
59
+ "@fang-ui/utils": "0.0.1-0"
60
60
  },
61
61
  "main": "./dist/index.cjs",
62
62
  "module": "./dist/index.js",
File without changes