@fangzhongya/fang-ui 0.1.38 → 0.1.40
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.
- package/dist/components/common/css.d.ts +7 -0
- package/dist/components/common/list.d.ts +7 -0
- package/dist/components/common/urls.d.ts +6 -0
- package/dist/components/common/use.cjs +153 -125
- package/dist/components/common/use.d.ts +114 -8
- package/dist/components/common/use.js +154 -126
- package/dist/components/company-select/src/index2.cjs +1 -2
- package/dist/components/company-select/src/index2.js +1 -2
- package/dist/components/double/src/index2.cjs +2 -2
- package/dist/components/double/src/index2.js +2 -2
- package/dist/components/forms/index.css +18 -0
- package/dist/components/forms/src/index2.cjs +9 -6
- package/dist/components/forms/src/index2.js +9 -6
- package/dist/components/forms/src/setup.cjs +9 -12
- package/dist/components/forms/src/setup.d.ts +10 -0
- package/dist/components/forms/src/setup.js +9 -12
- package/dist/components/forms/src/util.cjs +8 -10
- package/dist/components/forms/src/util.d.ts +11 -6
- package/dist/components/forms/src/util.js +8 -10
- package/dist/components/forms-div/src/data.cjs +8 -5
- package/dist/components/forms-div/src/data.d.ts +21 -3
- package/dist/components/forms-div/src/data.js +8 -5
- package/dist/components/forms-div/src/index2.cjs +41 -70
- package/dist/components/forms-div/src/index2.js +43 -72
- package/dist/components/forms-item/src/data.cjs +6 -0
- package/dist/components/forms-item/src/data.d.ts +19 -0
- package/dist/components/forms-item/src/data.js +6 -0
- package/dist/components/forms-item/src/index2.cjs +11 -7
- package/dist/components/forms-item/src/index2.js +11 -7
- package/dist/components/forms-item/src/indexts.d.ts +40 -1
- package/dist/components/forms-item/src/label.cjs +7 -2
- package/dist/components/forms-item/src/label.d.ts +40 -1
- package/dist/components/forms-item/src/label.js +7 -2
- package/dist/components/forms-items/index.css +67 -0
- package/dist/components/forms-items/index.scss +21 -0
- package/dist/components/forms-items/src/data.cjs +9 -0
- package/dist/components/forms-items/src/data.d.ts +22 -0
- package/dist/components/forms-items/src/data.js +9 -0
- package/dist/components/forms-items/src/index2.cjs +22 -10
- package/dist/components/forms-items/src/index2.js +22 -10
- package/dist/components/forms-items/style/index2.scss +1 -0
- package/dist/components/icon/src/index2.cjs +1 -2
- package/dist/components/icon/src/index2.js +1 -2
- package/dist/components/input-history/src/index2.cjs +1 -1
- package/dist/components/input-history/src/index2.js +1 -1
- package/dist/components/input-select/src/index2.cjs +0 -2
- package/dist/components/input-select/src/index2.js +0 -2
- package/dist/components/inputs/src/index2.cjs +1 -1
- package/dist/components/inputs/src/index2.js +1 -1
- package/dist/components/list/src/index2.cjs +5 -19
- package/dist/components/list/src/index2.js +5 -19
- package/dist/components/list/src/util.cjs +9 -9
- package/dist/components/list/src/util.d.ts +30 -2
- package/dist/components/list/src/util.js +9 -9
- package/dist/components/lists/src/index2.cjs +1 -2
- package/dist/components/lists/src/index2.js +1 -2
- package/dist/components/menus/src/util.cjs +8 -24
- package/dist/components/menus/src/util.js +9 -25
- package/dist/components/page/index.css +18 -0
- package/dist/components/right-key/src/index2.cjs +3 -3
- package/dist/components/right-key/src/index2.js +3 -3
- package/dist/components/seamless-scroll/src/index2.cjs +1 -1
- package/dist/components/seamless-scroll/src/index2.js +1 -1
- package/dist/components/selects/src/index2.cjs +2 -2
- package/dist/components/selects/src/index2.js +2 -2
- package/dist/components/stick-edge/src/index2.cjs +2 -2
- package/dist/components/stick-edge/src/index2.js +2 -2
- package/dist/components/switchs/src/index2.cjs +1 -1
- package/dist/components/switchs/src/index2.js +1 -1
- package/dist/components/tables/common/com-color2.cjs +0 -3
- package/dist/components/tables/common/com-color2.js +0 -3
- package/dist/components/tables/common/com-lis2.cjs +0 -1
- package/dist/components/tables/common/com-lis2.js +0 -1
- package/dist/components/tables/common/pagin.d.ts +16 -0
- package/dist/components/tables/common/tooltip.cjs +1 -1
- package/dist/components/tables/common/tooltip.js +1 -1
- package/dist/components/tables/common/util.cjs +46 -8
- package/dist/components/tables/common/util.d.ts +13 -0
- package/dist/components/tables/common/util.js +47 -9
- package/dist/components/tables/src/column.cjs +11 -4
- package/dist/components/tables/src/column.d.ts +29 -0
- package/dist/components/tables/src/column.js +11 -4
- package/dist/components/tables/src/columns.d.ts +7 -0
- package/dist/components/tables/src/columns3.cjs +1 -7
- package/dist/components/tables/src/columns3.js +1 -7
- package/dist/components/tables/src/index2.cjs +3 -3
- package/dist/components/tables/src/index2.js +3 -3
- package/dist/components/tablesv/src/column.cjs +11 -4
- package/dist/components/tablesv/src/column.d.ts +25 -0
- package/dist/components/tablesv/src/column.js +11 -4
- package/dist/components/tablesv/src/columns.d.ts +7 -0
- package/dist/components/tablesv/src/columns3.cjs +1 -7
- package/dist/components/tablesv/src/columns3.js +1 -7
- package/dist/components/tablesv/src/index2.cjs +3 -3
- package/dist/components/tablesv/src/index2.js +3 -3
- package/dist/components/uploads/src/util.cjs +2 -3
- package/dist/components/uploads/src/util.d.ts +7 -0
- package/dist/components/uploads/src/util.js +2 -3
- package/dist/css/forms-items.css +67 -0
- package/dist/css/forms.css +18 -0
- package/dist/css/index.css +18 -0
- package/dist/css/page.css +18 -0
- package/dist/directives/adjust/index.cjs +4 -8
- package/dist/directives/adjust/index.js +4 -8
- package/dist/directives/drag/index.cjs +6 -1
- package/dist/directives/drag/index.js +6 -1
- package/dist/directives/expose/index.cjs +6 -0
- package/dist/directives/expose/index.js +6 -0
- package/dist/directives/inserted/index.cjs +5 -0
- package/dist/directives/inserted/index.js +5 -0
- package/dist/directives/locus/index.cjs +5 -0
- package/dist/directives/locus/index.js +5 -0
- package/dist/directives/scroll/index.cjs +10 -0
- package/dist/directives/scroll/index.d.ts +0 -5
- package/dist/directives/scroll/index.js +10 -0
- package/dist/directives/sortable/index.cjs +5 -0
- package/dist/directives/sortable/index.js +5 -0
- package/dist/directives/stick/index.cjs +13 -8
- package/dist/directives/stick/index.js +13 -8
- package/dist/hooks/attrs-default/index.d.ts +5 -3
- package/dist/hooks/compons/index.d.ts +13 -0
- package/dist/hooks/cssname/index.cjs +1 -1
- package/dist/hooks/cssname/index.d.ts +22 -1
- package/dist/hooks/cssname/index.js +1 -1
- package/dist/hooks/default-config/index.d.ts +10 -0
- package/dist/hooks/expose/index.cjs +2 -0
- package/dist/hooks/expose/index.d.ts +6 -0
- package/dist/hooks/expose/index.js +2 -0
- package/dist/hooks/full-screen/index.d.ts +6 -0
- package/dist/hooks/global-config/index.d.ts +16 -0
- package/dist/hooks/inherit/index.cjs +2 -0
- package/dist/hooks/inherit/index.d.ts +8 -0
- package/dist/hooks/inherit/index.js +2 -0
- package/dist/hooks/locale/index.d.ts +24 -0
- package/dist/hooks/props-default/index.d.ts +14 -5
- package/dist/icons/iconify.d.ts +7 -0
- package/dist/icons/iconifyCss.d.ts +6 -0
- package/dist/icons/index.json +1 -1
- package/dist/index.css +18 -0
- package/dist/locale/en.cjs +2 -1
- package/dist/locale/en.d.ts +1 -0
- package/dist/locale/en.js +2 -1
- package/dist/locale/zh-cn.cjs +2 -1
- package/dist/locale/zh-cn.d.ts +1 -0
- package/dist/locale/zh-cn.js +2 -1
- package/dist/type.d.ts +8 -0
- package/dist/utils/css.cjs +4 -0
- package/dist/utils/css.d.ts +1 -0
- package/dist/utils/css.js +4 -0
- package/dist/utils/local.cjs +12 -6
- package/dist/utils/local.js +12 -6
- package/dist/utils/util.cjs +7 -5
- package/dist/utils/util.js +7 -5
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
const emit = __emit;
|
|
23
23
|
const binds = computed(() => {
|
|
24
24
|
const binds2 = {};
|
|
25
|
-
const no = /* @__PURE__ */ new Set(["modelValue", "children", "listobj"]);
|
|
25
|
+
const no = /* @__PURE__ */ new Set(["modelValue", "children", "index", "listobj"]);
|
|
26
26
|
for (const key of Object.keys(prs)) {
|
|
27
27
|
if (!no.has(key)) {
|
|
28
28
|
const v = props[key];
|
|
@@ -33,10 +33,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
}
|
|
34
34
|
return binds2;
|
|
35
35
|
});
|
|
36
|
-
const defaultValue = {};
|
|
37
36
|
const value = computed({
|
|
38
37
|
get() {
|
|
39
|
-
return prs.modelValue
|
|
38
|
+
return prs.modelValue;
|
|
40
39
|
},
|
|
41
40
|
set(value2) {
|
|
42
41
|
emit("update:modelValue", value2);
|
|
@@ -45,6 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
44
|
function setKey(value2, index) {
|
|
46
45
|
return [index, value2.label, value2.prop, value2.compon].join(",");
|
|
47
46
|
}
|
|
47
|
+
const onUpform = (...arr) => emit("upform", ...arr);
|
|
48
48
|
function setStyles(v) {
|
|
49
49
|
const style = v.style || {};
|
|
50
50
|
let vst;
|
|
@@ -54,12 +54,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
vst = style;
|
|
55
55
|
}
|
|
56
56
|
const obj = {};
|
|
57
|
-
const
|
|
57
|
+
const minWidth = v.minWidth ?? props.rowMinWidth;
|
|
58
|
+
const width = v.width ?? v.rowWidth ?? props.rowWidth ?? form.rowWidth;
|
|
58
59
|
if (width) {
|
|
59
60
|
obj.width = width;
|
|
60
61
|
}
|
|
62
|
+
if (minWidth) {
|
|
63
|
+
obj.minWidth = minWidth;
|
|
64
|
+
}
|
|
61
65
|
if (v.whole) {
|
|
62
66
|
obj.display = "block";
|
|
67
|
+
obj.width = "100%";
|
|
68
|
+
}
|
|
69
|
+
if (v.flex) {
|
|
70
|
+
obj.flex = v.flex;
|
|
71
|
+
} else if (!obj.width) {
|
|
72
|
+
obj.flex = 0;
|
|
63
73
|
}
|
|
64
74
|
return setObjStyle(vst, obj);
|
|
65
75
|
}
|
|
@@ -68,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
68
78
|
});
|
|
69
79
|
return (_ctx, _cache) => {
|
|
70
80
|
return openBlock(), createElementBlock("div", {
|
|
71
|
-
class: normalizeClass(unref(cs).z())
|
|
81
|
+
class: normalizeClass([unref(cs).z(), unref(cs).co(unref(prs).mode)])
|
|
72
82
|
}, [
|
|
73
83
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(props).children, (item, index) => {
|
|
74
84
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
@@ -80,12 +90,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
90
|
key: 0,
|
|
81
91
|
ref_for: true
|
|
82
92
|
}, binds.value, {
|
|
93
|
+
index: [...unref(prs).index, index],
|
|
83
94
|
listobj: item,
|
|
84
95
|
optionss: unref(prs).optionss,
|
|
85
96
|
valueobj: unref(prs).valueobj,
|
|
86
97
|
modelValue: value.value,
|
|
87
98
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
88
|
-
onUpform
|
|
99
|
+
onUpform
|
|
89
100
|
}), createSlots({ _: 2 }, [
|
|
90
101
|
renderList(Object.keys(unref(slots)), (k, i) => {
|
|
91
102
|
return {
|
|
@@ -95,16 +106,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
106
|
])
|
|
96
107
|
};
|
|
97
108
|
})
|
|
98
|
-
]), 1040, ["listobj", "optionss", "valueobj", "modelValue"])) : (openBlock(), createBlock(unref(FormsItem), mergeProps({
|
|
109
|
+
]), 1040, ["index", "listobj", "optionss", "valueobj", "modelValue"])) : (openBlock(), createBlock(unref(FormsItem), mergeProps({
|
|
99
110
|
key: 1,
|
|
100
111
|
ref_for: true
|
|
101
112
|
}, binds.value, {
|
|
113
|
+
index: [...unref(prs).index, index],
|
|
102
114
|
listobj: item,
|
|
103
115
|
optionss: unref(prs).optionss,
|
|
104
116
|
valueobj: unref(prs).valueobj,
|
|
105
117
|
modelValue: value.value,
|
|
106
|
-
"onUpdate:modelValue": _cache[
|
|
107
|
-
onUpform
|
|
118
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
|
|
119
|
+
onUpform
|
|
108
120
|
}), createSlots({ _: 2 }, [
|
|
109
121
|
renderList(Object.keys(unref(slots)), (k, i) => {
|
|
110
122
|
return {
|
|
@@ -114,7 +126,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
126
|
])
|
|
115
127
|
};
|
|
116
128
|
})
|
|
117
|
-
]), 1040, ["listobj", "optionss", "valueobj", "modelValue"]))
|
|
129
|
+
]), 1040, ["index", "listobj", "optionss", "valueobj", "modelValue"]))
|
|
118
130
|
], 6)), [
|
|
119
131
|
[vShow, !unref(useHide)(item, value.value)]
|
|
120
132
|
]);
|
|
@@ -32,7 +32,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
32
32
|
const width = vue.ref(200);
|
|
33
33
|
const refInput = vue.ref();
|
|
34
34
|
const options = util.useStorage(
|
|
35
|
-
props.storage ||
|
|
35
|
+
props.storage || Date.now() + "",
|
|
36
36
|
[]
|
|
37
37
|
);
|
|
38
38
|
const value = vue.ref("");
|
|
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
30
|
const width = ref(200);
|
|
31
31
|
const refInput = ref();
|
|
32
32
|
const options = useStorage(
|
|
33
|
-
props.storage ||
|
|
33
|
+
props.storage || Date.now() + "",
|
|
34
34
|
[]
|
|
35
35
|
);
|
|
36
36
|
const value = ref("");
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
const elRef = vue.ref();
|
|
26
26
|
const once = setOnce();
|
|
27
27
|
const placeholder = vue.computed(() => {
|
|
28
|
-
if (
|
|
28
|
+
if (props.placeholder === void 0) {
|
|
29
29
|
return getLocale("form.import");
|
|
30
30
|
} else if (props.oncePlaceholder) {
|
|
31
31
|
return once(props.placeholder);
|
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
const elRef = ref();
|
|
24
24
|
const once = setOnce();
|
|
25
25
|
const placeholder = computed(() => {
|
|
26
|
-
if (
|
|
26
|
+
if (props.placeholder === void 0) {
|
|
27
27
|
return getLocale("form.import");
|
|
28
28
|
} else if (props.oncePlaceholder) {
|
|
29
29
|
return once(props.placeholder);
|
|
@@ -157,8 +157,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
157
157
|
};
|
|
158
158
|
const createDoubleRows = (arr, trls, trvs) => {
|
|
159
159
|
if (trls.length > 0) {
|
|
160
|
-
arr.push(vue.h("tr", {}, trls));
|
|
161
|
-
arr.push(vue.h("tr", {}, trvs));
|
|
160
|
+
arr.push(vue.h("tr", {}, trls), vue.h("tr", {}, trvs));
|
|
162
161
|
}
|
|
163
162
|
};
|
|
164
163
|
const getlabel = (obj, index2) => {
|
|
@@ -198,17 +197,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
198
197
|
width: obj.labelWidth || props.labelWidth
|
|
199
198
|
}
|
|
200
199
|
},
|
|
201
|
-
[
|
|
202
|
-
util.setLabel(
|
|
203
|
-
obj,
|
|
204
|
-
props,
|
|
205
|
-
compons,
|
|
206
|
-
emit,
|
|
207
|
-
slots,
|
|
208
|
-
isComponSelected,
|
|
209
|
-
index2
|
|
210
|
-
)
|
|
211
|
-
]
|
|
200
|
+
[util.setLabel(obj, props, compons, emit, slots, index2)]
|
|
212
201
|
)
|
|
213
202
|
]
|
|
214
203
|
);
|
|
@@ -405,10 +394,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
405
394
|
class: [
|
|
406
395
|
cs.z("table"),
|
|
407
396
|
props.labelPosition ?? "",
|
|
408
|
-
cs.is(
|
|
409
|
-
"border",
|
|
410
|
-
props.border ? true : false
|
|
411
|
-
),
|
|
397
|
+
cs.is("border", Boolean(props.border)),
|
|
412
398
|
cs.is("aliquots", props.aliquots)
|
|
413
399
|
].join(" "),
|
|
414
400
|
cellspacing: "0",
|
|
@@ -424,8 +410,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
424
410
|
}
|
|
425
411
|
};
|
|
426
412
|
vue.onMounted(() => {
|
|
427
|
-
if (
|
|
428
|
-
|
|
413
|
+
if (globalThis) {
|
|
414
|
+
globalThis.addEventListener("click", onClickTotal);
|
|
429
415
|
}
|
|
430
416
|
});
|
|
431
417
|
return {
|
|
@@ -155,8 +155,7 @@ const _sfc_main = defineComponent({
|
|
|
155
155
|
};
|
|
156
156
|
const createDoubleRows = (arr, trls, trvs) => {
|
|
157
157
|
if (trls.length > 0) {
|
|
158
|
-
arr.push(h("tr", {}, trls));
|
|
159
|
-
arr.push(h("tr", {}, trvs));
|
|
158
|
+
arr.push(h("tr", {}, trls), h("tr", {}, trvs));
|
|
160
159
|
}
|
|
161
160
|
};
|
|
162
161
|
const getlabel = (obj, index) => {
|
|
@@ -196,17 +195,7 @@ const _sfc_main = defineComponent({
|
|
|
196
195
|
width: obj.labelWidth || props.labelWidth
|
|
197
196
|
}
|
|
198
197
|
},
|
|
199
|
-
[
|
|
200
|
-
setLabel(
|
|
201
|
-
obj,
|
|
202
|
-
props,
|
|
203
|
-
compons,
|
|
204
|
-
emit,
|
|
205
|
-
slots,
|
|
206
|
-
isComponSelected,
|
|
207
|
-
index
|
|
208
|
-
)
|
|
209
|
-
]
|
|
198
|
+
[setLabel(obj, props, compons, emit, slots, index)]
|
|
210
199
|
)
|
|
211
200
|
]
|
|
212
201
|
);
|
|
@@ -403,10 +392,7 @@ const _sfc_main = defineComponent({
|
|
|
403
392
|
class: [
|
|
404
393
|
cs.z("table"),
|
|
405
394
|
props.labelPosition ?? "",
|
|
406
|
-
cs.is(
|
|
407
|
-
"border",
|
|
408
|
-
props.border ? true : false
|
|
409
|
-
),
|
|
395
|
+
cs.is("border", Boolean(props.border)),
|
|
410
396
|
cs.is("aliquots", props.aliquots)
|
|
411
397
|
].join(" "),
|
|
412
398
|
cellspacing: "0",
|
|
@@ -422,8 +408,8 @@ const _sfc_main = defineComponent({
|
|
|
422
408
|
}
|
|
423
409
|
};
|
|
424
410
|
onMounted(() => {
|
|
425
|
-
if (
|
|
426
|
-
|
|
411
|
+
if (globalThis) {
|
|
412
|
+
globalThis.addEventListener("click", onClickTotal);
|
|
427
413
|
}
|
|
428
414
|
});
|
|
429
415
|
return {
|
|
@@ -11,11 +11,11 @@ const setClass = (item, data, index) => {
|
|
|
11
11
|
return v;
|
|
12
12
|
};
|
|
13
13
|
function setSslot(obj, data, props, compons, emit, slots, isComponSelected, index) {
|
|
14
|
-
const
|
|
14
|
+
const optionss = props.options || {};
|
|
15
|
+
const slot = use.useSetSlot(obj, data, slots, optionss, emit, index);
|
|
15
16
|
if (slot) {
|
|
16
17
|
return slot;
|
|
17
18
|
}
|
|
18
|
-
const optionss = props.options || {};
|
|
19
19
|
if (obj.compon) {
|
|
20
20
|
if (isComponSelected(obj)) {
|
|
21
21
|
const column = use.useSetCompon(
|
|
@@ -26,7 +26,7 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
|
|
|
26
26
|
emit,
|
|
27
27
|
index,
|
|
28
28
|
{
|
|
29
|
-
options:
|
|
29
|
+
options: optionss,
|
|
30
30
|
config: props
|
|
31
31
|
}
|
|
32
32
|
);
|
|
@@ -39,21 +39,22 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
|
|
|
39
39
|
return setDomValue(domValue, props);
|
|
40
40
|
}
|
|
41
41
|
function setDomValue(domValue, table) {
|
|
42
|
-
return (
|
|
42
|
+
return (
|
|
43
|
+
// 如果设置了空值显示处理,则使用处理结果,否则使用原始值;如果都为空则返回空字符串
|
|
44
|
+
(util.setEmptyDisplay(domValue, table.emptyDisplay, table.isEmptyStr) || domValue) ?? ""
|
|
45
|
+
);
|
|
43
46
|
}
|
|
44
|
-
function setLabel(obj, props, compons, emit, slots,
|
|
47
|
+
function setLabel(obj, props, compons, emit, slots, index) {
|
|
45
48
|
let label = obj.label ?? "";
|
|
46
49
|
if (label) {
|
|
47
50
|
label = use.useGetDomLabel(
|
|
48
|
-
label,
|
|
49
51
|
obj,
|
|
50
52
|
props.value,
|
|
51
53
|
slots,
|
|
52
54
|
props.optionss,
|
|
53
55
|
compons,
|
|
54
56
|
emit,
|
|
55
|
-
index || 0
|
|
56
|
-
isComponSelected
|
|
57
|
+
index || 0
|
|
57
58
|
);
|
|
58
59
|
}
|
|
59
60
|
let colon = props.colon;
|
|
@@ -68,6 +69,5 @@ function setLabel(obj, props, compons, emit, slots, isComponSelected, index) {
|
|
|
68
69
|
return label;
|
|
69
70
|
}
|
|
70
71
|
exports.setClass = setClass;
|
|
71
|
-
exports.setDomValue = setDomValue;
|
|
72
72
|
exports.setLabel = setLabel;
|
|
73
73
|
exports.setSslot = setSslot;
|
|
@@ -2,8 +2,36 @@ import { Component } from 'vue';
|
|
|
2
2
|
type Compons = {
|
|
3
3
|
[key: string]: Component;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* 设置类名或CSS样式
|
|
7
|
+
* @param item - 列表对象,包含状态、属性和CSS设置方法等信息
|
|
8
|
+
* @param data - 字符串对象,用于查找对应状态或属性的值
|
|
9
|
+
* @param index - 当前项在列表中的索引位置
|
|
10
|
+
* @returns 返回设置的CSS类名或通过自定义方法处理后的结果
|
|
11
|
+
*/
|
|
5
12
|
export declare const setClass: (item: ListObj, data: ObjStr, index: number) => any;
|
|
13
|
+
/**
|
|
14
|
+
* 设置插槽或组件的值
|
|
15
|
+
* @param obj - 列表对象,包含组件信息
|
|
16
|
+
* @param data - 数据对象,用于设置值的数据源
|
|
17
|
+
* @param props - 属性配置对象
|
|
18
|
+
* @param compons - 组件集合
|
|
19
|
+
* @param emit - 事件发射函数
|
|
20
|
+
* @param slots - 插槽配置对象
|
|
21
|
+
* @param isComponSelected - 判断组件是否被选中的函数
|
|
22
|
+
* @param index - 可选的索引值
|
|
23
|
+
* @returns 返回设置后的插槽、组件或DOM值
|
|
24
|
+
*/
|
|
6
25
|
export declare function setSslot(obj: ListObj, data: ObjAny, props: ObjAny, compons: Compons, emit: Function, slots: ObjAny, isComponSelected: Function, index?: number): any;
|
|
7
|
-
|
|
8
|
-
|
|
26
|
+
/**
|
|
27
|
+
* 设置标签文本内容,支持插槽和国际化处理
|
|
28
|
+
* @param obj - 对象配置,包含label属性等
|
|
29
|
+
* @param props - 组件属性对象
|
|
30
|
+
* @param compons - 组件集合
|
|
31
|
+
* @param emit - 事件发射函数
|
|
32
|
+
* @param slots - 插槽对象
|
|
33
|
+
* @param index - 索引值,可选参数
|
|
34
|
+
* @returns 处理后的标签内容,可能包含冒号后缀
|
|
35
|
+
*/
|
|
36
|
+
export declare function setLabel(obj: ObjAny, props: ObjAny, compons: Compons, emit: Function, slots: ObjAny, index?: number): any;
|
|
9
37
|
export {};
|
|
@@ -9,11 +9,11 @@ const setClass = (item, data, index) => {
|
|
|
9
9
|
return v;
|
|
10
10
|
};
|
|
11
11
|
function setSslot(obj, data, props, compons, emit, slots, isComponSelected, index) {
|
|
12
|
-
const
|
|
12
|
+
const optionss = props.options || {};
|
|
13
|
+
const slot = useSetSlot(obj, data, slots, optionss, emit, index);
|
|
13
14
|
if (slot) {
|
|
14
15
|
return slot;
|
|
15
16
|
}
|
|
16
|
-
const optionss = props.options || {};
|
|
17
17
|
if (obj.compon) {
|
|
18
18
|
if (isComponSelected(obj)) {
|
|
19
19
|
const column = useSetCompon(
|
|
@@ -24,7 +24,7 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
|
|
|
24
24
|
emit,
|
|
25
25
|
index,
|
|
26
26
|
{
|
|
27
|
-
options:
|
|
27
|
+
options: optionss,
|
|
28
28
|
config: props
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -37,21 +37,22 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
|
|
|
37
37
|
return setDomValue(domValue, props);
|
|
38
38
|
}
|
|
39
39
|
function setDomValue(domValue, table) {
|
|
40
|
-
return (
|
|
40
|
+
return (
|
|
41
|
+
// 如果设置了空值显示处理,则使用处理结果,否则使用原始值;如果都为空则返回空字符串
|
|
42
|
+
(setEmptyDisplay(domValue, table.emptyDisplay, table.isEmptyStr) || domValue) ?? ""
|
|
43
|
+
);
|
|
41
44
|
}
|
|
42
|
-
function setLabel(obj, props, compons, emit, slots,
|
|
45
|
+
function setLabel(obj, props, compons, emit, slots, index) {
|
|
43
46
|
let label = obj.label ?? "";
|
|
44
47
|
if (label) {
|
|
45
48
|
label = useGetDomLabel(
|
|
46
|
-
label,
|
|
47
49
|
obj,
|
|
48
50
|
props.value,
|
|
49
51
|
slots,
|
|
50
52
|
props.optionss,
|
|
51
53
|
compons,
|
|
52
54
|
emit,
|
|
53
|
-
index || 0
|
|
54
|
-
isComponSelected
|
|
55
|
+
index || 0
|
|
55
56
|
);
|
|
56
57
|
}
|
|
57
58
|
let colon = props.colon;
|
|
@@ -67,7 +68,6 @@ function setLabel(obj, props, compons, emit, slots, isComponSelected, index) {
|
|
|
67
68
|
}
|
|
68
69
|
export {
|
|
69
70
|
setClass,
|
|
70
|
-
setDomValue,
|
|
71
71
|
setLabel,
|
|
72
72
|
setSslot
|
|
73
73
|
};
|
|
@@ -61,8 +61,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
61
61
|
);
|
|
62
62
|
const setListValue = (list, index2) => {
|
|
63
63
|
const arr = [];
|
|
64
|
-
for (
|
|
65
|
-
const obj = list[i];
|
|
64
|
+
for (const obj of list) {
|
|
66
65
|
if (obj.type == "index") {
|
|
67
66
|
let value = "";
|
|
68
67
|
const paginat = attrs.assem.paginat;
|
|
@@ -59,8 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
);
|
|
60
60
|
const setListValue = (list, index) => {
|
|
61
61
|
const arr = [];
|
|
62
|
-
for (
|
|
63
|
-
const obj = list[i];
|
|
62
|
+
for (const obj of list) {
|
|
64
63
|
if (obj.type == "index") {
|
|
65
64
|
let value = "";
|
|
66
65
|
const paginat = attrs.assem.paginat;
|
|
@@ -2,32 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("vue");
|
|
4
4
|
const use = require("../../common/use.cjs");
|
|
5
|
-
const isObject = require("@fangzhongya/utils/basic/object/isObject");
|
|
6
5
|
function setLabel(value, obj, props, compons, emit, slots, index) {
|
|
7
6
|
let label = value ?? obj.label ?? "";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (label.compon) {
|
|
16
|
-
const column = use.useSetCompon(
|
|
17
|
-
label,
|
|
18
|
-
props.value,
|
|
19
|
-
{},
|
|
20
|
-
compons,
|
|
21
|
-
emit,
|
|
22
|
-
index
|
|
23
|
-
);
|
|
24
|
-
if (column) {
|
|
25
|
-
return column;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return use.useGetDomValue(label, props.value, {}, index);
|
|
7
|
+
obj.label = label;
|
|
8
|
+
return use.useVNodeComponDom(obj, props.value, slots, emit, {
|
|
9
|
+
// options: {},
|
|
10
|
+
compons,
|
|
11
|
+
index,
|
|
12
|
+
scope: {
|
|
13
|
+
config: props
|
|
29
14
|
}
|
|
30
|
-
}
|
|
31
|
-
return label;
|
|
15
|
+
});
|
|
32
16
|
}
|
|
33
17
|
exports.setLabel = setLabel;
|
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { isObject } from "@fangzhongya/utils/basic/object/isObject";
|
|
2
|
+
import { useVNodeComponDom } from "../../common/use.js";
|
|
4
3
|
function setLabel(value, obj, props, compons, emit, slots, index) {
|
|
5
4
|
let label = value ?? obj.label ?? "";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (label.compon) {
|
|
14
|
-
const column = useSetCompon(
|
|
15
|
-
label,
|
|
16
|
-
props.value,
|
|
17
|
-
{},
|
|
18
|
-
compons,
|
|
19
|
-
emit,
|
|
20
|
-
index
|
|
21
|
-
);
|
|
22
|
-
if (column) {
|
|
23
|
-
return column;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return useGetDomValue(label, props.value, {}, index);
|
|
5
|
+
obj.label = label;
|
|
6
|
+
return useVNodeComponDom(obj, props.value, slots, emit, {
|
|
7
|
+
// options: {},
|
|
8
|
+
compons,
|
|
9
|
+
index,
|
|
10
|
+
scope: {
|
|
11
|
+
config: props
|
|
27
12
|
}
|
|
28
|
-
}
|
|
29
|
-
return label;
|
|
13
|
+
});
|
|
30
14
|
}
|
|
31
15
|
export {
|
|
32
16
|
setLabel
|
|
@@ -49,6 +49,24 @@
|
|
|
49
49
|
display: grid;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
.forms-items {
|
|
53
|
+
width: 100%;
|
|
54
|
+
}
|
|
55
|
+
.forms-items.row {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
}
|
|
59
|
+
.forms-items.column {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
}
|
|
63
|
+
.forms-items-li.no-error {
|
|
64
|
+
--el-color-danger: var(--el-border-color);
|
|
65
|
+
}
|
|
66
|
+
.forms-items-li.no-error .el-input__wrapper.is-focus {
|
|
67
|
+
--el-color-danger: var(--el-input-focus-border);
|
|
68
|
+
}
|
|
69
|
+
|
|
52
70
|
.double {
|
|
53
71
|
width: 100%;
|
|
54
72
|
display: inline-flex;
|
|
@@ -27,10 +27,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
27
|
const lefty = vue.ref("");
|
|
28
28
|
const dom = vue.ref();
|
|
29
29
|
vue.onMounted(() => {
|
|
30
|
-
|
|
30
|
+
globalThis.addEventListener("mousedown", watchContextmenu);
|
|
31
31
|
});
|
|
32
32
|
vue.onUnmounted(() => {
|
|
33
|
-
|
|
33
|
+
globalThis.removeEventListener("mousedown", watchContextmenu);
|
|
34
34
|
});
|
|
35
35
|
function watchContextmenu(event) {
|
|
36
36
|
if (refRightKeyBox.value.contains(event.target)) {
|
|
@@ -69,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
69
69
|
x = event.pageX - 1;
|
|
70
70
|
y = event.pageY - 1;
|
|
71
71
|
}
|
|
72
|
-
let ww =
|
|
72
|
+
let ww = globalThis ? globalThis.innerWidth : 0;
|
|
73
73
|
let kw = 0;
|
|
74
74
|
if (ww != 0 && x + 120 > ww) {
|
|
75
75
|
kw = 0 - (x + 120 - ww);
|
|
@@ -25,10 +25,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
const lefty = ref("");
|
|
26
26
|
const dom = ref();
|
|
27
27
|
onMounted(() => {
|
|
28
|
-
|
|
28
|
+
globalThis.addEventListener("mousedown", watchContextmenu);
|
|
29
29
|
});
|
|
30
30
|
onUnmounted(() => {
|
|
31
|
-
|
|
31
|
+
globalThis.removeEventListener("mousedown", watchContextmenu);
|
|
32
32
|
});
|
|
33
33
|
function watchContextmenu(event) {
|
|
34
34
|
if (refRightKeyBox.value.contains(event.target)) {
|
|
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
x = event.pageX - 1;
|
|
68
68
|
y = event.pageY - 1;
|
|
69
69
|
}
|
|
70
|
-
let ww =
|
|
70
|
+
let ww = globalThis ? globalThis.innerWidth : 0;
|
|
71
71
|
let kw = 0;
|
|
72
72
|
if (ww != 0 && x + 120 > ww) {
|
|
73
73
|
kw = 0 - (x + 120 - ww);
|
|
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
31
|
}, 1e3 / fps);
|
|
32
32
|
resolve(v);
|
|
33
33
|
});
|
|
34
|
-
const getTime = () =>
|
|
34
|
+
const getTime = () => Date.now();
|
|
35
35
|
const val = vue.ref();
|
|
36
36
|
const currentFps = vue.ref(60);
|
|
37
37
|
let animation = true;
|
|
@@ -29,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
}, 1e3 / fps);
|
|
30
30
|
resolve(v);
|
|
31
31
|
});
|
|
32
|
-
const getTime = () =>
|
|
32
|
+
const getTime = () => Date.now();
|
|
33
33
|
const val = ref();
|
|
34
34
|
const currentFps = ref(60);
|
|
35
35
|
let animation = true;
|