@fangzhongya/fang-ui 0.1.42 → 0.1.44

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 (30) hide show
  1. package/dist/components/audios/src/index2.cjs +0 -1
  2. package/dist/components/audios/src/index2.js +0 -1
  3. package/dist/components/common/urls.cjs +0 -1
  4. package/dist/components/common/urls.js +0 -1
  5. package/dist/components/double/src/index2.cjs +0 -2
  6. package/dist/components/double/src/index2.js +0 -2
  7. package/dist/components/forms-div/src/index2.cjs +27 -19
  8. package/dist/components/forms-div/src/index2.js +27 -19
  9. package/dist/components/forms-item/src/data.cjs +2 -5
  10. package/dist/components/forms-item/src/data.d.ts +2 -3
  11. package/dist/components/forms-item/src/data.js +2 -5
  12. package/dist/components/forms-item/src/indexts.d.ts +2 -5
  13. package/dist/components/full-screen/src/index2.cjs +0 -1
  14. package/dist/components/full-screen/src/index2.js +0 -1
  15. package/dist/components/page/src/index2.cjs +0 -1
  16. package/dist/components/page/src/index2.js +0 -1
  17. package/dist/components/switchs/src/index2.cjs +0 -1
  18. package/dist/components/switchs/src/index2.js +0 -1
  19. package/dist/components/tables/common/pagin.cjs +0 -1
  20. package/dist/components/tables/common/pagin.js +0 -1
  21. package/dist/components/videos/src/index2.cjs +0 -1
  22. package/dist/components/videos/src/index2.js +0 -1
  23. package/dist/components/window/src/index2.cjs +0 -2
  24. package/dist/components/window/src/index2.js +0 -2
  25. package/dist/hooks/full-screen/index.cjs +0 -1
  26. package/dist/hooks/full-screen/index.js +0 -1
  27. package/dist/icons/index.json +1 -1
  28. package/package.json +7 -7
  29. /package/dist/components/{draggable → global-config}/index.css +0 -0
  30. /package/dist/css/{draggable.css → global-config.css} +0 -0
