yahee-components 0.0.93 → 0.0.94

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.
@@ -1,11 +1,11 @@
1
- import { defineComponent as s, ref as n, nextTick as u, createElementBlock as d, openBlock as m, createVNode as i, unref as l, withCtx as r, createElementVNode as h } from "vue";
2
- import { GetHelpTag as v } from "../packages/components/api/log/index.js";
3
- import { InfoFilled as _ } from "@element-plus/icons-vue";
4
- import { ElPopover as C, ElIcon as g } from "element-plus";
1
+ import { defineComponent as u, ref as n, nextTick as d, createElementBlock as h, openBlock as v, createVNode as p, unref as i, withCtx as c, withDirectives as m, createElementVNode as g, normalizeStyle as y, withModifiers as C } from "vue";
2
+ import { GetHelpTag as _ } from "../packages/components/api/log/index.js";
3
+ import { InfoFilled as w } from "@element-plus/icons-vue";
4
+ import { ElPopover as k, vLoading as z, ElIcon as S } from "element-plus";
5
5
  import "element-plus/theme-chalk/src/base.scss";
6
6
  import "element-plus/theme-chalk/src/popper.scss";
7
7
  import "element-plus/theme-chalk/src/popover.scss";
8
- const y = { class: "yahee-help-tag" }, k = ["innerHTML"], S = /* @__PURE__ */ s({
8
+ const x = { class: "yahee-help-tag" }, I = ["innerHTML"], B = /* @__PURE__ */ u({
9
9
  __name: "help-tag",
10
10
  props: {
11
11
  tipsId: {
@@ -18,43 +18,50 @@ const y = { class: "yahee-help-tag" }, k = ["innerHTML"], S = /* @__PURE__ */ s(
18
18
  required: !1
19
19
  }
20
20
  },
21
- setup(p) {
22
- const c = n(), e = n(null), t = n(null), a = p;
23
- u(() => {
24
- t.value && (t.value.style.maxHeight = `${a.tipsContentSize.height}px`, t.value.style.overflowY = "auto"), e.value && typeof e.value.updatePopper == "function" && e.value.updatePopper();
21
+ setup(l) {
22
+ const r = n(), e = n(null), t = n(null), a = n(!1), f = l;
23
+ d(() => {
24
+ t.value && (t.value.style.height = `${f.tipsContentSize.height}px`, t.value.style.overflowY = "auto"), e.value && typeof e.value.updatePopper == "function" && e.value.updatePopper();
25
25
  });
26
- const f = () => {
27
- v({ Id: a.tipsId }).then((o) => {
28
- o && o.Content && (c.value = o.Content.Content);
26
+ const s = () => {
27
+ a.value = !0, _({ Id: f.tipsId }).then((o) => {
28
+ o && o.Content && (r.value = o.Content.Content);
29
+ }).catch(() => {
30
+ r.value = "加载失败,请重试";
31
+ }).finally(() => {
32
+ a.value = !1;
29
33
  });
30
34
  };
31
- return (o, w) => (m(), d("div", y, [
32
- i(l(C), {
35
+ return (o, T) => (v(), h("div", x, [
36
+ p(i(k), {
33
37
  ref_key: "popoverRef",
34
38
  ref: e,
35
39
  placement: "bottom",
36
- width: p.tipsContentSize.width,
40
+ width: l.tipsContentSize.width,
37
41
  trigger: "click"
38
42
  }, {
39
- reference: r(() => [
40
- i(l(g), {
43
+ reference: c(() => [
44
+ p(i(S), {
41
45
  size: "18",
42
46
  color: "#ccc",
43
- onClick: f
47
+ onClick: C(s, ["stop"]),
48
+ style: { cursor: "pointer" }
44
49
  }, {
45
- default: r(() => [
46
- i(l(_))
50
+ default: c(() => [
51
+ p(i(w))
47
52
  ]),
48
53
  _: 1
49
54
  })
50
55
  ]),
51
- default: r(() => [
52
- h("div", {
56
+ default: c(() => [
57
+ m(g("div", {
53
58
  ref_key: "contentRef",
54
59
  ref: t,
55
- class: "dynamic-content",
56
- innerHTML: c.value
57
- }, null, 8, k)
60
+ innerHTML: r.value,
61
+ style: y({ height: l.tipsContentSize.height, overflowY: "hidden" })
62
+ }, null, 12, I), [
63
+ [i(z), a.value]
64
+ ])
58
65
  ]),
59
66
  _: 1
60
67
  }, 8, ["width"])
@@ -62,5 +69,5 @@ const y = { class: "yahee-help-tag" }, k = ["innerHTML"], S = /* @__PURE__ */ s(
62
69
  }
63
70
  });
64
71
  export {
65
- S as default
72
+ B as default
66
73
  };
@@ -0,0 +1,4 @@
1
+ .yahee-help-tag {
2
+ display: flex;
3
+ align-items: center;
4
+ }
package/es/style.css CHANGED
@@ -548,6 +548,11 @@
548
548
  font-size: 20px;
549
549
  }
550
550
 
551
+ .yahee-help-tag {
552
+ display: flex;
553
+ align-items: center;
554
+ }
555
+
551
556
  :root {
552
557
  --el-color-primary: #3366cc;
553
558
  --el-text-color-regular: #000;
@@ -0,0 +1,4 @@
1
+ .yahee-help-tag {
2
+ display: flex;
3
+ align-items: center;
4
+ }
package/lib/style.css CHANGED
@@ -548,6 +548,11 @@
548
548
  font-size: 20px;
549
549
  }
550
550
 
551
+ .yahee-help-tag {
552
+ display: flex;
553
+ align-items: center;
554
+ }
555
+
551
556
  :root {
552
557
  --el-color-primary: #3366cc;
553
558
  --el-text-color-regular: #000;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.93",
4
+ "version": "0.0.94",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",