@farris/ui-vue 1.0.0-beta.2 → 1.0.0-beta.4
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/accordion/index.esm.js +93 -0
- package/accordion/index.umd.js +1 -0
- package/accordion/package.json +8 -0
- package/accordion/style.css +1 -0
- package/avatar/index.esm.js +94 -0
- package/avatar/index.umd.js +1 -0
- package/avatar/package.json +8 -0
- package/avatar/style.css +1 -0
- package/button/index.esm.js +206 -0
- package/button/index.umd.js +1 -0
- package/button/package.json +8 -0
- package/button-edit/index.esm.js +300 -0
- package/button-edit/index.umd.js +1 -0
- package/button-edit/package.json +8 -0
- package/checkbox/index.esm.js +97 -0
- package/checkbox/index.umd.js +1 -0
- package/checkbox/package.json +8 -0
- package/combo-list/index.esm.js +457 -0
- package/combo-list/index.umd.js +1 -0
- package/combo-list/package.json +8 -0
- package/data-grid/index.esm.js +1535 -0
- package/data-grid/index.umd.js +1 -0
- package/data-grid/package.json +8 -0
- package/data-grid/style.css +1 -0
- package/date-picker/index.esm.js +1479 -0
- package/date-picker/index.umd.js +1 -0
- package/date-picker/package.json +8 -0
- package/date-picker/style.css +1 -0
- package/{src/index.esm.js → farris.all.esm.js} +1 -2
- package/farris.all.umd.js +1 -0
- package/list-view/index.esm.js +144 -0
- package/list-view/index.umd.js +1 -0
- package/list-view/package.json +8 -0
- package/list-view/style.css +1 -0
- package/message-box/index.esm.js +499 -0
- package/message-box/index.umd.js +1 -0
- package/message-box/package.json +8 -0
- package/modal/index.esm.js +165 -0
- package/modal/index.umd.js +1 -0
- package/modal/package.json +8 -0
- package/notify/index.esm.js +187 -0
- package/notify/index.umd.js +1 -0
- package/notify/package.json +8 -0
- package/notify/style.css +1 -0
- package/package.json +6 -5
- package/pagination/index.esm.js +334 -0
- package/pagination/index.umd.js +1 -0
- package/pagination/package.json +8 -0
- package/pagination/style.css +1 -0
- package/popover/index.esm.js +83 -0
- package/popover/index.umd.js +1 -0
- package/popover/package.json +8 -0
- package/popover/style.css +1 -0
- package/radio-group/index.esm.js +79 -0
- package/radio-group/index.umd.js +1 -0
- package/radio-group/package.json +8 -0
- package/section/index.esm.js +70 -0
- package/section/index.umd.js +1 -0
- package/section/package.json +8 -0
- package/switch/index.esm.js +78 -0
- package/switch/index.umd.js +1 -0
- package/switch/package.json +8 -0
- package/tabs/index.esm.js +385 -0
- package/tabs/index.umd.js +1 -0
- package/tabs/package.json +8 -0
- package/tabs/style.css +1 -0
- package/text/index.esm.js +33 -0
- package/text/index.umd.js +1 -0
- package/text/package.json +8 -0
- package/tooltip/index.esm.js +195 -0
- package/tooltip/index.umd.js +1 -0
- package/tooltip/package.json +8 -0
- package/tooltip/style.css +1 -0
- package/types/accordion/index.d.ts +25 -0
- package/types/accordion/src/accordion.component.d.ts +70 -0
- package/types/accordion/src/accordion.props.d.ts +50 -0
- package/types/accordion/src/components/accordion-item.component.d.ts +38 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +34 -0
- package/types/avatar/index.d.ts +23 -0
- package/types/avatar/src/avatar.component.d.ts +109 -0
- package/types/avatar/src/avatar.props.d.ts +96 -0
- package/types/avatar/src/composition/types.d.ts +31 -0
- package/types/avatar/src/composition/use-image.d.ts +19 -0
- package/types/button/index.d.ts +24 -0
- package/types/button/src/button-group.component.d.ts +106 -0
- package/types/button/src/button-group.props.d.ts +106 -0
- package/types/button/src/button.component.d.ts +34 -0
- package/types/button/src/button.props.d.ts +47 -0
- package/types/button/src/composition/types-group.d.ts +24 -0
- package/types/button/src/composition/types.d.ts +24 -0
- package/types/button/src/composition/use-button-group.d.ts +19 -0
- package/types/button/src/composition/use-button.d.ts +19 -0
- package/types/button-edit/index.d.ts +23 -0
- package/types/button-edit/src/button-edit.props.d.ts +135 -0
- package/types/button-edit/src/composition/types.d.ts +118 -0
- package/types/button-edit/src/composition/use-button.d.ts +19 -0
- package/types/button-edit/src/composition/use-clear.d.ts +19 -0
- package/types/button-edit/src/composition/use-text-box.d.ts +19 -0
- package/types/checkbox/index.d.ts +23 -0
- package/types/checkbox/src/checkbox-group.component.d.ts +148 -0
- package/types/checkbox/src/checkbox-group.props.d.ts +123 -0
- package/types/checkbox/src/composition/types.d.ts +46 -0
- package/types/checkbox/src/composition/use-checkbox-group.d.ts +19 -0
- package/types/combo-list/index.d.ts +25 -0
- package/types/combo-list/src/combo-list.props.d.ts +290 -0
- package/types/combo-list/src/components/option.component.d.ts +39 -0
- package/types/combo-list/src/components/options.component.d.ts +10 -0
- package/types/combo-list/src/composition/index.d.ts +18 -0
- package/types/combo-list/src/composition/use-combo-list.d.ts +30 -0
- package/types/combo-list/src/composition/use-option.d.ts +19 -0
- package/types/combo-list/src/composition/use-options.d.ts +2 -0
- package/types/combo-list/src/composition/use-panel.d.ts +8 -0
- package/types/combo-list/src/const.d.ts +40 -0
- package/types/combo-list/src/types.d.ts +186 -0
- package/types/data-grid/index.d.ts +23 -0
- package/types/data-grid/src/components/data/data-area.component.d.ts +21 -0
- package/types/data-grid/src/components/editors/date-picker.component.d.ts +2 -0
- package/types/data-grid/src/components/editors/text-area-editor.component.d.ts +2 -0
- package/types/data-grid/src/components/editors/text-editor.component.d.ts +17 -0
- package/types/data-grid/src/components/header/data-grid-header.component.d.ts +22 -0
- package/types/data-grid/src/components/pagination/data-grid-pagination.component.d.ts +5 -0
- package/types/data-grid/src/components/scrollbar/horizontal-scrollbar.component.d.ts +21 -0
- package/types/data-grid/src/components/scrollbar/vertical-scrollbar.component.d.ts +21 -0
- package/types/data-grid/src/components/sidebar/data-grid-sidebar.component.d.ts +21 -0
- package/types/data-grid/src/components/summary/data-grid-summary.component.d.ts +5 -0
- package/types/data-grid/src/composition/types.d.ts +175 -0
- package/types/data-grid/src/composition/use-column.d.ts +17 -0
- package/types/data-grid/src/composition/use-data-view.d.ts +19 -0
- package/types/data-grid/src/composition/use-edit.d.ts +18 -0
- package/types/data-grid/src/composition/use-fit-column.d.ts +20 -0
- package/types/data-grid/src/composition/use-group-column.d.ts +22 -0
- package/types/data-grid/src/composition/use-group-data.d.ts +3 -0
- package/types/data-grid/src/composition/use-positon-style.d.ts +20 -0
- package/types/data-grid/src/composition/use-resize.d.ts +20 -0
- package/types/data-grid/src/composition/use-row.d.ts +3 -0
- package/types/data-grid/src/composition/use-sidebar.d.ts +3 -0
- package/types/data-grid/src/composition/use-virtual-scroll.d.ts +20 -0
- package/types/data-grid/src/composition/use-visual-data.d.ts +19 -0
- package/types/data-grid/src/data-grid.component.d.ts +278 -0
- package/types/data-grid/src/data-grid.props.d.ts +650 -0
- package/types/date-picker/index.d.ts +28 -0
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +166 -0
- package/types/date-picker/src/components/calendar/calendar.props.d.ts +94 -0
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.component.d.ts +138 -0
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.props.d.ts +81 -0
- package/types/date-picker/src/components/date-picker-container/date-picker-container.component.d.ts +626 -0
- package/types/date-picker/src/components/date-picker-container/date-picker-container.props.d.ts +306 -0
- package/types/date-picker/src/components/month/month.component.d.ts +86 -0
- package/types/date-picker/src/components/month/month.props.d.ts +57 -0
- package/types/date-picker/src/components/year/year.component.d.ts +86 -0
- package/types/date-picker/src/components/year/year.props.d.ts +57 -0
- package/types/date-picker/src/composition/types.d.ts +102 -0
- package/types/date-picker/src/composition/use-calendar.d.ts +2 -0
- package/types/date-picker/src/composition/use-compare.d.ts +2 -0
- package/types/date-picker/src/composition/use-date.d.ts +2 -0
- package/types/date-picker/src/composition/use-disable-date.d.ts +18 -0
- package/types/date-picker/src/composition/use-disable-month.d.ts +2 -0
- package/types/date-picker/src/composition/use-event.d.ts +45 -0
- package/types/date-picker/src/composition/use-mark.d.ts +2 -0
- package/types/date-picker/src/composition/use-month.d.ts +2 -0
- package/types/date-picker/src/composition/use-number.d.ts +2 -0
- package/types/date-picker/src/composition/use-year.d.ts +2 -0
- package/types/date-picker/src/date-picker.props.d.ts +168 -0
- package/types/date-picker/src/types/calendar.d.ts +30 -0
- package/types/date-picker/src/types/common.d.ts +42 -0
- package/types/date-picker/src/types/date-model.d.ts +38 -0
- package/types/date-picker/src/types/month.d.ts +48 -0
- package/types/date-picker/src/types/year.d.ts +24 -0
- package/types/index.d.ts +20 -0
- package/types/list-view/index.d.ts +23 -0
- package/types/list-view/src/components/list-view-checkbox.component.d.ts +32 -0
- package/types/list-view/src/components/list-view-checkbox.props.d.ts +31 -0
- package/types/list-view/src/list-view.props.d.ts +44 -0
- package/types/message-box/index.d.ts +24 -0
- package/types/message-box/src/composition/types.d.ts +18 -0
- package/types/message-box/src/composition/use-copy.d.ts +18 -0
- package/types/message-box/src/message-box.component.d.ts +72 -0
- package/types/message-box/src/message-box.props.d.ts +52 -0
- package/types/modal/index.d.ts +23 -0
- package/types/modal/src/modal.component.d.ts +104 -0
- package/types/modal/src/modal.props.d.ts +72 -0
- package/types/notify/index.d.ts +26 -0
- package/types/notify/src/components/toast.component.d.ts +21 -0
- package/types/notify/src/components/toast.props.d.ts +27 -0
- package/types/notify/src/notify.props.d.ts +99 -0
- package/types/number-range/index.d.ts +23 -0
- package/types/number-range/src/composition/types.d.ts +52 -0
- package/types/number-range/src/composition/use-data.d.ts +19 -0
- package/types/number-range/src/composition/use-util.d.ts +19 -0
- package/types/number-range/src/number-range.component.d.ts +247 -0
- package/types/number-range/src/number-range.props.d.ts +216 -0
- package/types/number-spinner/index.d.ts +23 -0
- package/types/number-spinner/src/composition/types.d.ts +52 -0
- package/types/number-spinner/src/composition/use-data.d.ts +19 -0
- package/types/number-spinner/src/composition/use-util.d.ts +19 -0
- package/types/number-spinner/src/number-spinner.component.d.ts +202 -0
- package/types/number-spinner/src/number-spinner.props.d.ts +181 -0
- package/types/overlay/src/overlay.component.d.ts +20 -0
- package/types/overlay/src/overlay.props.d.ts +26 -0
- package/types/pagination/index.d.ts +23 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +19 -0
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +20 -0
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +20 -0
- package/types/pagination/src/components/pages/page-info.component.d.ts +19 -0
- package/types/pagination/src/components/pages/page-list.component.d.ts +19 -0
- package/types/pagination/src/components/pages/page-number.component.d.ts +20 -0
- package/types/pagination/src/composition/types.d.ts +24 -0
- package/types/pagination/src/composition/use-pages.d.ts +18 -0
- package/types/pagination/src/pagination.components.d.ts +41 -0
- package/types/pagination/src/pagination.props.d.ts +36 -0
- package/types/popover/index.d.ts +24 -0
- package/types/popover/src/popover.component.d.ts +26 -0
- package/types/popover/src/popover.directive.d.ts +5 -0
- package/types/popover/src/popover.props.d.ts +30 -0
- package/types/radio-group/index.d.ts +23 -0
- package/types/radio-group/src/composition/change-radio.d.ts +19 -0
- package/types/radio-group/src/composition/types.d.ts +42 -0
- package/types/radio-group/src/radio-group.component.d.ts +91 -0
- package/types/radio-group/src/radio-group.props.d.ts +87 -0
- package/types/section/index.d.ts +23 -0
- package/types/section/src/section.component.d.ts +187 -0
- package/types/section/src/section.props.d.ts +117 -0
- package/types/switch/index.d.ts +23 -0
- package/types/switch/src/switch.component.d.ts +66 -0
- package/types/switch/src/switch.props.d.ts +52 -0
- package/types/tabs/index.d.ts +25 -0
- package/types/tabs/src/components/tab-page.component.d.ts +101 -0
- package/types/tabs/src/components/tab-page.props.d.ts +63 -0
- package/types/tabs/src/composition/types.d.ts +35 -0
- package/types/tabs/src/composition/use-tabs.d.ts +18 -0
- package/types/tabs/src/tabs.component.d.ts +149 -0
- package/types/tabs/src/tabs.props.d.ts +86 -0
- package/types/text/index.d.ts +23 -0
- package/types/text/src/text.component.d.ts +14 -0
- package/types/text/src/text.props.d.ts +26 -0
- package/types/tooltip/index.d.ts +24 -0
- package/types/tooltip/src/composition/types.d.ts +45 -0
- package/types/tooltip/src/composition/use-adjust-placement.d.ts +20 -0
- package/types/tooltip/src/composition/use-adjust-position.d.ts +6 -0
- package/types/tooltip/src/composition/use-calculate-position.d.ts +21 -0
- package/types/tooltip/src/composition/use-relative.d.ts +19 -0
- package/types/tooltip/src/composition/use-tooltip-position.d.ts +22 -0
- package/types/tooltip/src/tooltip.component.d.ts +56 -0
- package/types/tooltip/src/tooltip.props.d.ts +45 -0
- package/src/index.umd.js +0 -1
- /package/{src/style.css → style.css} +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { ref as v, computed as T, defineComponent as L, onMounted as M, createVNode as P, reactive as O, createApp as z, onUnmounted as V, mergeProps as k } from "vue";
|
|
2
|
+
const C = {
|
|
3
|
+
content: { type: String },
|
|
4
|
+
width: { type: Number },
|
|
5
|
+
customClass: { type: String },
|
|
6
|
+
placement: { type: String, default: "top" },
|
|
7
|
+
reference: { type: Object, require: !0 },
|
|
8
|
+
horizontalRelative: { type: String, defatul: "" },
|
|
9
|
+
verticalRelative: { type: String, defatul: "" }
|
|
10
|
+
};
|
|
11
|
+
function R(i, m) {
|
|
12
|
+
const p = /* @__PURE__ */ new Map([
|
|
13
|
+
["top", "bottom"],
|
|
14
|
+
["bottom", "top"],
|
|
15
|
+
["left", "right"],
|
|
16
|
+
["right", "left"]
|
|
17
|
+
]), l = /* @__PURE__ */ new Map([
|
|
18
|
+
["top", "height"],
|
|
19
|
+
["bottom", "height"],
|
|
20
|
+
["left", "width"],
|
|
21
|
+
["right", "width"]
|
|
22
|
+
]);
|
|
23
|
+
function f(t, o) {
|
|
24
|
+
const c = p.get(o) || o;
|
|
25
|
+
return t.replace(o, c);
|
|
26
|
+
}
|
|
27
|
+
function s(t, o, c, e, a) {
|
|
28
|
+
let u = t;
|
|
29
|
+
const n = t.split("-")[0], r = l.get(n), d = e[r] + a[r];
|
|
30
|
+
return Math.abs(c[n] - o[n]) < d && (u = f(t, n)), u;
|
|
31
|
+
}
|
|
32
|
+
return { adjustPlacement: s };
|
|
33
|
+
}
|
|
34
|
+
function $(i, m) {
|
|
35
|
+
function l(s, t, o) {
|
|
36
|
+
let c = !1, e = o;
|
|
37
|
+
return (t === "left" || t === "top") && o <= s[t] && (c = !0, e = s[t] + 6), (t === "right" || t === "bottom") && o >= s[t] && (c = !0, e = s[t] - 6), { overBound: c, fixedValue: e };
|
|
38
|
+
}
|
|
39
|
+
function f(s, t, o, c, e, a, u) {
|
|
40
|
+
let n = t.tooltip.left, r = t.tooltip.top, d = t.arrow.left, g = t.arrow.top;
|
|
41
|
+
const b = s.split("-")[0];
|
|
42
|
+
if (["top", "bottom"].includes(b)) {
|
|
43
|
+
const A = l(o, "left", t.tooltip.left), j = l(o, "right", t.tooltip.left + e.width);
|
|
44
|
+
n = A.overBound ? A.fixedValue : j.overBound ? j.fixedValue - e.width : t.tooltip.left, d = A.overBound ? e.width - (n + e.width - c.right) - u.width : j.overBound ? c.left - n : t.arrow.left;
|
|
45
|
+
}
|
|
46
|
+
const x = l(o, "top", t.tooltip.top), h = l(o, "bottom", t.tooltip.top + e.height);
|
|
47
|
+
return r = x.overBound ? x.fixedValue : h.overBound ? h.fixedValue - e.height : t.tooltip.top, g = x.overBound ? t.arrow.top : h.overBound ? e.height - (r + e.height - c.top) : t.arrow.top, { arrow: { left: d, top: g }, tooltip: { left: n, top: r } };
|
|
48
|
+
}
|
|
49
|
+
return { adjustPosition: f };
|
|
50
|
+
}
|
|
51
|
+
function D(i, m) {
|
|
52
|
+
function l(t, o, c, e, a) {
|
|
53
|
+
const u = t.split("-"), n = u[0], r = u[1] || "middle", d = ["top", "bottom"].includes(n) ? r === "middle" ? (e.width - a.width) / 2 : r === "right" ? e.width - a.width - 6 : 6 : 0, g = ["left", "right"].includes(n) ? r === "middle" ? (e.height - a.height) / 2 : r === "bottom" ? e.height - a.height - 6 : 6 : 0, y = n === "left" ? e.width + a.width : 0, b = n === "top" ? e.height + a.height : 0;
|
|
54
|
+
return { left: y + d, top: b + g, right: 0 };
|
|
55
|
+
}
|
|
56
|
+
function f(t, o, c, e, a) {
|
|
57
|
+
const u = t.split("-"), n = u[0], r = u[1] || "middle", d = (c.width - e.width) / 2, g = (c.height - e.height) / 2, y = n === "right" ? o.right : o.left, b = n === "bottom" ? o.bottom : o.top, x = n === "top" ? 0 - g - e.height - a.height : n === "bottom" ? 0 - g + a.height : 0, h = ["left", "right"].includes(n) ? r === "middle" ? (o.height - e.height) / 2 : r === "bottom" ? o.height - e.height : 0 : 0, w = n === "left" ? 0 - d - e.width - a.width : n === "right" ? 0 - d + a.width : 0, E = ["top", "bottom"].includes(n) ? r === "middle" ? (o.width - e.width) / 2 : r === "right" ? o.width - e.width : 0 : 0, A = b + x + h;
|
|
58
|
+
return { left: y + w + E, top: A };
|
|
59
|
+
}
|
|
60
|
+
function s(t, o, c, e, a) {
|
|
61
|
+
const u = f(t, o, c, e, a);
|
|
62
|
+
return { arrow: l(t, o, c, e, a), tooltip: u };
|
|
63
|
+
}
|
|
64
|
+
return { calculate: s };
|
|
65
|
+
}
|
|
66
|
+
function H(i, m) {
|
|
67
|
+
const p = v(i.horizontalRelative), l = v(i.verticalRelative);
|
|
68
|
+
function f(t) {
|
|
69
|
+
return typeof t == "string" ? document.querySelector(t) : t;
|
|
70
|
+
}
|
|
71
|
+
function s() {
|
|
72
|
+
let t = document.documentElement.clientWidth, o = document.documentElement.clientHeight, c = 0, e = 0, a = 0, u = 0, n = o - c, r = t - e;
|
|
73
|
+
return p.value && ({ left: e, right: t, x: a, width: r } = f(p.value).getBoundingClientRect()), l.value && ({ bottom: o, top: c, y: u, height: n } = f(l.value).getBoundingClientRect()), { top: c, left: e, right: t, bottom: o, height: n, width: r, x: a, y: u };
|
|
74
|
+
}
|
|
75
|
+
return { getRelativeElementBound: s };
|
|
76
|
+
}
|
|
77
|
+
function G(i, m, p, l, f, s) {
|
|
78
|
+
const t = v(i.placement), { getRelativeElementBound: o } = H(i), { calculate: c } = D(), { adjustPlacement: e } = R(), { adjustPosition: a } = $(), u = T(() => t.value.split("-")[0]), n = T(() => {
|
|
79
|
+
const r = o();
|
|
80
|
+
t.value = e(t.value, r, p, l, s);
|
|
81
|
+
const d = c(t.value, p, l, f, s);
|
|
82
|
+
return a(
|
|
83
|
+
t.value,
|
|
84
|
+
d,
|
|
85
|
+
r,
|
|
86
|
+
p,
|
|
87
|
+
l,
|
|
88
|
+
f,
|
|
89
|
+
s
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
return { tooltipPlacement: u, tooltipPosition: n };
|
|
93
|
+
}
|
|
94
|
+
const S = L({
|
|
95
|
+
name: "FTooltip",
|
|
96
|
+
props: C,
|
|
97
|
+
emits: ["click"],
|
|
98
|
+
setup(i, m) {
|
|
99
|
+
const p = v(!0), l = v(), f = v(), s = v(), t = v(i.placement.split("-")[0]), o = T(() => {
|
|
100
|
+
const h = {
|
|
101
|
+
tooltip: !0,
|
|
102
|
+
show: !0
|
|
103
|
+
}, w = `bs-tooltip-${t.value}`;
|
|
104
|
+
return h[w] = !0, h;
|
|
105
|
+
}), {
|
|
106
|
+
scrollLeft: c,
|
|
107
|
+
scrollTop: e
|
|
108
|
+
} = document.documentElement, a = T(() => p.value), u = T(() => i.content), n = v("0px"), r = v("0px");
|
|
109
|
+
v("");
|
|
110
|
+
const d = T(() => ({
|
|
111
|
+
left: n.value,
|
|
112
|
+
top: r.value
|
|
113
|
+
})), g = v(""), y = v(""), b = T(() => ({
|
|
114
|
+
left: g.value,
|
|
115
|
+
top: y.value
|
|
116
|
+
}));
|
|
117
|
+
M(() => {
|
|
118
|
+
if (l.value && f.value && s.value && i.reference) {
|
|
119
|
+
const {
|
|
120
|
+
tooltipPlacement: h,
|
|
121
|
+
tooltipPosition: w
|
|
122
|
+
} = G(i, m, i.reference.getBoundingClientRect(), f.value.getBoundingClientRect(), s.value.getBoundingClientRect(), l.value.getBoundingClientRect());
|
|
123
|
+
n.value = `${w.value.tooltip.left + c}px`, r.value = `${w.value.tooltip.top + e}px`, g.value = `${w.value.arrow.left}px`, y.value = `${w.value.arrow.top}px`, t.value = h.value;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
function x(h) {
|
|
127
|
+
m.emit("click", h);
|
|
128
|
+
}
|
|
129
|
+
return () => P("div", {
|
|
130
|
+
ref: f,
|
|
131
|
+
class: o.value,
|
|
132
|
+
style: d.value,
|
|
133
|
+
onClick: x
|
|
134
|
+
}, [P("div", {
|
|
135
|
+
ref: l,
|
|
136
|
+
class: "arrow",
|
|
137
|
+
style: b.value
|
|
138
|
+
}, null), P("div", {
|
|
139
|
+
ref: s,
|
|
140
|
+
class: "tooltip-inner"
|
|
141
|
+
}, [P("div", {
|
|
142
|
+
class: "tooltip-tmpl"
|
|
143
|
+
}, [a.value && P("div", {
|
|
144
|
+
class: "tooltip-text",
|
|
145
|
+
innerHTML: u.value
|
|
146
|
+
}, null)])])]);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
function N(i, m) {
|
|
150
|
+
const p = document.createElement("div"), l = z({
|
|
151
|
+
setup() {
|
|
152
|
+
return V(() => {
|
|
153
|
+
document.body.removeChild(p);
|
|
154
|
+
}), () => P(S, k(i, {
|
|
155
|
+
onClick: l.unmount
|
|
156
|
+
}), null);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
return document.body.appendChild(p), l.mount(p), l;
|
|
160
|
+
}
|
|
161
|
+
function X(i) {
|
|
162
|
+
const m = O({
|
|
163
|
+
...i
|
|
164
|
+
});
|
|
165
|
+
return N(m);
|
|
166
|
+
}
|
|
167
|
+
const Y = {
|
|
168
|
+
mounted: (i, m, p) => {
|
|
169
|
+
let l;
|
|
170
|
+
const f = Object.assign({
|
|
171
|
+
content: "This is a tooltip",
|
|
172
|
+
width: 100,
|
|
173
|
+
customClass: "",
|
|
174
|
+
placement: "top",
|
|
175
|
+
reference: i
|
|
176
|
+
}, m.value);
|
|
177
|
+
i.addEventListener("mouseenter", (s) => {
|
|
178
|
+
s.stopPropagation(), l || (l = X(f));
|
|
179
|
+
}), i.addEventListener("mouseleave", (s) => {
|
|
180
|
+
s.stopPropagation(), l && (l.unmount(), l = null);
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
unMounted: (i, m, p) => {
|
|
184
|
+
}
|
|
185
|
+
}, I = {
|
|
186
|
+
install(i) {
|
|
187
|
+
i.component(S.name, S), i.directive("tooltip", Y);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
export {
|
|
191
|
+
S as Tooltip,
|
|
192
|
+
Y as TooltipDirective,
|
|
193
|
+
I as default,
|
|
194
|
+
C as tooltipProps
|
|
195
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(w,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(w=typeof globalThis<"u"?globalThis:w||self,o(w.tooltip={},w.Vue))})(this,function(w,o){"use strict";const S={content:{type:String},width:{type:Number},customClass:{type:String},placement:{type:String,default:"top"},reference:{type:Object,require:!0},horizontalRelative:{type:String,defatul:""},verticalRelative:{type:String,defatul:""}},$="";function O(c,g){const f=new Map([["top","bottom"],["bottom","top"],["left","right"],["right","left"]]),l=new Map([["top","height"],["bottom","height"],["left","width"],["right","width"]]);function d(t,n){const r=f.get(n)||n;return t.replace(n,r)}function a(t,n,r,e,u){let p=t;const i=t.split("-")[0],s=l.get(i),h=e[s]+u[s];return Math.abs(r[i]-n[i])<h&&(p=d(t,i)),p}return{adjustPlacement:a}}function E(c,g){function l(a,t,n){let r=!1,e=n;return(t==="left"||t==="top")&&n<=a[t]&&(r=!0,e=a[t]+6),(t==="right"||t==="bottom")&&n>=a[t]&&(r=!0,e=a[t]-6),{overBound:r,fixedValue:e}}function d(a,t,n,r,e,u,p){let i=t.tooltip.left,s=t.tooltip.top,h=t.arrow.left,v=t.arrow.top;const x=a.split("-")[0];if(["top","bottom"].includes(x)){const P=l(n,"left",t.tooltip.left),A=l(n,"right",t.tooltip.left+e.width);i=P.overBound?P.fixedValue:A.overBound?A.fixedValue-e.width:t.tooltip.left,h=P.overBound?e.width-(i+e.width-r.right)-p.width:A.overBound?r.left-i:t.arrow.left}const T=l(n,"top",t.tooltip.top),m=l(n,"bottom",t.tooltip.top+e.height);return s=T.overBound?T.fixedValue:m.overBound?m.fixedValue-e.height:t.tooltip.top,v=T.overBound?t.arrow.top:m.overBound?e.height-(s+e.height-r.top):t.arrow.top,{arrow:{left:h,top:v},tooltip:{left:i,top:s}}}return{adjustPosition:d}}function L(c,g){function l(t,n,r,e,u){const p=t.split("-"),i=p[0],s=p[1]||"middle",h=["top","bottom"].includes(i)?s==="middle"?(e.width-u.width)/2:s==="right"?e.width-u.width-6:6:0,v=["left","right"].includes(i)?s==="middle"?(e.height-u.height)/2:s==="bottom"?e.height-u.height-6:6:0,b=i==="left"?e.width+u.width:0,x=i==="top"?e.height+u.height:0;return{left:b+h,top:x+v,right:0}}function d(t,n,r,e,u){const p=t.split("-"),i=p[0],s=p[1]||"middle",h=(r.width-e.width)/2,v=(r.height-e.height)/2,b=i==="right"?n.right:n.left,x=i==="bottom"?n.bottom:n.top,T=i==="top"?0-v-e.height-u.height:i==="bottom"?0-v+u.height:0,m=["left","right"].includes(i)?s==="middle"?(n.height-e.height)/2:s==="bottom"?n.height-e.height:0:0,y=i==="left"?0-h-e.width-u.width:i==="right"?0-h+u.width:0,M=["top","bottom"].includes(i)?s==="middle"?(n.width-e.width)/2:s==="right"?n.width-e.width:0:0,P=x+T+m;return{left:b+y+M,top:P}}function a(t,n,r,e,u){const p=d(t,n,r,e,u);return{arrow:l(t,n,r,e,u),tooltip:p}}return{calculate:a}}function z(c,g){const f=o.ref(c.horizontalRelative),l=o.ref(c.verticalRelative);function d(t){return typeof t=="string"?document.querySelector(t):t}function a(){let t=document.documentElement.clientWidth,n=document.documentElement.clientHeight,r=0,e=0,u=0,p=0,i=n-r,s=t-e;return f.value&&({left:e,right:t,x:u,width:s}=d(f.value).getBoundingClientRect()),l.value&&({bottom:n,top:r,y:p,height:i}=d(l.value).getBoundingClientRect()),{top:r,left:e,right:t,bottom:n,height:i,width:s,x:u,y:p}}return{getRelativeElementBound:a}}function N(c,g,f,l,d,a){const t=o.ref(c.placement),{getRelativeElementBound:n}=z(c),{calculate:r}=L(),{adjustPlacement:e}=O(),{adjustPosition:u}=E(),p=o.computed(()=>t.value.split("-")[0]),i=o.computed(()=>{const s=n();t.value=e(t.value,s,f,l,a);const h=r(t.value,f,l,d,a);return u(t.value,h,s,f,l,d,a)});return{tooltipPlacement:p,tooltipPosition:i}}const j=o.defineComponent({name:"FTooltip",props:S,emits:["click"],setup(c,g){const f=o.ref(!0),l=o.ref(),d=o.ref(),a=o.ref(),t=o.ref(c.placement.split("-")[0]),n=o.computed(()=>{const m={tooltip:!0,show:!0},y=`bs-tooltip-${t.value}`;return m[y]=!0,m}),{scrollLeft:r,scrollTop:e}=document.documentElement,u=o.computed(()=>f.value),p=o.computed(()=>c.content),i=o.ref("0px"),s=o.ref("0px");o.ref("");const h=o.computed(()=>({left:i.value,top:s.value})),v=o.ref(""),b=o.ref(""),x=o.computed(()=>({left:v.value,top:b.value}));o.onMounted(()=>{if(l.value&&d.value&&a.value&&c.reference){const{tooltipPlacement:m,tooltipPosition:y}=N(c,g,c.reference.getBoundingClientRect(),d.value.getBoundingClientRect(),a.value.getBoundingClientRect(),l.value.getBoundingClientRect());i.value=`${y.value.tooltip.left+r}px`,s.value=`${y.value.tooltip.top+e}px`,v.value=`${y.value.arrow.left}px`,b.value=`${y.value.arrow.top}px`,t.value=m.value}});function T(m){g.emit("click",m)}return()=>o.createVNode("div",{ref:d,class:n.value,style:h.value,onClick:T},[o.createVNode("div",{ref:l,class:"arrow",style:x.value},null),o.createVNode("div",{ref:a,class:"tooltip-inner"},[o.createVNode("div",{class:"tooltip-tmpl"},[u.value&&o.createVNode("div",{class:"tooltip-text",innerHTML:p.value},null)])])])}});function k(c,g){const f=document.createElement("div"),l=o.createApp({setup(){return o.onUnmounted(()=>{document.body.removeChild(f)}),()=>o.createVNode(j,o.mergeProps(c,{onClick:l.unmount}),null)}});return document.body.appendChild(f),l.mount(f),l}function C(c){const g=o.reactive({...c});return k(g)}const V={mounted:(c,g,f)=>{let l;const d=Object.assign({content:"This is a tooltip",width:100,customClass:"",placement:"top",reference:c},g.value);c.addEventListener("mouseenter",a=>{a.stopPropagation(),l||(l=C(d))}),c.addEventListener("mouseleave",a=>{a.stopPropagation(),l&&(l.unmount(),l=null)})},unMounted:(c,g,f)=>{}},R={install(c){c.component(j.name,j),c.directive("tooltip",V)}};w.Tooltip=j,w.TooltipDirective=V,w.default=R,w.tooltipProps=S,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.f-tooltip-bottom .arrow,.f-tooltip-top .arrow{left:50%}.f-tooltip-left .arrow,.f-tooltip-right .arrow{top:25%}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { App } from 'vue';
|
|
17
|
+
import Accordion from './src/accordion.component';
|
|
18
|
+
import AccordionItem from './src/components/accordion-item.component';
|
|
19
|
+
export * from './src/accordion.props';
|
|
20
|
+
export * from './src/components/accordion-item.props';
|
|
21
|
+
export { Accordion, AccordionItem };
|
|
22
|
+
declare const _default: {
|
|
23
|
+
install(app: App): void;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
customClass: {
|
|
3
|
+
type: {
|
|
4
|
+
(arrayLength: number): string[];
|
|
5
|
+
(...items: string[]): string[];
|
|
6
|
+
new (arrayLength: number): string[];
|
|
7
|
+
new (...items: string[]): string[];
|
|
8
|
+
isArray(arg: any): arg is any[];
|
|
9
|
+
readonly prototype: any[];
|
|
10
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
11
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
12
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
13
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
14
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
15
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
16
|
+
};
|
|
17
|
+
default: never[];
|
|
18
|
+
};
|
|
19
|
+
height: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
};
|
|
22
|
+
width: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
};
|
|
25
|
+
enableFold: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
expanded: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
customClass: {
|
|
35
|
+
type: {
|
|
36
|
+
(arrayLength: number): string[];
|
|
37
|
+
(...items: string[]): string[];
|
|
38
|
+
new (arrayLength: number): string[];
|
|
39
|
+
new (...items: string[]): string[];
|
|
40
|
+
isArray(arg: any): arg is any[];
|
|
41
|
+
readonly prototype: any[];
|
|
42
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
43
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
44
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
45
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
46
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
47
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
48
|
+
};
|
|
49
|
+
default: never[];
|
|
50
|
+
};
|
|
51
|
+
height: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
};
|
|
54
|
+
width: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
};
|
|
57
|
+
enableFold: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
expanded: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
}>>, {
|
|
66
|
+
customClass: string[];
|
|
67
|
+
enableFold: boolean;
|
|
68
|
+
expanded: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ExtractPropTypes } from 'vue';
|
|
17
|
+
export declare const accordionProps: {
|
|
18
|
+
customClass: {
|
|
19
|
+
type: {
|
|
20
|
+
(arrayLength: number): string[];
|
|
21
|
+
(...items: string[]): string[];
|
|
22
|
+
new (arrayLength: number): string[];
|
|
23
|
+
new (...items: string[]): string[];
|
|
24
|
+
isArray(arg: any): arg is any[];
|
|
25
|
+
readonly prototype: any[];
|
|
26
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
27
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
28
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
29
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
30
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
31
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
32
|
+
};
|
|
33
|
+
default: never[];
|
|
34
|
+
};
|
|
35
|
+
height: {
|
|
36
|
+
type: NumberConstructor;
|
|
37
|
+
};
|
|
38
|
+
width: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
};
|
|
41
|
+
enableFold: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
expanded: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type AccordionProps = ExtractPropTypes<typeof accordionProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
width: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
};
|
|
5
|
+
height: {
|
|
6
|
+
type: NumberConstructor;
|
|
7
|
+
default: number;
|
|
8
|
+
};
|
|
9
|
+
title: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
disable: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
width: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
};
|
|
21
|
+
height: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
title: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
disable: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
}>>, {
|
|
34
|
+
height: number;
|
|
35
|
+
title: string;
|
|
36
|
+
disable: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ExtractPropTypes } from 'vue';
|
|
17
|
+
export declare const accordionItemProps: {
|
|
18
|
+
width: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
};
|
|
21
|
+
height: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
title: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
disable: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type AccordionItemProps = ExtractPropTypes<typeof accordionItemProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { App } from 'vue';
|
|
17
|
+
import Avatar from './src/avatar.component';
|
|
18
|
+
export * from './src/avatar.props';
|
|
19
|
+
export { Avatar };
|
|
20
|
+
declare const _default: {
|
|
21
|
+
install(app: App): void;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
avatarWidth: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
avatarHeight: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
cover: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
readonly: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
shape: {
|
|
18
|
+
type: import("vue").PropType<"circle" | "square">;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
maxSize: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
tile: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
type: {
|
|
34
|
+
type: {
|
|
35
|
+
(arrayLength: number): string[];
|
|
36
|
+
(...items: string[]): string[];
|
|
37
|
+
new (arrayLength: number): string[];
|
|
38
|
+
new (...items: string[]): string[];
|
|
39
|
+
isArray(arg: any): arg is any[];
|
|
40
|
+
readonly prototype: any[];
|
|
41
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
42
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
43
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
44
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
45
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
46
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
47
|
+
};
|
|
48
|
+
default: never[];
|
|
49
|
+
};
|
|
50
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
avatarWidth: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
avatarHeight: {
|
|
56
|
+
type: NumberConstructor;
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
59
|
+
cover: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
};
|
|
62
|
+
readonly: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
shape: {
|
|
67
|
+
type: import("vue").PropType<"circle" | "square">;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
maxSize: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
default: number;
|
|
73
|
+
};
|
|
74
|
+
modelValue: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
tile: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
type: {
|
|
83
|
+
type: {
|
|
84
|
+
(arrayLength: number): string[];
|
|
85
|
+
(...items: string[]): string[];
|
|
86
|
+
new (arrayLength: number): string[];
|
|
87
|
+
new (...items: string[]): string[];
|
|
88
|
+
isArray(arg: any): arg is any[];
|
|
89
|
+
readonly prototype: any[];
|
|
90
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
91
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
92
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
93
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
94
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
95
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
96
|
+
};
|
|
97
|
+
default: never[];
|
|
98
|
+
};
|
|
99
|
+
}>>, {
|
|
100
|
+
type: string[];
|
|
101
|
+
avatarWidth: number;
|
|
102
|
+
avatarHeight: number;
|
|
103
|
+
readonly: boolean;
|
|
104
|
+
shape: "circle" | "square";
|
|
105
|
+
maxSize: number;
|
|
106
|
+
modelValue: string;
|
|
107
|
+
tile: string;
|
|
108
|
+
}>;
|
|
109
|
+
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
17
|
+
type AvatarShap = 'square' | 'circle';
|
|
18
|
+
export declare const avatarProps: {
|
|
19
|
+
/**
|
|
20
|
+
* 头像宽度
|
|
21
|
+
*/
|
|
22
|
+
avatarWidth: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 头像高度
|
|
28
|
+
*/
|
|
29
|
+
avatarHeight: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 组件标识
|
|
35
|
+
*/
|
|
36
|
+
cover: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* 只读
|
|
41
|
+
*/
|
|
42
|
+
readonly: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* 头像形状
|
|
48
|
+
*/
|
|
49
|
+
shape: {
|
|
50
|
+
type: PropType<AvatarShap>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* 头像最大尺寸, 单位MB
|
|
55
|
+
*/
|
|
56
|
+
maxSize: {
|
|
57
|
+
type: NumberConstructor;
|
|
58
|
+
default: number;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* 组件值
|
|
62
|
+
*/
|
|
63
|
+
modelValue: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 头像标题
|
|
69
|
+
*/
|
|
70
|
+
tile: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 支持的头像类型
|
|
76
|
+
*/
|
|
77
|
+
type: {
|
|
78
|
+
type: {
|
|
79
|
+
(arrayLength: number): string[];
|
|
80
|
+
(...items: string[]): string[];
|
|
81
|
+
new (arrayLength: number): string[];
|
|
82
|
+
new (...items: string[]): string[];
|
|
83
|
+
isArray(arg: any): arg is any[];
|
|
84
|
+
readonly prototype: any[];
|
|
85
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
86
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
87
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
88
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
89
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
90
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
91
|
+
};
|
|
92
|
+
default: never[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export type AvatarProps = ExtractPropTypes<typeof avatarProps>;
|
|
96
|
+
export {};
|