@das-fed/ui 6.4.0-dev.109 → 6.4.0-dev.110
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/package.json +5 -5
- package/packages/components/error-overlay-model/index.d.ts +1 -0
- package/packages/components/error-overlay-model/index.js +32 -31
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/error-overlay-model/src/index.vue.d.ts +1 -0
- package/packages/components/error-overlay-model/src/type.d.ts +3 -0
- package/packages/components/form-item/index.js +736 -781
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/search-form/index.js +3 -3
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/ui",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.110",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@antv/x6-plugin-snapline": "^2.1.7",
|
|
27
27
|
"@antv/x6-plugin-transform": "^2.1.8",
|
|
28
28
|
"@antv/x6-vue-shape": "^2.1.2",
|
|
29
|
-
"@das-fed/cli": "6.4.0-dev.
|
|
29
|
+
"@das-fed/cli": "6.4.0-dev.110",
|
|
30
30
|
"@element-plus/icons-vue": "^2.3.1",
|
|
31
31
|
"@types/lodash": "^4.14.194",
|
|
32
32
|
"@types/lodash-es": "^4.17.9",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"vue-tsc": "^2.0.29"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@das-fed/ui": "6.4.0-dev.
|
|
60
|
-
"@das-fed/utils": "6.4.0-dev.
|
|
61
|
-
"@das-fed/web": "6.4.0-dev.
|
|
59
|
+
"@das-fed/ui": "6.4.0-dev.110",
|
|
60
|
+
"@das-fed/utils": "6.4.0-dev.110",
|
|
61
|
+
"@das-fed/web": "6.4.0-dev.110",
|
|
62
62
|
"@wangeditor-next/editor": "5.6.31",
|
|
63
63
|
"@wangeditor-next/editor-for-vue": "5.1.14",
|
|
64
64
|
"@wangeditor-next/plugin-upload-attachment": "1.1.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const DasErrorOverlayModel: import("@das-fed/utils").SFCWithInstall<import("vue").DefineComponent<import("./src/type.js").Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./src/type.js").Props> & Readonly<{}>, {
|
|
2
2
|
errorLabel: string;
|
|
3
3
|
errorModelZIndex: number;
|
|
4
|
+
errorWidth: string;
|
|
4
5
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>;
|
|
5
6
|
export { DasErrorOverlayModel };
|
|
@@ -1,76 +1,77 @@
|
|
|
1
1
|
import { withInstall as D } from "@das-fed/utils/with-install/index";
|
|
2
|
-
import { defineComponent as L, ref as
|
|
3
|
-
import { getVarValue as
|
|
2
|
+
import { defineComponent as L, ref as d, computed as y, onMounted as V, nextTick as I, createBlock as O, openBlock as R, Teleport as T, createElementVNode as M, normalizeStyle as H, toDisplayString as j } from "vue";
|
|
3
|
+
import { getVarValue as W } from "@das-fed/web/packages/theme/index";
|
|
4
4
|
const F = /* @__PURE__ */ L({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
getEl: {},
|
|
8
8
|
errorLabel: { default: "" },
|
|
9
|
-
errorModelZIndex: { default: 2e3 }
|
|
9
|
+
errorModelZIndex: { default: 2e3 },
|
|
10
|
+
errorWidth: { default: void 0 }
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
12
|
+
setup(k) {
|
|
13
|
+
const r = k, E = d(null), l = d(), n = d({
|
|
13
14
|
x: 0,
|
|
14
15
|
y: 0
|
|
15
16
|
}), m = y(() => ({
|
|
16
17
|
"box-sizing": "border-box",
|
|
17
18
|
"font-size": "12px",
|
|
18
|
-
"background-color":
|
|
19
|
+
"background-color": W("--das-ui-color-overlay-error").value,
|
|
19
20
|
"box-shadow": "0px 4px 10px 0px rgba(0, 0, 0, 0.2)",
|
|
20
21
|
"border-radius": "1px",
|
|
21
22
|
padding: "2px 8px",
|
|
22
|
-
"z-index":
|
|
23
|
+
"z-index": r.errorModelZIndex
|
|
23
24
|
})), w = y(() => ({
|
|
24
25
|
...m.value,
|
|
25
|
-
width:
|
|
26
|
+
width: l.value + "px",
|
|
26
27
|
position: "fixed",
|
|
27
28
|
visibility: "visible",
|
|
28
|
-
top:
|
|
29
|
-
left:
|
|
30
|
-
})),
|
|
29
|
+
top: n.value.y + "px",
|
|
30
|
+
left: n.value.x + "px"
|
|
31
|
+
})), s = d({
|
|
31
32
|
// display: 'block',
|
|
32
|
-
color:
|
|
33
|
+
color: W("--das-ui-input-error-color").value,
|
|
33
34
|
"white-space": "break-spaces"
|
|
34
35
|
}), C = () => {
|
|
35
|
-
const
|
|
36
|
+
const c = (i = 0) => {
|
|
36
37
|
const t = document.createElement("div");
|
|
37
|
-
for (let [
|
|
38
|
+
for (let [h, p] of Object.entries({
|
|
38
39
|
...m.value,
|
|
39
|
-
...
|
|
40
|
-
width:
|
|
40
|
+
...s.value,
|
|
41
|
+
width: i + "px"
|
|
41
42
|
}))
|
|
42
|
-
t.style[
|
|
43
|
+
t.style[h] = p;
|
|
43
44
|
const o = document.createElement("span");
|
|
44
|
-
for (let [
|
|
45
|
-
o.style[
|
|
46
|
-
o.textContent =
|
|
45
|
+
for (let [h, p] of Object.entries(s.value))
|
|
46
|
+
o.style[h] = p;
|
|
47
|
+
o.textContent = r.errorLabel, t.appendChild(o), document.body.appendChild(t);
|
|
47
48
|
const f = t.offsetHeight, B = o.offsetWidth;
|
|
48
49
|
return document.body.removeChild(t), { height: f, textWidth: B };
|
|
49
|
-
},
|
|
50
|
-
const
|
|
51
|
-
return
|
|
52
|
-
}, e =
|
|
53
|
-
|
|
54
|
-
const { left: _ = 0, bottom: u = 0, height: S = 0 } = (e == null ? void 0 : e.getBoundingClientRect()) ?? {}, z =
|
|
55
|
-
|
|
50
|
+
}, x = () => {
|
|
51
|
+
const i = document.documentElement.clientHeight, o = document.documentElement.scrollHeight - i;
|
|
52
|
+
return i - o;
|
|
53
|
+
}, e = r.getEl(), a = (e == null ? void 0 : e.clientWidth) ?? 0, v = c(a), g = v.textWidth;
|
|
54
|
+
r.errorWidth ? l.value = r.errorWidth : g > a ? l.value = g + 2 + 8 + "px" : l.value = a + "px";
|
|
55
|
+
const { left: _ = 0, bottom: u = 0, height: S = 0 } = (e == null ? void 0 : e.getBoundingClientRect()) ?? {}, z = x(), b = v.height;
|
|
56
|
+
n.value.y = Math.ceil(u + b) >= z ? u - S - b : u, n.value.x = _;
|
|
56
57
|
};
|
|
57
58
|
return V(async () => {
|
|
58
59
|
await I(), C();
|
|
59
|
-
}), (
|
|
60
|
+
}), (c, x) => (R(), O(T, { to: "body" }, [
|
|
60
61
|
M(
|
|
61
62
|
"div",
|
|
62
63
|
{
|
|
63
64
|
ref_key: "$errorModel",
|
|
64
|
-
ref:
|
|
65
|
+
ref: E,
|
|
65
66
|
style: H(w.value)
|
|
66
67
|
},
|
|
67
68
|
[
|
|
68
69
|
M(
|
|
69
70
|
"span",
|
|
70
71
|
{
|
|
71
|
-
style: H(
|
|
72
|
+
style: H(s.value)
|
|
72
73
|
},
|
|
73
|
-
j(
|
|
74
|
+
j(c.errorLabel),
|
|
74
75
|
5
|
|
75
76
|
/* TEXT, STYLE */
|
|
76
77
|
)
|
|
Binary file
|
|
@@ -2,5 +2,6 @@ import type { Props } from './type';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
3
3
|
errorLabel: string;
|
|
4
4
|
errorModelZIndex: number;
|
|
5
|
+
errorWidth: string;
|
|
5
6
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
7
|
export default _default;
|