@@ -87,7 +87,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
87
87
  const onChangeSlider = () => {
88
88
  if (audioRef.value) {
89
89
  const v = slider.value * duration.value / 100;
90
- console.log("v", v);
91
90
  audioRef.value.currentTime = v;
92
91
  }
93
92
  isMouse.value = true;
@@ -85,7 +85,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
85
85
  const onChangeSlider = () => {
86
86
  if (audioRef.value) {
87
87
  const v = slider.value * duration.value / 100;
88
- console.log("v", v);
89
88
  audioRef.value.currentTime = v;
90
89
  }
91
90
  isMouse.value = true;
@@ -83,7 +83,6 @@ function comHandle(props2, obj) {
83
83
  param.data = obj;
84
84
  }
85
85
  param.url = props2.ajax;
86
- console.log("param", param);
87
86
  axios.request(param).then((res) => {
88
87
  let list = res.data || {};
89
88
  if (props2.onRequestAfter) {
@@ -81,7 +81,6 @@ function comHandle(props2, obj) {
81
81
  param.data = obj;
82
82
  }
83
83
  param.url = props2.ajax;
84
- console.log("param", param);
85
84
  axios.request(param).then((res) => {
86
85
  let list = res.data || {};
87
86
  if (props2.onRequestAfter) {
@@ -202,9 +202,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
202
202
  }
203
203
  vue.onMounted(() => {
204
204
  if (globalThis) {
205
- console.log("onMounted");
206
205
  globalThis.addEventListener("click", () => {
207
- console.log("click");
208
206
  isfocus.value = false;
209
207
  });
210
208
  }
@@ -200,9 +200,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
200
200
  }
201
201
  onMounted(() => {
202
202
  if (globalThis) {
203
- console.log("onMounted");
204
203
  globalThis.addEventListener("click", () => {
205
- console.log("click");
206
204
  isfocus.value = false;
207
205
  });
208
206
  }
@@ -31,17 +31,32 @@ const _sfc_main = vue.defineComponent({
31
31
  }
32
32
  return o;
33
33
  });
34
- const record = vue.ref();
34
+ const record = vue.ref(props.default);
35
35
  const setPropComputedValue = (prop, computed2, value2) => {
36
- if (isEqual.isEqual(prop, computed2)) {
37
- return;
38
- }
39
- if (prop !== record.value) {
40
- handlePropNotEqualRecord(prop, value2);
36
+ if (props.prop) {
37
+ if (isEqual.isEqual(prop, computed2)) {
38
+ return;
39
+ }
40
+ if (prop !== record.value) {
41
+ handlePropNotEqualRecord(prop, value2);
42
+ } else {
43
+ if (props.pars) {
44
+ objValue.setObjValue(value2, props.prop, computed2);
45
+ } else {
46
+ value2[props.prop] = computed2;
47
+ }
48
+ }
49
+ record.value = prop;
41
50
  } else {
42
- handlePropEqualRecord(computed2, value2);
51
+ prop = record.value;
52
+ if (isEqual.isEqual(prop, computed2)) {
53
+ return;
54
+ }
55
+ if (prop !== computed2) {
56
+ handlePropNotEqualRecord(computed2, value2);
57
+ }
58
+ record.value = computed2;
43
59
  }
44
- record.value = prop;
45
60
  };
46
61
  const handlePropNotEqualRecord = (prop, value2) => {
47
62
  if (Array.isArray(props.computed)) {
@@ -60,13 +75,6 @@ const _sfc_main = vue.defineComponent({
60
75
  }
61
76
  }
62
77
  };
63
- const handlePropEqualRecord = (computed2, value2) => {
64
- if (props.pars) {
65
- objValue.setObjValue(value2, props.prop, computed2);
66
- } else {
67
- value2[props.prop] = computed2;
68
- }
69
- };
70
78
  const binds = vue.computed(() => {
71
79
  const obj = { ...props.config, ...formvalue.value };
72
80
  const binds2 = {};
@@ -122,7 +130,7 @@ const _sfc_main = vue.defineComponent({
122
130
  props
123
131
  );
124
132
  }
125
- if (props.prop && computedValue !== void 0) {
133
+ if (computedValue !== void 0) {
126
134
  setPropComputedValue(currentValue, computedValue, source);
127
135
  }
128
136
  return computedValue;
@@ -136,10 +144,10 @@ const _sfc_main = vue.defineComponent({
136
144
  if (props.computed) {
137
145
  handleComputedSet(newValue, v);
138
146
  }
139
- if (!props.orig && !prop) {
147
+ if (!props.orig && !(prop || props.computed)) {
140
148
  emit("update:modelValue", newValue);
141
149
  }
142
- if (prop) {
150
+ if (prop || props.computed) {
143
151
  emit("upform", newValue, props, v);
144
152
  }
145
153
  }
@@ -184,7 +192,7 @@ const _sfc_main = vue.defineComponent({
184
192
  [componValueName]: value.value,
185
193
  ["onUpdate:" + componValueName]: (v) => value.value = v,
186
194
  ["onUpform"]: (...arr) => {
187
- if (props.prop) {
195
+ if (props.prop || props.computed) {
188
196
  emit("upform", ...arr);
189
197
  }
190
198
  }
@@ -29,17 +29,32 @@ const _sfc_main = defineComponent({
29
29
  }
30
30
  return o;
31
31
  });
32
- const record = ref();
32
+ const record = ref(props.default);
33
33
  const setPropComputedValue = (prop, computed2, value2) => {
34
- if (isEqual(prop, computed2)) {
35
- return;
36
- }
37
- if (prop !== record.value) {
38
- handlePropNotEqualRecord(prop, value2);
34
+ if (props.prop) {
35
+ if (isEqual(prop, computed2)) {
36
+ return;
37
+ }
38
+ if (prop !== record.value) {
39
+ handlePropNotEqualRecord(prop, value2);
40
+ } else {
41
+ if (props.pars) {
42
+ setObjValue(value2, props.prop, computed2);
43
+ } else {
44
+ value2[props.prop] = computed2;
45
+ }
46
+ }
47
+ record.value = prop;
39
48
  } else {
40
- handlePropEqualRecord(computed2, value2);
49
+ prop = record.value;
50
+ if (isEqual(prop, computed2)) {
51
+ return;
52
+ }
53
+ if (prop !== computed2) {
54
+ handlePropNotEqualRecord(computed2, value2);
55
+ }
56
+ record.value = computed2;
41
57
  }
42
- record.value = prop;
43
58
  };
44
59
  const handlePropNotEqualRecord = (prop, value2) => {
45
60
  if (Array.isArray(props.computed)) {
@@ -58,13 +73,6 @@ const _sfc_main = defineComponent({
58
73
  }
59
74
  }
60
75
  };
61
- const handlePropEqualRecord = (computed2, value2) => {
62
- if (props.pars) {
63
- setObjValue(value2, props.prop, computed2);
64
- } else {
65
- value2[props.prop] = computed2;
66
- }
67
- };
68
76
  const binds = computed(() => {
69
77
  const obj = { ...props.config, ...formvalue.value };
70
78
  const binds2 = {};
@@ -120,7 +128,7 @@ const _sfc_main = defineComponent({
120
128
  props
121
129
  );
122
130
  }
123
- if (props.prop && computedValue !== void 0) {
131
+ if (computedValue !== void 0) {
124
132
  setPropComputedValue(currentValue, computedValue, source);
125
133
  }
126
134
  return computedValue;
@@ -134,10 +142,10 @@ const _sfc_main = defineComponent({
134
142
  if (props.computed) {
135
143
  handleComputedSet(newValue, v);
136
144
  }
137
- if (!props.orig && !prop) {
145
+ if (!props.orig && !(prop || props.computed)) {
138
146
  emit("update:modelValue", newValue);
139
147
  }
140
- if (prop) {
148
+ if (prop || props.computed) {
141
149
  emit("upform", newValue, props, v);
142
150
  }
143
151
  }
@@ -182,7 +190,7 @@ const _sfc_main = defineComponent({
182
190
  [componValueName]: value.value,
183
191
  ["onUpdate:" + componValueName]: (v) => value.value = v,
184
192
  ["onUpform"]: (...arr) => {
185
- if (props.prop) {
193
+ if (props.prop || props.computed) {
186
194
  emit("upform", ...arr);
187
195
  }
188
196
  }
@@ -56,13 +56,10 @@ const dataProps = {
56
56
  hideLabel: Boolean,
57
57
  /**
58
58
  * 传入值
59
- * @props { Object } modelValue={} ( )
59
+ * @props { Object } modelValue ( )
60
60
  */
61
61
  modelValue: {
62
- type: Object,
63
- default() {
64
- return {};
65
- }
62
+ type: null
66
63
  }
67
64
  };
68
65
  const dataEmits = ["update:modelValue", "upform"];
@@ -67,11 +67,10 @@ export declare const dataProps: {
67
67
  hideLabel: BooleanConstructor;
68
68
  /**
69
69
  * 传入值
70
- * @props { Object } modelValue={} ( )
70
+ * @props { Object } modelValue ( )
71
71
  */
72
72
  modelValue: {
73
- type: ObjectConstructor;
74
- default(): {};
73
+ type: null;
75
74
  };
76
75
  };
77
76
  export type DataProps = ExtractPropTypes<typeof dataProps>;
@@ -54,13 +54,10 @@ const dataProps = {
54
54
  hideLabel: Boolean,
55
55
  /**
56
56
  * 传入值
57
- * @props { Object } modelValue={} ( )
57
+ * @props { Object } modelValue ( )
58
58
  */
59
59
  modelValue: {
60
- type: Object,
61
- default() {
62
- return {};
63
- }
60
+ type: null
64
61
  }
65
62
  };
66
63
  const dataEmits = ["update:modelValue", "upform"];
@@ -38,8 +38,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
38
38
  };
39
39
  hideLabel: BooleanConstructor;
40
40
  modelValue: {
41
- type: ObjectConstructor;
42
- default(): {};
41
+ type: null;
43
42
  };
44
43
  }>, () => VNode<RendererNode, RendererElement, {
45
44
  [key: string]: any;
@@ -82,13 +81,11 @@ declare const _default: DefineComponent<ExtractPropTypes<{
82
81
  };
83
82
  hideLabel: BooleanConstructor;
84
83
  modelValue: {
85
- type: ObjectConstructor;
86
- default(): {};
84
+ type: null;
87
85
  };
88
86
  }>> & Readonly<{
89
87
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
90
88
  }>, {
91
- modelValue: Record<string, any>;
92
89
  index: number[];
93
90
  optionss: ObjAny;
94
91
  listobj: ListObj;
@@ -19,7 +19,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
19
19
  const emit = __emit;
20
20
  const domRef = vue.ref();
21
21
  const { isFullscreen, toggle } = index$3.useFullscreen();
22
- console.log("isFullscreen", isFullscreen);
23
22
  const onClick = () => {
24
23
  if (props.isBody) {
25
24
  toggle();
@@ -17,7 +17,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  const emit = __emit;
18
18
  const domRef = ref();
19
19
  const { isFullscreen, toggle } = useFullscreen();
20
- console.log("isFullscreen", isFullscreen);
21
20
  const onClick = () => {
22
21
  if (props.isBody) {
23
22
  toggle();
@@ -417,7 +417,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
417
417
  }
418
418
  };
419
419
  const handleOperation = (type, data2, operationName) => {
420
- console.log(operationName, data2);
421
420
  const operationConfig = type === "add" ? props.config.add : props.config.edit;
422
421
  const ajax = operationConfig == null ? void 0 : operationConfig.ajax;
423
422
  if (ajax) {
@@ -415,7 +415,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
415
415
  }
416
416
  };
417
417
  const handleOperation = (type, data, operationName) => {
418
- console.log(operationName, data);
419
418
  const operationConfig = type === "add" ? props.config.add : props.config.edit;
420
419
  const ajax = operationConfig == null ? void 0 : operationConfig.ajax;
421
420
  if (ajax) {
@@ -67,7 +67,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
67
67
  for (let k in inactive.value) {
68
68
  obj["inactive-" + k] = inactive.value[k];
69
69
  }
70
- console.log("obj", obj);
71
70
  return obj;
72
71
  });
73
72
  const value = vue.computed({
@@ -65,7 +65,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
65
  for (let k in inactive.value) {
66
66
  obj["inactive-" + k] = inactive.value[k];
67
67
  }
68
- console.log("obj", obj);
69
68
  return obj;
70
69
  });
71
70
  const value = computed({
@@ -262,7 +262,6 @@ const useInit = (props2, emit, refTable, getLocale, defaultConfig = {}) => {
262
262
  });
263
263
  function setCrossPage() {
264
264
  const v = data.current;
265
- console.log("v", v);
266
265
  crossPageData.value[v] = refTable.value.getSelections();
267
266
  console.log("crossPageData", crossPageData);
268
267
  }
@@ -260,7 +260,6 @@ const useInit = (props2, emit, refTable, getLocale, defaultConfig = {}) => {
260
260
  });
261
261
  function setCrossPage() {
262
262
  const v = data.current;
263
- console.log("v", v);
264
263
  crossPageData.value[v] = refTable.value.getSelections();
265
264
  console.log("crossPageData", crossPageData);
266
265
  }
@@ -121,7 +121,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
121
121
  const onChangeSlider = () => {
122
122
  if (videoRef.value) {
123
123
  const v = slider.value * duration.value / 100;
124
- console.log("v", v);
125
124
  videoRef.value.currentTime = v;
126
125
  }
127
126
  isMouse.value = true;
@@ -119,7 +119,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
119
  const onChangeSlider = () => {
120
120
  if (videoRef.value) {
121
121
  const v = slider.value * duration.value / 100;
122
- console.log("v", v);
123
122
  videoRef.value.currentTime = v;
124
123
  }
125
124
  isMouse.value = true;
@@ -44,7 +44,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
44
44
  vue.watch(
45
45
  () => props.modelValue,
46
46
  () => {
47
- console.log("props.modelValue", props.modelValue);
48
47
  if (props.modelValue) {
49
48
  isClose.value = false;
50
49
  isMin.value = false;
@@ -121,7 +120,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
121
120
  setCss.setCss(refBox.value, "display", "block");
122
121
  }
123
122
  }
124
- console.log("isClose", isClose);
125
123
  }
126
124
  function setMax() {
127
125
  if (refBody.value) {
@@ -42,7 +42,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  watch(
43
43
  () => props.modelValue,
44
44
  () => {
45
- console.log("props.modelValue", props.modelValue);
46
45
  if (props.modelValue) {
47
46
  isClose.value = false;
48
47
  isMin.value = false;
@@ -119,7 +118,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
118
  setCss(refBox.value, "display", "block");
120
119
  }
121
120
  }
122
- console.log("isClose", isClose);
123
121
  }
124
122
  function setMax() {
125
123
  if (refBody.value) {
@@ -5,7 +5,6 @@ function useFullscreen() {
5
5
  const isFullscreen = vue.ref(false);
6
6
  const target = vue.ref(null);
7
7
  const onFullscreenChange = () => {
8
- console.log("onFullscreenChange");
9
8
  if (!document.fullscreenElement && //@ts-ignore
10
9
  !document.mozFullScreenElement && //@ts-ignore
11
10
  !document.webkitFullscreenElement && //@ts-ignore
@@ -3,7 +3,6 @@ function useFullscreen() {
3
3
  const isFullscreen = ref(false);
4
4
  const target = ref(null);
5
5
  const onFullscreenChange = () => {
6
- console.log("onFullscreenChange");
7
6
  if (!document.fullscreenElement && //@ts-ignore
8
7
  !document.mozFullScreenElement && //@ts-ignore
9
8
  !document.webkitFullscreenElement && //@ts-ignore
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-ui",
3
3
  "info": {},
4
- "lastModified": 1764415547531,
4
+ "lastModified": 1764568906545,
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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/fang-ui",
3
3
  "private": false,
4
- "version": "0.1.42",
4
+ "version": "0.1.44",
5
5
  "type": "module",
6
6
  "description ": "fang-ui",
7
7
  "keywords": [
@@ -34,29 +34,29 @@
34
34
  "@vue/shared": "3.5.25",
35
35
  "axios": "^1.13.2",
36
36
  "d3-timer": "3.0.1",
37
- "element-plus": "^2.11.8",
37
+ "element-plus": "^2.11.9",
38
38
  "fast-glob": "^3.3.3",
39
39
  "sass": "^1.94.2",
40
40
  "sortablejs": "1.15.6",
41
41
  "ts-node": "^10.9.2",
42
42
  "tsup": "^8.5.1",
43
43
  "typescript": "^5.9.3",
44
- "unplugin-auto-import": "20.2.0",
44
+ "unplugin-auto-import": "20.3.0",
45
45
  "unplugin-dts": "1.0.0-beta.6",
46
46
  "unplugin-vue-components": "30.0.0",
47
47
  "vite": "^6.3.5",
48
48
  "vitepress": "1.6.4",
49
- "vitest": "^4.0.13",
49
+ "vitest": "^4.0.14",
50
50
  "vue": "^3.5.25",
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/locale": "0.0.1-0",
55
54
  "@fang-ui/hooks": "0.0.1-0",
56
- "@fang-ui/directives": "0.0.1-0",
57
55
  "@fang-ui/icons": "0.0.1-0",
58
- "@fang-ui/types": "0.0.1-0",
56
+ "@fang-ui/locale": "0.0.1-0",
57
+ "@fang-ui/directives": "0.0.1-0",
59
58
  "@fang-ui/theme": "0.0.1-0",
59
+ "@fang-ui/types": "0.0.1-0",
60
60
  "@fang-ui/utils": "0.0.1-0"
61
61
  },
62
62
  "main": "./dist/index.cjs",
File without changes