@matechat/core 1.1.0 → 1.2.0-alpha.0

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/Bubble/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./index.css";
2
- import { openBlock as l, createElementBlock as s, createElementVNode as b, defineComponent as _, useSlots as k, computed as p, normalizeClass as d, createVNode as y, unref as u, normalizeProps as T, guardReactiveProps as S, toDisplayString as A, createCommentVNode as n, renderSlot as c, createTextVNode as V } from "vue";
2
+ import { createElementBlock as l, openBlock as s, createElementVNode as v, defineComponent as _, useSlots as k, computed as p, normalizeClass as d, createCommentVNode as n, createVNode as y, unref as c, normalizeProps as T, guardReactiveProps as S, toDisplayString as A, renderSlot as u, createTextVNode as V } from "vue";
3
3
  import { Avatar as $ } from "vue-devui/avatar";
4
4
  import "vue-devui/avatar/style.css";
5
5
  const B = {
@@ -27,28 +27,28 @@ const B = {
27
27
  type: Object
28
28
  }
29
29
  }, E = 36, N = 36, P = "name", I = "imgSrc", C = (a, o) => {
30
- const t = a.__vccOpts || a;
31
- for (const [v, r] of o)
32
- t[v] = r;
33
- return t;
30
+ const e = a.__vccOpts || a;
31
+ for (const [b, r] of o)
32
+ e[b] = r;
33
+ return e;
34
34
  }, R = {}, w = { class: "mc-bubble-loading" };
