@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/ui",
3
- "version": "6.4.0-dev.109",
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.109",
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.109",
60
- "@das-fed/utils": "6.4.0-dev.109",
61
- "@das-fed/web": "6.4.0-dev.109",
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 n, 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 k } from "@das-fed/web/packages/theme/index";
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(E) {
12
- const i = E, W = n(null), s = n(0), r = n({
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": k("--das-ui-color-overlay-error").value,
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": i.errorModelZIndex
23
+ "z-index": r.errorModelZIndex
23
24
  })), w = y(() => ({
24
25
  ...m.value,
25
- width: s.value + "px",
26
+ width: l.value + "px",
26
27
  position: "fixed",
27
28
  visibility: "visible",
28
- top: r.value.y + "px",
29
- left: r.value.x + "px"
30
- })), c = n({
29
+ top: n.value.y + "px",
30
+ left: n.value.x + "px"
31
+ })), s = d({
31
32
  // display: 'block',
32
- color: k("--das-ui-input-error-color").value,
33
+ color: W("--das-ui-input-error-color").value,
33
34
  "white-space": "break-spaces"
34
35
  }), C = () => {
35
- const d = (l = 0) => {
36
+ const c = (i = 0) => {
36
37
  const t = document.createElement("div");
37
- for (let [p, h] of Object.entries({
38
+ for (let [h, p] of Object.entries({
38
39
  ...m.value,
39
- ...c.value,
40
- width: l + "px"
40
+ ...s.value,
41
+ width: i + "px"
41
42
  }))
42
- t.style[p] = h;
43
+ t.style[h] = p;
43
44
  const o = document.createElement("span");
44
- for (let [p, h] of Object.entries(c.value))
45
- o.style[p] = h;
46
- o.textContent = i.errorLabel, t.appendChild(o), document.body.appendChild(t);
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
- }, g = () => {
50
- const l = document.documentElement.clientHeight, o = document.documentElement.scrollHeight - l;
51
- return l - o;
52
- }, e = i.getEl(), a = (e == null ? void 0 : e.clientWidth) ?? 0, x = d(a), v = x.textWidth;
53
- v > a ? s.value = v + 2 + 8 : s.value = a;
54
- const { left: _ = 0, bottom: u = 0, height: S = 0 } = (e == null ? void 0 : e.getBoundingClientRect()) ?? {}, z = g(), b = x.height;
55
- r.value.y = Math.ceil(u + b) >= z ? u - S - b : u, r.value.x = _;
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
- }), (d, g) => (R(), O(T, { to: "body" }, [
60
+ }), (c, x) => (R(), O(T, { to: "body" }, [
60
61
  M(
61
62
  "div",
62
63
  {
63
64
  ref_key: "$errorModel",
64
- ref: W,
65
+ ref: E,
65
66
  style: H(w.value)
66
67
  },
67
68
  [
68
69
  M(
69
70
  "span",
70
71
  {
71
- style: H(c.value)
72
+ style: H(s.value)
72
73
  },
73
- j(d.errorLabel),
74
+ j(c.errorLabel),
74
75
  5
75
76
  /* TEXT, STYLE */
76
77
  )
@@ -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;
@@ -7,4 +7,7 @@ export interface Props {
7
7
 
8
8
 
9
9
  errorModelZIndex?: number
10
+
11
+
12
+ errorWidth?: string
10
13
  }