@matechat/core 1.13.0-alpha.0 → 1.13.0-alpha.1
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/Layout/icon/arrow-down.vue.d.ts +3 -0
- package/Layout/icon/arrow-up.vue.d.ts +3 -0
- package/Layout/index.css +1 -1
- package/Layout/index.js +136 -98
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
package/Layout/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-layout-content-container[data-v-
|
|
1
|
+
.mc-layout-content-container[data-v-9c27afee]{position:relative;flex:auto;display:flex;flex-direction:column;min-height:0;margin-right:-20px}.mc-layout-content-container .mc-layout-content-scroller[data-v-9c27afee]{flex:1;overflow:auto;padding-right:8px;scrollbar-width:thin;scrollbar-gutter:stable}.mc-layout-content-container .mc-layout-content-arrow[data-v-9c27afee]{position:absolute;left:50%;transform:translate(-50%);z-index:9;display:flex;justify-content:center;align-items:center;width:32px;height:32px;cursor:pointer}.mc-layout-content-container .mc-layout-content-arrow.up[data-v-9c27afee]{top:20px}.mc-layout-content-container .mc-layout-content-arrow.down[data-v-9c27afee]{bottom:20px}.mc-layout-content-container .mc-layout-content-arrow:hover>div[data-v-9c27afee]{transform:scale(1.3);box-shadow:var(--devui-shadow-length-connected-overlay, 0 2px 12px 0) var(--devui-shadow, rgba(37, 43, 58, .24))}.mc-layout-content-container .mc-layout-content-arrow div[data-v-9c27afee]{display:flex;justify-content:center;align-items:center;width:24px;height:24px;background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-full, 100px);box-shadow:var(--devui-box-shadow-length-base, 0 1px 6px 0) var(--devui-shadow, rgba(0, 0, 0, .16));transition:transform .3s var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)),box-shadow .3s var(--devui-animation-duration-base, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.mc-layout-header[data-v-05f64ad5]{flex:0 0 auto;min-height:40px}.mc-layout[data-v-f9e238c6]{display:flex;flex:auto;flex-direction:column}.mc-layout-aside[data-v-f9e238c6]{flex-direction:row}
|
package/Layout/index.js
CHANGED
|
@@ -1,83 +1,133 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
import { openBlock as r, createElementBlock as
|
|
2
|
+
import { openBlock as r, createElementBlock as s, renderSlot as i, createElementVNode as a, defineComponent as C, ref as f, onMounted as E, onUnmounted as T, Fragment as b, createVNode as H, createCommentVNode as p } from "vue";
|
|
3
3
|
import { debounce as R } from "lodash-es";
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
for (const [
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
},
|
|
10
|
-
function
|
|
11
|
-
return r(),
|
|
12
|
-
|
|
4
|
+
const l = (o, c) => {
|
|
5
|
+
const d = o.__vccOpts || o;
|
|
6
|
+
for (const [_, u] of c)
|
|
7
|
+
d[_] = u;
|
|
8
|
+
return d;
|
|
9
|
+
}, V = {}, I = { class: "mc-layout-aside" };
|
|
10
|
+
function z(o, c) {
|
|
11
|
+
return r(), s("div", I, [
|
|
12
|
+
i(o.$slots, "default")
|
|
13
13
|
]);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const N = /* @__PURE__ */ l(V, [["render", z]]), O = {}, U = {
|
|
16
|
+
t: "1773994085709",
|
|
17
|
+
class: "icon",
|
|
18
|
+
viewBox: "0 0 1024 1024",
|
|
19
|
+
version: "1.1",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
"p-id": "4044",
|
|
22
|
+
width: "16",
|
|
23
|
+
height: "16"
|
|
24
|
+
};
|
|
25
|
+
function D(o, c) {
|
|
26
|
+
return r(), s("svg", U, c[0] || (c[0] = [
|
|
27
|
+
a(
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
d: "M898.133333 512c-12.8-12.8-32-12.8-44.8-2.133333L544 800V149.333333c0-17.066667-14.933333-32-32-32s-32 14.933333-32 32v650.666667L170.666667 509.866667c-12.8-12.8-34.133333-10.666667-44.8 2.133333-12.8 12.8-10.666667 34.133333 2.133333 44.8l362.666667 341.333333c2.133333 2.133333 6.4 4.266667 8.533333 6.4 4.266667 2.133333 6.4 2.133333 10.666667 2.133334s8.533333 0 10.666666-2.133334c4.266667-2.133333 6.4-4.266667 8.533334-6.4l362.666666-341.333333c17.066667-12.8 19.2-32 6.4-44.8z",
|
|
31
|
+
fill: "#666666",
|
|
32
|
+
"p-id": "4045"
|
|
33
|
+
},
|
|
34
|
+
null,
|
|
35
|
+
-1
|
|
36
|
+
/* HOISTED */
|
|
37
|
+
)
|
|
38
|
+
]));
|
|
39
|
+
}
|
|
40
|
+
const W = /* @__PURE__ */ l(O, [["render", D]]), F = {}, P = {
|
|
41
|
+
t: "1773991901622",
|
|
42
|
+
class: "icon",
|
|
43
|
+
viewBox: "0 0 1024 1024",
|
|
44
|
+
version: "1.1",
|
|
45
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
46
|
+
"p-id": "3858",
|
|
47
|
+
width: "16",
|
|
48
|
+
height: "16"
|
|
49
|
+
};
|
|
50
|
+
function Y(o, c) {
|
|
51
|
+
return r(), s("svg", P, c[0] || (c[0] = [
|
|
52
|
+
a(
|
|
53
|
+
"path",
|
|
54
|
+
{
|
|
55
|
+
d: "M896 467.2l-362.666667-341.333333c-2.133333-2.133333-6.4-4.266667-8.533333-6.4-4.266667-2.133333-6.4-2.133333-10.666667-2.133334s-8.533333 0-10.666666 2.133334c-4.266667 2.133333-6.4 4.266667-8.533334 6.4l-362.666666 341.333333c-12.8 12.8-12.8 32-2.133334 44.8 12.8 12.8 32 12.8 44.8 2.133333l309.333334-290.133333V874.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V224L853.333333 514.133333c6.4 6.4 14.933333 8.533333 21.333334 8.533334 8.533333 0 17.066667-4.266667 23.466666-10.666667 12.8-12.8 10.666667-32-2.133333-44.8z",
|
|
56
|
+
fill: "#666666",
|
|
57
|
+
"p-id": "3859"
|
|
58
|
+
},
|
|
59
|
+
null,
|
|
60
|
+
-1
|
|
61
|
+
/* HOISTED */
|
|
62
|
+
)
|
|
63
|
+
]));
|
|
64
|
+
}
|
|
65
|
+
const j = /* @__PURE__ */ l(F, [["render", Y]]), q = { class: "mc-layout-content-container" }, G = /* @__PURE__ */ C({
|
|
16
66
|
__name: "Content",
|
|
17
67
|
props: {
|
|
18
68
|
autoScroll: { type: Boolean, default: !0 },
|
|
19
69
|
showScrollArrow: { type: Boolean, default: !0 }
|
|
20
70
|
},
|
|
21
71
|
emits: ["onScrollerWheel", "onScrollerScroll"],
|
|
22
|
-
setup(o, { expose:
|
|
23
|
-
const
|
|
24
|
-
|
|
72
|
+
setup(o, { expose: c, emit: d }) {
|
|
73
|
+
const _ = o, u = d, t = f(), w = f(), y = f(!1), $ = f(!1), L = new ResizeObserver(() => {
|
|
74
|
+
M();
|
|
25
75
|
});
|
|
26
|
-
let
|
|
27
|
-
const
|
|
28
|
-
|
|
76
|
+
let g = !1;
|
|
77
|
+
const v = (e) => {
|
|
78
|
+
t.value && t.value.scrollTo({ top: e, behavior: "smooth" });
|
|
29
79
|
}, m = () => {
|
|
30
80
|
var e;
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
81
|
+
v(((e = t.value) == null ? void 0 : e.scrollHeight) || 0);
|
|
82
|
+
}, S = () => {
|
|
83
|
+
v(0);
|
|
84
|
+
}, M = (e = !1) => {
|
|
85
|
+
_.autoScroll && (g && !e || m());
|
|
36
86
|
}, k = (e) => {
|
|
37
|
-
if (!
|
|
87
|
+
if (!t.value)
|
|
38
88
|
return;
|
|
39
|
-
const
|
|
40
|
-
|
|
89
|
+
const n = Math.abs(
|
|
90
|
+
t.value.scrollTop + t.value.clientHeight - t.value.scrollHeight
|
|
41
91
|
) < 32;
|
|
42
|
-
e.deltaY !== 0 && (
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
}, 100),
|
|
47
|
-
var e,
|
|
48
|
-
(e =
|
|
49
|
-
},
|
|
50
|
-
var e,
|
|
51
|
-
(e =
|
|
92
|
+
e.deltaY !== 0 && (g = !n), u("onScrollerWheel", e);
|
|
93
|
+
}, h = R((e) => {
|
|
94
|
+
const n = e.target;
|
|
95
|
+
n && (y.value = n.scrollTop !== 0, $.value = n.scrollTop + n.clientHeight + 32 < n.scrollHeight, u("onScrollerScroll", e));
|
|
96
|
+
}, 100), A = () => {
|
|
97
|
+
var e, n;
|
|
98
|
+
(e = t.value) == null || e.addEventListener("scroll", h), (n = t.value) == null || n.addEventListener("wheel", k);
|
|
99
|
+
}, B = () => {
|
|
100
|
+
var e, n;
|
|
101
|
+
(e = t.value) == null || e.removeEventListener("scroll", h), (n = t.value) == null || n.removeEventListener("wheel", k);
|
|
52
102
|
};
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
}),
|
|
56
|
-
|
|
57
|
-
}),
|
|
58
|
-
scrollerRef:
|
|
59
|
-
updateScroll:
|
|
60
|
-
scrollToPosition:
|
|
103
|
+
return E(() => {
|
|
104
|
+
L.observe(w.value), A(), h({ target: t.value });
|
|
105
|
+
}), T(() => {
|
|
106
|
+
L.disconnect(), B();
|
|
107
|
+
}), c({
|
|
108
|
+
scrollerRef: t,
|
|
109
|
+
updateScroll: M,
|
|
110
|
+
scrollToPosition: v,
|
|
61
111
|
scrollToBottom: m,
|
|
62
|
-
scrollToTop:
|
|
63
|
-
}), (e,
|
|
64
|
-
|
|
112
|
+
scrollToTop: S
|
|
113
|
+
}), (e, n) => (r(), s("div", q, [
|
|
114
|
+
a(
|
|
65
115
|
"div",
|
|
66
116
|
{
|
|
67
117
|
ref_key: "scrollerRef",
|
|
68
|
-
ref:
|
|
118
|
+
ref: t,
|
|
69
119
|
class: "mc-layout-content-scroller"
|
|
70
120
|
},
|
|
71
121
|
[
|
|
72
|
-
|
|
122
|
+
a(
|
|
73
123
|
"div",
|
|
74
124
|
{
|
|
75
125
|
ref_key: "contentRef",
|
|
76
|
-
ref:
|
|
126
|
+
ref: w,
|
|
77
127
|
class: "mc-layout-content"
|
|
78
128
|
},
|
|
79
129
|
[
|
|
80
|
-
|
|
130
|
+
i(e.$slots, "default", {}, void 0, !0)
|
|
81
131
|
],
|
|
82
132
|
512
|
|
83
133
|
/* NEED_PATCH */
|
|
@@ -86,72 +136,60 @@ const z = /* @__PURE__ */ u(I, [["render", x]]), N = { class: "mc-layout-content
|
|
|
86
136
|
512
|
|
87
137
|
/* NEED_PATCH */
|
|
88
138
|
),
|
|
89
|
-
e.showScrollArrow ? (r(),
|
|
90
|
-
|
|
139
|
+
e.showScrollArrow ? (r(), s(
|
|
140
|
+
b,
|
|
91
141
|
{ key: 0 },
|
|
92
142
|
[
|
|
93
|
-
|
|
143
|
+
y.value ? (r(), s("div", {
|
|
94
144
|
key: 0,
|
|
95
145
|
class: "mc-layout-content-arrow up",
|
|
96
|
-
onClick:
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
],
|
|
104
|
-
-1
|
|
105
|
-
/* HOISTED */
|
|
106
|
-
)
|
|
107
|
-
]))) : h("v-if", !0),
|
|
108
|
-
L.value ? (r(), c("div", {
|
|
146
|
+
onClick: S
|
|
147
|
+
}, [
|
|
148
|
+
a("div", null, [
|
|
149
|
+
H(j)
|
|
150
|
+
])
|
|
151
|
+
])) : p("v-if", !0),
|
|
152
|
+
$.value ? (r(), s("div", {
|
|
109
153
|
key: 1,
|
|
110
154
|
class: "mc-layout-content-arrow down",
|
|
111
155
|
onClick: m
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
s("i", { class: "icon icon-arrow-down-l" })
|
|
118
|
-
],
|
|
119
|
-
-1
|
|
120
|
-
/* HOISTED */
|
|
121
|
-
)
|
|
122
|
-
]))) : h("v-if", !0)
|
|
156
|
+
}, [
|
|
157
|
+
a("div", null, [
|
|
158
|
+
H(W)
|
|
159
|
+
])
|
|
160
|
+
])) : p("v-if", !0)
|
|
123
161
|
],
|
|
124
162
|
64
|
|
125
163
|
/* STABLE_FRAGMENT */
|
|
126
|
-
)) :
|
|
164
|
+
)) : p("v-if", !0)
|
|
127
165
|
]));
|
|
128
166
|
}
|
|
129
|
-
}),
|
|
130
|
-
function
|
|
131
|
-
return r(),
|
|
132
|
-
|
|
167
|
+
}), J = /* @__PURE__ */ l(G, [["__scopeId", "data-v-9c27afee"]]), K = {}, Q = { class: "mc-layout-header" };
|
|
168
|
+
function X(o, c) {
|
|
169
|
+
return r(), s("div", Q, [
|
|
170
|
+
i(o.$slots, "default", {}, void 0, !0)
|
|
133
171
|
]);
|
|
134
172
|
}
|
|
135
|
-
const
|
|
136
|
-
function
|
|
137
|
-
return r(),
|
|
138
|
-
|
|
173
|
+
const Z = /* @__PURE__ */ l(K, [["render", X], ["__scopeId", "data-v-05f64ad5"]]), e3 = {}, o3 = { class: "mc-layout" };
|
|
174
|
+
function t3(o, c) {
|
|
175
|
+
return r(), s("div", o3, [
|
|
176
|
+
i(o.$slots, "default", {}, void 0, !0)
|
|
139
177
|
]);
|
|
140
178
|
}
|
|
141
|
-
const
|
|
142
|
-
function
|
|
143
|
-
return r(),
|
|
144
|
-
|
|
179
|
+
const x = /* @__PURE__ */ l(e3, [["render", t3], ["__scopeId", "data-v-f9e238c6"]]), n3 = {}, c3 = { class: "mc-layout-sender" };
|
|
180
|
+
function r3(o, c) {
|
|
181
|
+
return r(), s("div", c3, [
|
|
182
|
+
i(o.$slots, "default")
|
|
145
183
|
]);
|
|
146
184
|
}
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
o.component("McLayoutAside",
|
|
185
|
+
const s3 = /* @__PURE__ */ l(n3, [["render", r3]]);
|
|
186
|
+
x.install = (o) => {
|
|
187
|
+
o.component("McLayoutAside", N), o.component("McLayoutContent", J), o.component("McLayoutHeader", Z), o.component("McLayout", x), o.component("McLayoutSender", s3);
|
|
150
188
|
};
|
|
151
189
|
export {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
190
|
+
x as McLayout,
|
|
191
|
+
N as McLayoutAside,
|
|
192
|
+
J as McLayoutContent,
|
|
193
|
+
Z as McLayoutHeader,
|
|
194
|
+
s3 as McLayoutSender
|
|
157
195
|
};
|