35
35
  function D(a, o) {
36
- return l(), s("div", w, o[0] || (o[0] = [
37
- b(
36
+ return s(), l("div", w, o[0] || (o[0] = [
37
+ v(
38
38
  "div",
39
39
  { class: "loading-dot dot-start" },
40
40
  null,
41
41
  -1
42
42
  /* HOISTED */
43
43
  ),
44
- b(
44
+ v(
45
45
  "div",
46
46
  { class: "loading-dot dot-middle" },
47
47
  null,
48
48
  -1
49
49
  /* HOISTED */
50
50
  ),
51
- b(
51
+ v(
52
52
  "div",
53
53
  { class: "loading-dot dot-end" },
54
54
  null,
@@ -67,26 +67,26 @@ const M = /* @__PURE__ */ C(R, [["render", D], ["__scopeId", "data-v-f976c7b6"]]
67
67
  __name: "Bubble",
68
68
  props: B,
69
69
  setup(a) {
70
- const o = k(), t = a, v = p(() => [
71
- `mc-bubble-avatar-${t.avatarPosition}`,
72
- `mc-bubble-${t.align}`,
73
- t.loading ? "mc-bubble-loading" : ""
70
+ const o = k(), e = a, b = p(() => [
71
+ `mc-bubble-avatar-${e.avatarPosition}`,
72
+ `mc-bubble-${e.align}`,
73
+ e.loading ? "mc-bubble-loading" : ""
74
74
  ]), r = p(() => {
75
- if (t.avatarConfig) {
76
- const e = Object.keys(t.avatarConfig), f = e.some((i) => i === P || i === I);
77
- return e.length < 1 || !f;
75
+ if (e.avatarConfig) {
76
+ const t = Object.keys(e.avatarConfig), f = t.some((i) => i === P || i === I);
77
+ return t.length < 1 || !f;
78
78
  } else
79
79
  return !0;
80
80
  });
81
- return (e, f) => {
81
+ return (t, f) => {
82
82
  var i, g, m;
83
- return l(), s(
83
+ return s(), l(
84
84
  "div",
85
85
  {
86
- class: d(["mc-bubble", v.value])
86
+ class: d(["mc-bubble", b.value])
87
87
  },
88
88
  [
89
- e.avatarConfig ? (l(), s(
89
+ t.avatarConfig ? (s(), l(
90
90
  "div",
91
91
  {
92
92
  key: 0,
@@ -94,21 +94,21 @@ const M = /* @__PURE__ */ C(R, [["render", D], ["__scopeId", "data-v-f976c7b6"]]
94
94
  },
95
95
  [
96
96
  y(
97
- u($),
97
+ c($),
98
98
  T(S(
99
99
  r.value ? {
100
- width: ((i = e.avatarConfig) == null ? void 0 : i.width) || u(E),
101
- height: ((g = e.avatarConfig) == null ? void 0 : g.height) || u(N)
102
- } : e.avatarConfig
100
+ width: ((i = t.avatarConfig) == null ? void 0 : i.width) || c(E),
101
+ height: ((g = t.avatarConfig) == null ? void 0 : g.height) || c(N)
102
+ } : t.avatarConfig
103
103
  )),
104
104
  null,
105
105
  16
106
106
  /* FULL_PROPS */
107
107
  ),
108
- e.avatarPosition === "top" ? (l(), s(
108
+ t.avatarPosition === "top" ? (s(), l(
109
109
  "span",
110
110
  H,
111
- A((m = e.avatarConfig) == null ? void 0 : m.displayName),
111
+ A((m = t.avatarConfig) == null ? void 0 : m.displayName),
112
112
  1
113
113
  /* TEXT */
114
114
  )) : n("v-if", !0)
@@ -116,28 +116,28 @@ const M = /* @__PURE__ */ C(R, [["render", D], ["__scopeId", "data-v-f976c7b6"]]
116
116
  2
117
117
  /* CLASS */
118
118
  )) : n("v-if", !0),
119
- b(
119
+ v(
120
120
  "div",
121
121
  {
122
- class: d(["mc-bubble-content-container", { "with-avatar": e.avatarConfig }])
122
+ class: d(["mc-bubble-content-container", { "with-avatar": t.avatarConfig }])
123
123
  },
124
124
  [
125
- e.loading ? n("v-if", !0) : c(e.$slots, "top", { key: 0 }, void 0, !0),
126
- e.loading ? (l(), s("div", L, [
127
- c(e.$slots, "loadingTpl", {}, () => [
125
+ t.loading ? n("v-if", !0) : u(t.$slots, "top", { key: 0 }, void 0, !0),
126
+ t.loading ? (s(), l("div", L, [
127
+ u(t.$slots, "loadingTpl", {}, () => [
128
128
  y(M)
129
129
  ], !0)
130
130
  ])) : n("v-if", !0),
131
- (u(o).default || e.content) && !e.loading ? (l(), s(
131
+ (c(o).default || t.content) && !t.loading ? (s(), l(
132
132
  "div",
133
133
  {
134
134
  key: 2,
135
- class: d(["mc-bubble-content", [e.variant]])
135
+ class: d(["mc-bubble-content", [t.variant]])
136
136
  },
137
137
  [
138
- c(e.$slots, "default", {}, () => [
138
+ u(t.$slots, "default", {}, () => [
139
139
  V(
140
- A(e.content),
140
+ A(t.content),
141
141
  1
142
142
  /* TEXT */
143
143
  )
@@ -146,7 +146,7 @@ const M = /* @__PURE__ */ C(R, [["render", D], ["__scopeId", "data-v-f976c7b6"]]
146
146
  2
147
147
  /* CLASS */
148
148
  )) : n("v-if", !0),
149
- e.loading ? n("v-if", !0) : c(e.$slots, "bottom", { key: 3 }, void 0, !0)
149
+ t.loading ? n("v-if", !0) : u(t.$slots, "bottom", { key: 3 }, void 0, !0)
150
150
  ],
151
151
  2
152
152
  /* CLASS */
package/Header/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./index.css";
2
- import { defineComponent as d, openBlock as n, createElementBlock as r, createElementVNode as s, normalizeClass as m, createCommentVNode as g, toDisplayString as p, renderSlot as _ } from "vue";
3
- const f = {
2
+ import { defineComponent as d, createElementBlock as n, openBlock as r, createElementVNode as s, normalizeClass as m, createCommentVNode as g, toDisplayString as p, renderSlot as _ } from "vue";
3
+ const k = {
4
4
  logoImg: {
5
5
  type: String,
6
6
  default: ""
@@ -13,15 +13,15 @@ const f = {
13
13
  type: Boolean,
14
14
  default: !1
15
15
  }
16
- }, k = { class: "mc-header" }, h = ["src", "alt"], u = { class: "mc-header-title" }, C = { class: "mc-header-operation" }, v = /* @__PURE__ */ d({
16
+ }, f = { class: "mc-header" }, h = ["src", "alt"], u = { class: "mc-header-title" }, C = { class: "mc-header-operation" }, v = /* @__PURE__ */ d({
17
17
  __name: "Header",
18
- props: f,
18
+ props: k,
19
19
  emits: ["logoClicked"],
20
20
  setup(e, { emit: l }) {
21
21
  const t = l, a = e, c = () => {
22
22
  a.logoClickable && t("logoClicked");
23
23
  };
24
- return (o, I) => (n(), r("div", k, [
24
+ return (o, I) => (r(), n("div", f, [
25
25
  s(
26
26
  "div",
27
27
  {
@@ -29,7 +29,7 @@ const f = {
29
29
  onClick: c
30
30
  },
31
31
  [
32
- o.logoImg ? (n(), r("img", {
32
+ o.logoImg ? (r(), n("img", {
33
33
  key: 0,
34
34
  class: "mc-header-logo",
35
35
  src: o.logoImg,
package/Input/index.css CHANGED
@@ -1 +1 @@
1
- .mc-textarea.devui-textarea{height:64px;padding-left:0;padding-right:0;border:none}.mc-textarea.devui-textarea.mc-textarea-simple{height:32px}.mc-textarea.devui-textarea::placeholder{color:var(--devui-placeholder, #babbc0)}.mc-button.devui-button[data-v-4b65a940]{border:none}.mc-button.devui-button.mc-button-loading[data-v-4b65a940] svg{animation:rotating-4b65a940 1s linear infinite}.mc-button.devui-button[data-v-4b65a940] .button-content{display:inline-flex;align-items:center}.mc-button.devui-button[data-v-4b65a940] .button-content svg{margin-right:4px}.mc-button.devui-button[data-v-4b65a940] .button-content svg path{fill:var(--devui-light-text, #ffffff)}@keyframes rotating-4b65a940{0%{transform:rotate(0)}to{transform:rotate(180deg)}}.mc-input{display:flex;flex-direction:column;width:100%;padding:4px 0;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:14px;box-sizing:border-box}.mc-input.mc-input-disabled{background-color:var(--devui-disabled-bg, #f5f5f5);cursor:not-allowed}.mc-input .mc-input-content{display:flex;align-items:flex-end;padding:0 8px}.mc-input .mc-input-foot{display:flex;justify-content:space-between;align-items:center;height:32px;padding:0 8px}.mc-input .mc-input-foot .mc-input-foot-left{flex:1;height:100%;display:flex;align-items:center}.mc-input .mc-input-foot .mc-input-foot-left .mc-input-foot-count{margin-left:8px;color:var(--devui-text, #252b3a);font-size:var(--devui-font-size, 12px)}
1
+ .mc-textarea.devui-textarea{height:64px;padding-left:0;padding-right:0;border:none}.mc-textarea.devui-textarea.mc-textarea-simple{height:32px}.mc-textarea.devui-textarea::placeholder{color:var(--devui-placeholder, #babbc0)}.mc-button.devui-button[data-v-d9d29965]{border:none}.mc-button.devui-button.mc-button-loading[data-v-d9d29965] svg{animation:rotating-d9d29965 1s linear infinite}.mc-button.devui-button[data-v-d9d29965] .button-content{display:inline-flex;align-items:center}.mc-button.devui-button[data-v-d9d29965] .button-content svg{margin-right:4px}.mc-button.devui-button[data-v-d9d29965] .button-content svg path{fill:var(--devui-light-text, #ffffff)}@keyframes rotating-d9d29965{0%{transform:rotate(0)}to{transform:rotate(180deg)}}.mc-input{display:flex;flex-direction:column;width:100%;padding:4px 0;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:14px;box-sizing:border-box}.mc-input.mc-input-disabled{background-color:var(--devui-disabled-bg, #f5f5f5);cursor:not-allowed}.mc-input .mc-input-content{display:flex;align-items:flex-end;padding:0 8px}.mc-input .mc-input-foot{display:flex;justify-content:space-between;align-items:center;height:32px;padding:0 8px}.mc-input .mc-input-foot .mc-input-foot-left{flex:1;height:100%;display:flex;align-items:center}.mc-input .mc-input-foot .mc-input-foot-left .mc-input-foot-count{color:var(--devui-text, #252b3a);font-size:var(--devui-font-size, 12px)}
package/Input/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import "./index.css";
2
- import { defineComponent as b, inject as M, computed as B, openBlock as a, createBlock as f, unref as o, isRef as I, normalizeClass as w, nextTick as V, createElementBlock as L, createElementVNode as p, withCtx as T, toDisplayString as g, ref as N, watch as P, provide as j, renderSlot as m, createVNode as y, createCommentVNode as _ } from "vue";
3
- import { Textarea as F } from "vue-devui/textarea";
2
+ import { defineComponent as b, inject as I, computed as V, createBlock as h, openBlock as u, unref as n, normalizeClass as w, isRef as P, nextTick as T, createElementBlock as L, createElementVNode as d, withCtx as N, toDisplayString as g, ref as j, watch as F, provide as z, renderSlot as C, createCommentVNode as y, createVNode as _ } from "vue";
3
+ import { Textarea as A } from "vue-devui/textarea";
4
4
  import "vue-devui/textarea/style.css";
5
- import { Button as z } from "vue-devui/button";
5
+ import { useMcI18n as $ } from "@matechat/core/Locale";
6
+ import { Button as D } from "vue-devui/button";
6
7
  import "vue-devui/button/style.css";
7
- var h = /* @__PURE__ */ ((n) => (n.Simple = "simple", n.Full = "full", n))(h || {}), C = /* @__PURE__ */ ((n) => (n.Enter = "enter", n.ShiftEnter = "shiftEnter", n))(C || {});
8
- const D = {
8
+ var v = /* @__PURE__ */ ((e) => (e.Simple = "simple", e.Full = "full", e))(v || {}), f = /* @__PURE__ */ ((e) => (e.Enter = "enter", e.ShiftEnter = "shiftEnter", e))(f || {});
9
+ const G = {
9
10
  value: {
10
11
  type: String,
11
12
  default: ""
@@ -38,58 +39,58 @@ const D = {
38
39
  default: "enter"
39
40
  /* Enter */
40
41
  }
41
- }, G = ["change", "submit", "cancel"], S = "mc-input", O = /* @__PURE__ */ b({
42
+ }, O = ["change", "submit", "cancel"], E = "mc-input", R = /* @__PURE__ */ b({
42
43
  __name: "textarea",
43
- setup(n) {
44
- const { inputValue: e, rootProps: t, rootEmits: l } = M(S), u = B(() => {
45
- let r = "", c = "";
46
- return t.submitShortKey === C.Enter && (r = "Enter", c = "Shift + Enter"), t.submitShortKey === C.ShiftEnter && (r = "Shift + Enter", c = "Enter"), t.placeholder ?? (r ? `请输入您的问题,并按${r}发送,按${c}换行` : "请输入您的问题...");
44
+ setup(e) {
45
+ const { t: o } = $(), { inputValue: s, rootProps: t, rootEmits: r } = I(E), a = V(() => {
46
+ let i = "", c = "";
47
+ return t.submitShortKey === f.Enter && (i = "Enter", c = "Shift + Enter"), t.submitShortKey === f.ShiftEnter && (i = "Shift + Enter", c = "Enter"), t.placeholder ?? (i ? o("Input.pleaseEnterPlaceholder", { enterKey: i, shiftEnterKey: c }) : o("Input.pleaseEnter"));
47
48
  });
48
- let i = !1;
49
- const d = () => {
50
- V(() => {
51
- l("change", e.value);
49
+ let p = !1;
50
+ const m = () => {
51
+ T(() => {
52
+ r("change", s.value);
52
53
  });
53
- }, v = () => {
54
- i || d();
55
- }, s = () => {
56
- i = !0;
54
+ }, l = () => {
55
+ p || m();
57
56
  }, x = () => {
58
- i = !1, d();
59
- }, K = (r) => {
57
+ p = !0;
58
+ }, K = () => {
59
+ p = !1, m();
60
+ }, Z = (i) => {
60
61
  if (t.submitShortKey === null)
61
62
  return;
62
- (t.submitShortKey === C.Enter ? !r.shiftKey : t.submitShortKey === C.ShiftEnter ? r.shiftKey : !1) && r.key === "Enter" && !i && (r.preventDefault(), l("submit", e.value), e.value = "");
63
+ (t.submitShortKey === f.Enter ? !i.shiftKey : t.submitShortKey === f.ShiftEnter ? i.shiftKey : !1) && i.key === "Enter" && !p && (i.preventDefault(), r("submit", s.value), s.value = "");
63
64
  };
64
- return (r, c) => (a(), f(o(F), {
65
- modelValue: o(e),
66
- "onUpdate:modelValue": c[0] || (c[0] = (Z) => I(e) ? e.value = Z : null),
67
- placeholder: u.value,
65
+ return (i, c) => (u(), h(n(A), {
66
+ modelValue: n(s),
67
+ "onUpdate:modelValue": c[0] || (c[0] = (B) => P(s) ? s.value = B : null),
68
+ placeholder: a.value,
68
69
  showGlowStyle: !1,
69
- disabled: o(t).disabled,
70
- maxlength: o(t).maxLength,
71
- class: w(["mc-textarea", { "mc-textarea-simple": o(t).displayType === o(h).Simple }]),
72
- onInput: v,
73
- onCompositionstart: s,
74
- onCompositionend: x,
75
- onKeydown: K
70
+ disabled: n(t).disabled,
71
+ maxlength: n(t).maxLength,
72
+ class: w(["mc-textarea", { "mc-textarea-simple": n(t).displayType === n(v).Simple }]),
73
+ onInput: l,
74
+ onCompositionstart: x,
75
+ onCompositionend: K,
76
+ onKeydown: Z
76
77
  }, null, 8, ["modelValue", "placeholder", "disabled", "maxlength", "class"]));
77
78
  }
78
- }), E = (n, e) => {
79
- const t = n.__vccOpts || n;
80
- for (const [l, u] of e)
81
- t[l] = u;
82
- return t;
83
- }, R = {}, U = {
79
+ }), S = (e, o) => {
80
+ const s = e.__vccOpts || e;
81
+ for (const [t, r] of o)
82
+ s[t] = r;
83
+ return s;
84
+ }, U = {}, q = {
84
85
  width: "16px",
85
86
  height: "16px",
86
87
  viewBox: "0 0 16 16",
87
88
  version: "1.1",
88
89
  xmlns: "http://www.w3.org/2000/svg"
89
90
  };
90
- function q(n, e) {
91
- return a(), L("svg", U, e[0] || (e[0] = [
92
- p(
91
+ function H(e, o) {
92
+ return u(), L("svg", q, o[0] || (o[0] = [
93
+ d(
93
94
  "g",
94
95
  {
95
96
  stroke: "none",
@@ -98,23 +99,23 @@ function q(n, e) {
98
99
  "fill-rule": "evenodd"
99
100
  },
100
101
  [
101
- p("path", { d: "M8,12 C8.27614237,12 8.5,12.2238576 8.5,12.5 L8.5,14.5 C8.5,14.7761424 8.27614237,15 8,15 C7.72385763,15 7.5,14.7761424 7.5,14.5 L7.5,12.5 C7.5,12.2238576 7.72385763,12 8,12 Z M11.0495421,11.3466838 L12.2251126,12.9647178 C12.3874251,13.1881217 12.3379006,13.5008065 12.1144968,13.663119 C11.8910929,13.8254314 11.5784081,13.775907 11.4160956,13.5525031 L10.2405251,11.9344691 C10.0782127,11.7110652 10.1277371,11.3983804 10.351141,11.236068 C10.5745449,11.0737556 10.8872297,11.12328 11.0495421,11.3466838 Z M5.64885899,11.236068 C5.87226287,11.3983804 5.92178728,11.7110652 5.75947486,11.9344691 L4.58390436,13.5525031 C4.42159194,13.775907 4.10890711,13.8254314 3.88550323,13.663119 C3.66209936,13.5008065 3.61257495,13.1881217 3.77488736,12.9647178 L4.95045787,11.3466838 C5.11277028,11.12328 5.42545512,11.0737556 5.64885899,11.236068 Z M12.4342628,8.91504822 L14.3363759,9.53308221 C14.5990029,9.61841489 14.7427283,9.90049196 14.6573956,10.163119 C14.5720629,10.425746 14.2899859,10.5694714 14.0273589,10.4841387 L12.1252458,9.86610473 C11.8626188,9.78077205 11.7188934,9.49869498 11.8042261,9.23606798 C11.8895588,8.97344097 12.1716358,8.82971553 12.4342628,8.91504822 Z M4.19577393,9.23606798 C4.28110662,9.49869498 4.13738118,9.78077205 3.87475417,9.86610473 L1.97264114,10.4841387 C1.71001414,10.5694714 1.42793707,10.425746 1.34260439,10.163119 C1.2572717,9.90049196 1.40099714,9.61841489 1.66362415,9.53308221 L3.56573718,8.91504822 C3.82836418,8.82971553 4.11044125,8.97344097 4.19577393,9.23606798 Z M14.6573956,5.83688104 C14.7427283,6.09950804 14.5990029,6.38158511 14.3363759,6.46691779 L12.4342628,7.08495178 C12.1716358,7.17028447 11.8895588,7.02655903 11.8042261,6.76393202 C11.7188934,6.50130502 11.8626188,6.21922795 12.1252458,6.13389527 L14.0273589,5.51586128 C14.2899859,5.43052859 14.5720629,5.57425403 14.6573956,5.83688104 Z M1.97264114,5.51586128 L3.87475417,6.13389527 C4.13738118,6.21922795 4.28110662,6.50130502 4.19577393,6.76393202 C4.11044125,7.02655903 3.82836418,7.17028447 3.56573718,7.08495178 L1.66362415,6.46691779 C1.40099714,6.38158511 1.2572717,6.09950804 1.34260439,5.83688104 C1.42793707,5.57425403 1.71001414,5.43052859 1.97264114,5.51586128 Z M12.1144968,2.33688104 C12.3379006,2.49919345 12.3874251,2.81187829 12.2251126,3.03528216 L11.0495421,4.65331615 C10.8872297,4.87672003 10.5745449,4.92624444 10.351141,4.76393202 C10.1277371,4.60161961 10.0782127,4.28893477 10.2405251,4.0655309 L11.4160956,2.44749691 C11.5784081,2.22409304 11.8910929,2.17456862 12.1144968,2.33688104 Z M4.58390436,2.44749691 L5.75947486,4.0655309 C5.92178728,4.28893477 5.87226287,4.60161961 5.64885899,4.76393202 C5.42545512,4.92624444 5.11277028,4.87672003 4.95045787,4.65331615 L3.77488736,3.03528216 C3.61257495,2.81187829 3.66209936,2.49919345 3.88550323,2.33688104 C4.10890711,2.17456862 4.42159194,2.22409304 4.58390436,2.44749691 Z M8,1 C8.27614237,1 8.5,1.22385763 8.5,1.5 L8.5,3.5 C8.5,3.77614237 8.27614237,4 8,4 C7.72385763,4 7.5,3.77614237 7.5,3.5 L7.5,1.5 C7.5,1.22385763 7.72385763,1 8,1 Z" })
102
+ d("path", { d: "M8,12 C8.27614237,12 8.5,12.2238576 8.5,12.5 L8.5,14.5 C8.5,14.7761424 8.27614237,15 8,15 C7.72385763,15 7.5,14.7761424 7.5,14.5 L7.5,12.5 C7.5,12.2238576 7.72385763,12 8,12 Z M11.0495421,11.3466838 L12.2251126,12.9647178 C12.3874251,13.1881217 12.3379006,13.5008065 12.1144968,13.663119 C11.8910929,13.8254314 11.5784081,13.775907 11.4160956,13.5525031 L10.2405251,11.9344691 C10.0782127,11.7110652 10.1277371,11.3983804 10.351141,11.236068 C10.5745449,11.0737556 10.8872297,11.12328 11.0495421,11.3466838 Z M5.64885899,11.236068 C5.87226287,11.3983804 5.92178728,11.7110652 5.75947486,11.9344691 L4.58390436,13.5525031 C4.42159194,13.775907 4.10890711,13.8254314 3.88550323,13.663119 C3.66209936,13.5008065 3.61257495,13.1881217 3.77488736,12.9647178 L4.95045787,11.3466838 C5.11277028,11.12328 5.42545512,11.0737556 5.64885899,11.236068 Z M12.4342628,8.91504822 L14.3363759,9.53308221 C14.5990029,9.61841489 14.7427283,9.90049196 14.6573956,10.163119 C14.5720629,10.425746 14.2899859,10.5694714 14.0273589,10.4841387 L12.1252458,9.86610473 C11.8626188,9.78077205 11.7188934,9.49869498 11.8042261,9.23606798 C11.8895588,8.97344097 12.1716358,8.82971553 12.4342628,8.91504822 Z M4.19577393,9.23606798 C4.28110662,9.49869498 4.13738118,9.78077205 3.87475417,9.86610473 L1.97264114,10.4841387 C1.71001414,10.5694714 1.42793707,10.425746 1.34260439,10.163119 C1.2572717,9.90049196 1.40099714,9.61841489 1.66362415,9.53308221 L3.56573718,8.91504822 C3.82836418,8.82971553 4.11044125,8.97344097 4.19577393,9.23606798 Z M14.6573956,5.83688104 C14.7427283,6.09950804 14.5990029,6.38158511 14.3363759,6.46691779 L12.4342628,7.08495178 C12.1716358,7.17028447 11.8895588,7.02655903 11.8042261,6.76393202 C11.7188934,6.50130502 11.8626188,6.21922795 12.1252458,6.13389527 L14.0273589,5.51586128 C14.2899859,5.43052859 14.5720629,5.57425403 14.6573956,5.83688104 Z M1.97264114,5.51586128 L3.87475417,6.13389527 C4.13738118,6.21922795 4.28110662,6.50130502 4.19577393,6.76393202 C4.11044125,7.02655903 3.82836418,7.17028447 3.56573718,7.08495178 L1.66362415,6.46691779 C1.40099714,6.38158511 1.2572717,6.09950804 1.34260439,5.83688104 C1.42793707,5.57425403 1.71001414,5.43052859 1.97264114,5.51586128 Z M12.1144968,2.33688104 C12.3379006,2.49919345 12.3874251,2.81187829 12.2251126,3.03528216 L11.0495421,4.65331615 C10.8872297,4.87672003 10.5745449,4.92624444 10.351141,4.76393202 C10.1277371,4.60161961 10.0782127,4.28893477 10.2405251,4.0655309 L11.4160956,2.44749691 C11.5784081,2.22409304 11.8910929,2.17456862 12.1144968,2.33688104 Z M4.58390436,2.44749691 L5.75947486,4.0655309 C5.92178728,4.28893477 5.87226287,4.60161961 5.64885899,4.76393202 C5.42545512,4.92624444 5.11277028,4.87672003 4.95045787,4.65331615 L3.77488736,3.03528216 C3.61257495,2.81187829 3.66209936,2.49919345 3.88550323,2.33688104 C4.10890711,2.17456862 4.42159194,2.22409304 4.58390436,2.44749691 Z M8,1 C8.27614237,1 8.5,1.22385763 8.5,1.5 L8.5,3.5 C8.5,3.77614237 8.27614237,4 8,4 C7.72385763,4 7.5,3.77614237 7.5,3.5 L7.5,1.5 C7.5,1.22385763 7.72385763,1 8,1 Z" })
102
103
  ],
103
104
  -1
104
105
  /* HOISTED */
105
106
  )
106
107
  ]));
107
108
  }
108
- const A = /* @__PURE__ */ E(R, [["render", q]]), H = {}, J = {
109
+ const J = /* @__PURE__ */ S(U, [["render", H]]), Q = {}, W = {
109
110
  width: "16px",
110
111
  height: "16px",
111
112
  viewBox: "0 0 16 16",
112
113
  version: "1.1",
113
114
  xmlns: "http://www.w3.org/2000/svg"
114
115
  };
115
- function Q(n, e) {
116
- return a(), L("svg", J, e[0] || (e[0] = [
117
- p(
116
+ function X(e, o) {
117
+ return u(), L("svg", W, o[0] || (o[0] = [
118
+ d(
118
119
  "g",
119
120
  {
120
121
  stroke: "none",
@@ -123,32 +124,32 @@ function Q(n, e) {
123
124
  "fill-rule": "evenodd"
124
125
  },
125
126
  [
126
- p("path", { d: "M13.5105149,2.56164948 C14.1211149,2.35546948 14.7829149,2.68328948 14.9892149,3.29376948 C15.0349149,3.42925948 15.0552149,3.57159948 15.0495149,3.71368948 L15.0495149,3.71368948 L15.0351149,3.85546948 L13.6575149,12.2717195 C13.5237149,13.0892195 12.7524149,13.6435195 11.9348149,13.5097195 C11.8542149,13.4965195 11.7751149,13.4768195 11.6980149,13.4508195 L11.6980149,13.4508195 L11.5840149,13.4071195 L9.3049349,12.4260195 L8.4482449,13.5422195 C8.1958049,13.8708195 7.8205549,14.0786195 7.4128449,14.1207195 L7.4128449,14.1207195 L7.2585449,14.1286195 C6.4787649,14.1286195 5.8381349,13.5337195 5.7653849,12.7731195 L5.7653849,12.7731195 L5.7585449,12.6286195 L5.7602549,10.5258195 L5.7756349,10.4384195 L5.7944349,10.3824195 L5.8266649,10.3168995 L5.8735349,10.2503695 L5.9177249,10.2039195 L12.6909149,3.89392948 L2.3403349,7.38903948 C2.2329149,7.42529948 2.1418449,7.49676948 2.0808149,7.59063948 L2.0808149,7.59063948 L2.0412649,7.66497948 C1.9440949,7.89044948 2.0258749,8.14788948 2.2236349,8.27917948 L2.2236349,8.27917948 L2.3029749,8.32214948 L4.4799849,9.26177948 C4.7333949,9.37121948 4.8503449,9.66546948 4.7409649,9.91894948 C4.6435549,10.1443495 4.4003949,10.2616595 4.1694349,10.2081295 L4.1694349,10.2081295 L4.0837449,10.1798795 L1.9072249,9.24047948 C1.1462449,8.91284948 0.795166898,8.03039948 1.1225549,7.26953948 C1.2700249,6.92755948 1.5380849,6.65435948 1.8730449,6.50018948 L1.8730449,6.50018948 L2.0205049,6.44158948 Z M6.7578149,11.3299195 L6.7585449,12.6286195 L6.7666013,12.7185103 C6.80894095,12.9517898 7.0131049,13.1286195 7.2585449,13.1286195 C7.3828149,13.1286195 7.5014649,13.0824195 7.5925349,13.0008195 L7.5925349,13.0008195 L7.6550349,12.9332195 L8.3569349,12.0179195 L6.7578149,11.3299195 Z M13.9888149,4.05090948 L7.1599149,10.4129195 L11.9795149,12.4886195 C11.9980149,12.4966195 12.0173149,12.5035195 12.0369149,12.5093195 L12.0369149,12.5093195 L12.0964149,12.5228195 C12.3386149,12.5624195 12.5686149,12.4209195 12.6482149,12.1975195 L12.6482149,12.1975195 L12.6706149,12.1101195 L13.9888149,4.05090948 Z" })
127
+ d("path", { d: "M13.5105149,2.56164948 C14.1211149,2.35546948 14.7829149,2.68328948 14.9892149,3.29376948 C15.0349149,3.42925948 15.0552149,3.57159948 15.0495149,3.71368948 L15.0495149,3.71368948 L15.0351149,3.85546948 L13.6575149,12.2717195 C13.5237149,13.0892195 12.7524149,13.6435195 11.9348149,13.5097195 C11.8542149,13.4965195 11.7751149,13.4768195 11.6980149,13.4508195 L11.6980149,13.4508195 L11.5840149,13.4071195 L9.3049349,12.4260195 L8.4482449,13.5422195 C8.1958049,13.8708195 7.8205549,14.0786195 7.4128449,14.1207195 L7.4128449,14.1207195 L7.2585449,14.1286195 C6.4787649,14.1286195 5.8381349,13.5337195 5.7653849,12.7731195 L5.7653849,12.7731195 L5.7585449,12.6286195 L5.7602549,10.5258195 L5.7756349,10.4384195 L5.7944349,10.3824195 L5.8266649,10.3168995 L5.8735349,10.2503695 L5.9177249,10.2039195 L12.6909149,3.89392948 L2.3403349,7.38903948 C2.2329149,7.42529948 2.1418449,7.49676948 2.0808149,7.59063948 L2.0808149,7.59063948 L2.0412649,7.66497948 C1.9440949,7.89044948 2.0258749,8.14788948 2.2236349,8.27917948 L2.2236349,8.27917948 L2.3029749,8.32214948 L4.4799849,9.26177948 C4.7333949,9.37121948 4.8503449,9.66546948 4.7409649,9.91894948 C4.6435549,10.1443495 4.4003949,10.2616595 4.1694349,10.2081295 L4.1694349,10.2081295 L4.0837449,10.1798795 L1.9072249,9.24047948 C1.1462449,8.91284948 0.795166898,8.03039948 1.1225549,7.26953948 C1.2700249,6.92755948 1.5380849,6.65435948 1.8730449,6.50018948 L1.8730449,6.50018948 L2.0205049,6.44158948 Z M6.7578149,11.3299195 L6.7585449,12.6286195 L6.7666013,12.7185103 C6.80894095,12.9517898 7.0131049,13.1286195 7.2585449,13.1286195 C7.3828149,13.1286195 7.5014649,13.0824195 7.5925349,13.0008195 L7.5925349,13.0008195 L7.6550349,12.9332195 L8.3569349,12.0179195 L6.7578149,11.3299195 Z M13.9888149,4.05090948 L7.1599149,10.4129195 L11.9795149,12.4886195 C11.9980149,12.4966195 12.0173149,12.5035195 12.0369149,12.5093195 L12.0369149,12.5093195 L12.0964149,12.5228195 C12.3386149,12.5624195 12.5686149,12.4209195 12.6482149,12.1975195 L12.6482149,12.1975195 L12.6706149,12.1101195 L13.9888149,4.05090948 Z" })
127
128
  ],
128
129
  -1
129
130
  /* HOISTED */
130
131
  )
131
132
  ]));
132
133
  }
133
- const W = /* @__PURE__ */ E(H, [["render", Q]]), X = /* @__PURE__ */ b({
134
+ const Y = /* @__PURE__ */ S(Q, [["render", X]]), t1 = /* @__PURE__ */ b({
134
135
  __name: "button",
135
- setup(n) {
136
- const { inputValue: e, rootProps: t, rootEmits: l } = M(S), u = () => {
137
- t.loading ? l("cancel") : (l("submit", e.value), e.value = "");
136
+ setup(e) {
137
+ const { t: o } = $(), { inputValue: s, rootProps: t, rootEmits: r } = I(E), a = () => {
138
+ t.loading ? r("cancel") : (r("submit", s.value), s.value = "");
138
139
  };
139
- return (i, d) => (a(), f(o(z), {
140
+ return (p, m) => (u(), h(n(D), {
140
141
  variant: "solid",
141
142
  shape: "round",
142
- disabled: o(t).disabled || !o(t).loading && !o(e),
143
- class: w(["mc-button", { "mc-button-loading": o(t).loading }]),
144
- onClick: u
143
+ disabled: n(t).disabled || !n(t).loading && !n(s),
144
+ class: w(["mc-button", { "mc-button-loading": n(t).loading }]),
145
+ onClick: a
145
146
  }, {
146
- default: T(() => [
147
- o(t).loading ? (a(), f(A, { key: 0 })) : (a(), f(W, { key: 1 })),
148
- p(
147
+ default: N(() => [
148
+ n(t).loading ? (u(), h(J, { key: 0 })) : (u(), h(Y, { key: 1 })),
149
+ d(
149
150
  "span",
150
151
  null,
151
- g(o(t).loading ? "暂停回答" : "发送"),
152
+ g(n(t).loading ? n(o)("Input.pauseAnswer") : n(o)("Input.send")),
152
153
  1
153
154
  /* TEXT */
154
155
  )
@@ -157,64 +158,64 @@ const W = /* @__PURE__ */ E(H, [["render", Q]]), X = /* @__PURE__ */ b({
157
158
  /* STABLE */
158
159
  }, 8, ["disabled", "class"]));
159
160
  }
160
- }), k = /* @__PURE__ */ E(X, [["__scopeId", "data-v-4b65a940"]]), Y = { class: "mc-input-content" }, t1 = {
161
+ }), k = /* @__PURE__ */ S(t1, [["__scopeId", "data-v-d9d29965"]]), e1 = { class: "mc-input-content" }, n1 = {
161
162
  key: 0,
162
163
  class: "mc-input-foot"
163
- }, e1 = { class: "mc-input-foot-left" }, n1 = {
164
+ }, o1 = { class: "mc-input-foot-left" }, s1 = {
164
165
  key: 0,
165
166
  class: "mc-input-foot-count"
166
- }, $ = /* @__PURE__ */ b({
167
+ }, M = /* @__PURE__ */ b({
167
168
  __name: "Input",
168
- props: D,
169
- emits: G,
170
- setup(n, { expose: e, emit: t }) {
171
- const l = n, u = t, i = N(""), d = () => {
172
- i.value = "";
173
- }, v = () => i.value;
174
- return P(
175
- () => l.value,
169
+ props: G,
170
+ emits: O,
171
+ setup(e, { expose: o, emit: s }) {
172
+ const t = e, r = s, a = j(""), p = () => {
173
+ a.value = "";
174
+ }, m = () => a.value;
175
+ return F(
176
+ () => t.value,
176
177
  () => {
177
- i.value = l.value;
178
+ a.value = t.value;
178
179
  },
179
180
  { immediate: !0 }
180
- ), e({ clearInput: d, getInput: v }), j(S, { inputValue: i, rootProps: l, rootEmits: u }), (s, x) => (a(), L(
181
+ ), o({ clearInput: p, getInput: m }), z(E, { inputValue: a, rootProps: t, rootEmits: r }), (l, x) => (u(), L(
181
182
  "div",
182
183
  {
183
- class: w(["mc-input", { "mc-input-disabled": s.disabled }])
184
+ class: w(["mc-input", { "mc-input-disabled": l.disabled }])
184
185
  },
185
186
  [
186
- m(s.$slots, "head"),
187
- p("div", Y, [
188
- m(s.$slots, "prefix"),
189
- y(O),
190
- s.displayType === o(h).Simple ? m(s.$slots, "button", { key: 0 }, () => [
191
- y(k)
192
- ]) : _("v-if", !0)
187
+ C(l.$slots, "head"),
188
+ d("div", e1, [
189
+ C(l.$slots, "prefix"),
190
+ _(R),
191
+ l.displayType === n(v).Simple ? C(l.$slots, "button", { key: 0 }, () => [
192
+ _(k)
193
+ ]) : y("v-if", !0)
193
194
  ]),
194
- s.displayType === o(h).Full ? (a(), L("div", t1, [
195
- p("div", e1, [
196
- m(s.$slots, "extra"),
197
- s.showCount ? (a(), L(
195
+ l.displayType === n(v).Full ? (u(), L("div", n1, [
196
+ d("div", o1, [
197
+ C(l.$slots, "extra"),
198
+ l.showCount ? (u(), L(
198
199
  "span",
199
- n1,
200
- g(i.value.length) + g(s.maxLength ?? !1 ? `/${s.maxLength}` : ""),
200
+ s1,
201
+ g(a.value.length) + g(l.maxLength ?? !1 ? `/${l.maxLength}` : ""),
201
202
  1
202
203
  /* TEXT */
203
- )) : _("v-if", !0)
204
+ )) : y("v-if", !0)
204
205
  ]),
205
- m(s.$slots, "button", {}, () => [
206
- y(k)
206
+ C(l.$slots, "button", {}, () => [
207
+ _(k)
207
208
  ])
208
- ])) : _("v-if", !0)
209
+ ])) : y("v-if", !0)
209
210
  ],
210
211
  2
211
212
  /* CLASS */
212
213
  ));
213
214
  }
214
215
  });
215
- $.install = (n) => {
216
- n.component("McInput", $);
216
+ M.install = (e) => {
217
+ e.component("McInput", M);
217
218
  };
218
219
  export {
219
- $ as McInput
220
+ M as McInput
220
221
  };
@@ -1,6 +1,6 @@
1
1
  import "./index.css";
2
- import { defineComponent as u, openBlock as e, createElementBlock as n, normalizeClass as p, createElementVNode as d, createCommentVNode as l, toDisplayString as c, Fragment as g, renderList as m, renderSlot as f } from "vue";
3
- const y = {
2
+ import { defineComponent as u, createElementBlock as e, openBlock as o, normalizeClass as p, createElementVNode as d, createCommentVNode as l, renderSlot as g, toDisplayString as c, Fragment as m, renderList as f } from "vue";
3
+ const v = {
4
4
  logoImg: {
5
5
  type: String,
6
6
  default: ""
@@ -25,7 +25,7 @@ const y = {
25
25
  type: String,
26
26
  default: "center"
27
27
  }
28
- }, _ = { class: "mc-introduction-logo-container" }, v = ["src", "alt"], k = { class: "mc-introduction-title" }, b = {
28
+ }, y = { class: "mc-introduction-logo-container" }, _ = ["src", "alt"], k = { class: "mc-introduction-title" }, b = {
29
29
  key: 0,
30
30
  class: "mc-introduction-sub-title"
31
31
  }, h = {
@@ -33,20 +33,20 @@ const y = {
33
33
  class: "mc-introduction-description"
34
34
  }, I = /* @__PURE__ */ u({
35
35
  __name: "Introduction",
36
- props: y,
37
- setup(o) {
38
- return (t, i) => (e(), n(
36
+ props: v,
37
+ setup(n) {
38
+ return (t, i) => (o(), e(
39
39
  "div",
40
40
  {
41
41
  class: p(["mc-introduction", [t.align, t.background]])
42
42
  },
43
43
  [
44
- d("div", _, [
45
- t.logoImg ? (e(), n("img", {
44
+ d("div", y, [
45
+ t.logoImg ? (o(), e("img", {
46
46
  key: 0,
47
47
  src: t.logoImg,
48
48
  alt: t.title
49
- }, null, 8, v)) : l("v-if", !0),
49
+ }, null, 8, _)) : l("v-if", !0),
50
50
  d(
51
51
  "div",
52
52
  k,
@@ -55,18 +55,18 @@ const y = {
55
55
  /* TEXT */
56
56
  )
57
57
  ]),
58
- t.subTitle ? (e(), n(
58
+ t.subTitle ? (o(), e(
59
59
  "div",
60
60
  b,
61
61
  c(t.subTitle),
62
62
  1
63
63
  /* TEXT */
64
64
  )) : l("v-if", !0),
65
- t.description.length ? (e(), n("div", h, [
66
- (e(!0), n(
67
- g,
65
+ t.description.length ? (o(), e("div", h, [
66
+ (o(!0), e(
67
+ m,
68
68
  null,
69
- m(t.description, (r, s) => (e(), n(
69
+ f(t.description, (r, s) => (o(), e(
70
70
  "div",
71
71
  { key: s },
72
72
  c(r),
@@ -77,20 +77,20 @@ const y = {
77
77
  /* KEYED_FRAGMENT */
78
78
  ))
79
79
  ])) : l("v-if", !0),
80
- f(t.$slots, "default", {}, void 0, !0)
80
+ g(t.$slots, "default", {}, void 0, !0)
81
81
  ],
82
82
  2
83
83
  /* CLASS */
84
84
  ));
85
85
  }
86
- }), S = (o, t) => {
87
- const i = o.__vccOpts || o;
86
+ }), S = (n, t) => {
87
+ const i = n.__vccOpts || n;
88
88
  for (const [r, s] of t)
89
89
  i[r] = s;
90
90
  return i;
91
91
  }, a = /* @__PURE__ */ S(I, [["__scopeId", "data-v-48b255c7"]]);
92
- a.install = (o) => {
93
- o.component("McIntroduction", a);
92
+ a.install = (n) => {
93
+ n.component("McIntroduction", a);
94
94
  };
95
95
  export {
96
96
  a as McIntroduction
package/Layout/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./index.css";
2
- import { openBlock as c, createElementBlock as n, renderSlot as o } from "vue";
2
+ import { createElementBlock as c, openBlock as n, renderSlot as o } from "vue";
3
3
  const s = (e, t) => {
4
4
  const r = e.__vccOpts || e;
5
5
  for (const [d, _] of t)
@@ -7,31 +7,31 @@ const s = (e, t) => {
7
7
  return r;
8
8
  }, u = {}, f = { class: "mc-layout-aside" };
9
9
  function i(e, t) {
10
- return c(), n("div", f, [
10
+ return n(), c("div", f, [
11
11
  o(e.$slots, "default")
12
12
  ]);
13
13
  }
14
14
  const l = /* @__PURE__ */ s(u, [["render", i]]), m = {}, $ = { class: "mc-layout-content" };
15
15
  function y(e, t) {
16
- return c(), n("div", $, [
16
+ return n(), c("div", $, [
17
17
  o(e.$slots, "default", {}, void 0, !0)
18
18
  ]);
19
19
  }
20
20
  const h = /* @__PURE__ */ s(m, [["render", y], ["__scopeId", "data-v-74f98b9a"]]), v = {}, L = { class: "mc-layout-header" };
21
21
  function M(e, t) {
22
- return c(), n("div", L, [
22
+ return n(), c("div", L, [
23
23
  o(e.$slots, "default", {}, void 0, !0)
24
24
  ]);
25
25
  }
26
26
  const p = /* @__PURE__ */ s(v, [["render", M], ["__scopeId", "data-v-cfa1505b"]]), k = {}, I = { class: "mc-layout" };
27
27
  function S(e, t) {
28
- return c(), n("div", I, [
28
+ return n(), c("div", I, [
29
29
  o(e.$slots, "default", {}, void 0, !0)
30
30
  ]);
31
31
  }
32
32
  const a = /* @__PURE__ */ s(k, [["render", S], ["__scopeId", "data-v-f08e803e"]]), b = {}, x = { class: "mc-layout-sender" };
33
33
  function A(e, t) {
34
- return c(), n("div", x, [
34
+ return n(), c("div", x, [
35
35
  o(e.$slots, "default")
36
36
  ]);
37
37
  }