@lingshugroup/web-plus 1.7.4 → 1.7.5

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 (36) hide show
  1. package/lib/index.css +1 -1
  2. package/lib/index.css.br +0 -0
  3. package/lib/index.css.gz +0 -0
  4. package/lib/packages/ls-components/components/_constants/token/index.cjs +1 -1
  5. package/lib/packages/ls-components/components/_constants/token/index.js +3 -2
  6. package/lib/packages/ls-components/components/editor/Index.vue/index.cjs +1 -1
  7. package/lib/packages/ls-components/components/editor/Index.vue/index.js +2 -2
  8. package/lib/packages/ls-components/components/menu/Index.vue/index.cjs +1 -1
  9. package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
  10. package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
  11. package/lib/packages/ls-components/components/menu/Index.vue/index2.js +51 -48
  12. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
  13. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.gz +0 -0
  14. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.cjs +1 -1
  15. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js +62 -57
  16. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.br +0 -0
  17. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.gz +0 -0
  18. package/lib/packages/ls-components/components/menu/types/index.cjs +1 -1
  19. package/lib/packages/ls-components/components/menu/types/index.js +4 -0
  20. package/lib/packages/ls-components/components/menu/types/index.js.br +0 -0
  21. package/lib/packages/ls-components/components/menu/types/index.js.gz +0 -0
  22. package/lib/packages/ls-components/components/tooltip/Index.vue/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/tooltip/Index.vue/index.js +2 -2
  24. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.cjs +1 -1
  25. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js +57 -31
  26. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.br +0 -0
  27. package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.gz +0 -0
  28. package/lib/packages/ls-components/components/tooltip/types/index.cjs +1 -0
  29. package/lib/packages/ls-components/components/tooltip/types/index.js +22 -0
  30. package/lib/types/components/_constants/token.d.ts +1 -0
  31. package/lib/types/components/menu/Index.vue.d.ts +3 -0
  32. package/lib/types/components/menu/index.d.ts +6 -0
  33. package/lib/types/components/menu/types.d.ts +1 -0
  34. package/lib/types/components/tooltip/Index.vue.d.ts +17 -1
  35. package/lib/types/components/tooltip/types.d.ts +7 -1
  36. package/package.json +1 -1
@@ -1,51 +1,77 @@
1
1
  var T = Object.defineProperty;
2
- var n = (l, r) => T(l, "name", { value: r, configurable: !0 });
2
+ var a = (r, o) => T(r, "name", { value: o, configurable: !0 });
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { defineComponent as p, ref as i, useAttrs as g, computed as h, openBlock as C, createElementBlock as k, normalizeClass as y, unref as s, createElementVNode as B, toDisplayString as E, createVNode as R, mergeProps as S, withCtx as c, renderSlot as a, nextTick as b } from "vue";
7
- import { useNamespace as N } from "../../_hooks/useNamespace/index.js";
8
- import { ElTooltip as $ } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/tooltip/index/index.js";
9
- const M = { class: "temp-content" }, V = p({
6
+ import { defineComponent as g, ref as u, useAttrs as $, computed as c, openBlock as b, createElementBlock as x, normalizeClass as z, unref as s, normalizeStyle as m, createElementVNode as E, toDisplayString as k, createVNode as B, mergeProps as N, withCtx as f, renderSlot as d, nextTick as R } from "vue";
7
+ import { useNamespace as W } from "../../_hooks/useNamespace/index.js";
8
+ import { lsTooltipProps as H } from "../types/index.js";
9
+ import { isEmpty as h } from "../../_utils/utils/index.js";
10
+ import { ElTooltip as M } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/tooltip/index/index.js";
11
+ const P = g({
10
12
  name: "LSTooltip"
11
- }), j = /* @__PURE__ */ p({
12
- ...V,
13
- setup(l) {
14
- const u = N("tooltip").b(), o = i(!1), e = i(), d = g(), m = h(() => d.content || "");
15
- function f() {
16
- _();
13
+ }), J = /* @__PURE__ */ g({
14
+ ...P,
15
+ props: H,
16
+ setup(r) {
17
+ const o = r, v = W("tooltip").b(), n = u(!1), i = u(), w = $(), p = c(() => {
18
+ const t = o.width;
19
+ let e = "100%";
20
+ return (t.endsWith("%") || t.endsWith("px")) && !h(parseInt(t)) ? e = t : h(Number(t)) || (e = `${t}px`), {
21
+ width: e
22
+ };
23
+ }), y = c(() => w.content || ""), _ = c(() => {
24
+ const t = o.lineClamp > 1 ? Object.assign(
25
+ {
26
+ height: "auto"
27
+ },
28
+ p.value
29
+ ) : {
30
+ width: "auto",
31
+ height: 0
32
+ }, e = o.fontSize;
33
+ e && (t.fontSize = `${e}px`);
34
+ const l = o.lineHeight;
35
+ return l && (t.lineHeight = `${l}px`), t;
36
+ });
37
+ function C() {
38
+ S();
17
39
  }
18
- n(f, "onMouseEnter");
19
- async function _() {
20
- if (await b(), e.value) {
21
- const t = e.value.getBoundingClientRect();
22
- e.value.querySelector(".temp-content").getBoundingClientRect().width > t.width ? o.value = !0 : o.value = !1;
40
+ a(C, "onMouseEnter");
41
+ async function S() {
42
+ if (await R(), i.value) {
43
+ const t = i.value.getBoundingClientRect(), e = i.value.querySelector(".temp-content").getBoundingClientRect();
44
+ o.lineClamp <= 1 ? e.width > t.width ? n.value = !0 : n.value = !1 : e.height > t.height ? n.value = !0 : n.value = !1;
23
45
  }
24
46
  }
25
- return n(_, "updateTooltip"), (t, v) => {
26
- const w = $;
27
- return C(), k("div", {
47
+ return a(S, "updateTooltip"), (t, e) => {
48
+ const l = M;
49
+ return b(), x("div", {
28
50
  ref_key: "lsTooltipRef",
29
- ref: e,
30
- class: y(s(u)),
31
- onMouseenter: f
51
+ ref: i,
52
+ class: z(s(v)),
53
+ style: m(s(p)),
54
+ onMouseenter: C
32
55
  }, [
33
- B("div", M, E(s(m)), 1),
34
- R(w, S({
35
- disabled: !s(o)
56
+ E("div", {
57
+ class: "temp-content",
58
+ style: m(s(_))
59
+ }, k(s(y)), 5),
60
+ B(l, N({
61
+ disabled: !s(n)
36
62
  }, t.$attrs), {
37
- default: c(() => [
38
- a(t.$slots, "default", {}, void 0, !0)
63
+ default: f(() => [
64
+ d(t.$slots, "default", {}, void 0, !0)
39
65
  ]),
40
- content: c(() => [
41
- a(t.$slots, "content", {}, void 0, !0)
66
+ content: f(() => [
67
+ d(t.$slots, "content", {}, void 0, !0)
42
68
  ]),
43
69
  _: 3
44
70
  }, 16, ["disabled"])
45
- ], 34);
71
+ ], 38);
46
72
  };
47
73
  }
48
74
  });
49
75
  export {
50
- j as default
76
+ J as default
51
77
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../_utils/runtime/index.cjs"),t=e.buildProps({width:{type:[Number,String],default:"100%"},fontSize:{type:Number,default:null},lineClamp:{type:Number,default:1},lineHeight:{type:Number,default:null}});exports.lsTooltipProps=t;
@@ -0,0 +1,22 @@
1
+ import { buildProps as e } from "../../_utils/runtime/index.js";
2
+ const l = e({
3
+ width: {
4
+ type: [Number, String],
5
+ default: "100%"
6
+ },
7
+ fontSize: {
8
+ type: Number,
9
+ default: null
10
+ },
11
+ lineClamp: {
12
+ type: Number,
13
+ default: 1
14
+ },
15
+ lineHeight: {
16
+ type: Number,
17
+ default: null
18
+ }
19
+ });
20
+ export {
21
+ l as lsTooltipProps
22
+ };
@@ -1 +1,2 @@
1
1
  export declare const lsBtnKey: unique symbol;
2
+ export declare const lsMenuKey: unique symbol;
@@ -145,6 +145,7 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
145
145
  hoverColor: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
146
146
  isDefineClick: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
147
147
  showTooltip: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
148
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
148
149
  }>, {
149
150
  lsComMenuRef: globalThis.Ref<any, any>;
150
151
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
@@ -184,6 +185,7 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
184
185
  hoverColor: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
185
186
  isDefineClick: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
186
187
  showTooltip: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
188
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
187
189
  }>> & Readonly<{}>, {
188
190
  menuConfigList: MenuBaseType[];
189
191
  needPermission: EpPropMergeType<BooleanConstructor, unknown, unknown>;
@@ -191,6 +193,7 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
191
193
  hoverColor: string;
192
194
  isDefineClick: EpPropMergeType<BooleanConstructor, unknown, unknown>;
193
195
  showTooltip: EpPropMergeType<BooleanConstructor, unknown, unknown>;
196
+ fontSize: number;
194
197
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
195
198
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
196
199
  export default _default;
@@ -39,6 +39,7 @@ declare const LSMenu: {
39
39
  hoverColor: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
40
40
  isDefineClick: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
41
41
  showTooltip: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
42
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
42
43
  }>> & Readonly<{}>, {
43
44
  lsComMenuRef: globalThis.Ref<any, any>;
44
45
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
@@ -48,6 +49,7 @@ declare const LSMenu: {
48
49
  hoverColor: string;
49
50
  isDefineClick: EpPropMergeType<BooleanConstructor, unknown, unknown>;
50
51
  showTooltip: EpPropMergeType<BooleanConstructor, unknown, unknown>;
52
+ fontSize: number;
51
53
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
52
54
  P: {};
53
55
  B: {};
@@ -92,6 +94,7 @@ declare const LSMenu: {
92
94
  hoverColor: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
93
95
  isDefineClick: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
94
96
  showTooltip: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
97
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
95
98
  }>> & Readonly<{}>, {
96
99
  lsComMenuRef: globalThis.Ref<any, any>;
97
100
  }, {}, {}, {}, {
@@ -101,6 +104,7 @@ declare const LSMenu: {
101
104
  hoverColor: string;
102
105
  isDefineClick: EpPropMergeType<BooleanConstructor, unknown, unknown>;
103
106
  showTooltip: EpPropMergeType<BooleanConstructor, unknown, unknown>;
107
+ fontSize: number;
104
108
  }>;
105
109
  __isFragment?: never;
106
110
  __isTeleport?: never;
@@ -142,6 +146,7 @@ declare const LSMenu: {
142
146
  hoverColor: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
143
147
  isDefineClick: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
144
148
  showTooltip: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
149
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
145
150
  }>> & Readonly<{}>, {
146
151
  lsComMenuRef: globalThis.Ref<any, any>;
147
152
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
@@ -151,6 +156,7 @@ declare const LSMenu: {
151
156
  hoverColor: string;
152
157
  isDefineClick: EpPropMergeType<BooleanConstructor, unknown, unknown>;
153
158
  showTooltip: EpPropMergeType<BooleanConstructor, unknown, unknown>;
159
+ fontSize: number;
154
160
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
155
161
  $slots: Partial<Record<string, (_: {}) => any>>;
156
162
  }) & {
@@ -81,6 +81,7 @@ export declare const lsMenuProps: {
81
81
  hoverColor: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
82
82
  isDefineClick: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
83
83
  showTooltip: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
84
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
84
85
  };
85
86
  export declare const lsMenuItemProps: {
86
87
  needPermission: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { EpPropFinalized, EpPropMergeType } from '../_utils/types';
2
3
  declare function __VLS_template(): {
3
4
  attrs: Partial<{}>;
4
5
  slots: {
@@ -11,7 +12,22 @@ declare function __VLS_template(): {
11
12
  rootEl: HTMLDivElement;
12
13
  };
13
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
- declare const __VLS_component: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
15
+ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
16
+ width: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
17
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
18
+ lineClamp: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
19
+ lineHeight: EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
20
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
21
+ width: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
22
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
23
+ lineClamp: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
24
+ lineHeight: EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
25
+ }>> & Readonly<{}>, {
26
+ width: EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>;
27
+ fontSize: number;
28
+ lineClamp: number;
29
+ lineHeight: number;
30
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
15
31
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
32
  export default _default;
17
33
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1,7 @@
1
- export declare const lsTooltipProps: {};
1
+ import { EpPropFinalized } from '../_utils/types';
2
+ export declare const lsTooltipProps: {
3
+ width: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
4
+ fontSize: EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
5
+ lineClamp: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
6
+ lineHeight: EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",