@huyooo/ui 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { defineComponent as K, computed as d, openBlock as i, createBlock as O, withCtx as v, createVNode as m, onMounted as ue, resolveDirective as _e, createElementBlock as n, withDirectives as de, unref as t, normalizeClass as p, createElementVNode as s, toDisplayString as l, Fragment as P, renderList as f, createCommentVNode as c, createTextVNode as G } from "vue";
1
+ import { defineComponent as K, computed as d, openBlock as i, createBlock as O, withCtx as p, createVNode as v, onMounted as ue, resolveDirective as _e, createElementBlock as n, withDirectives as de, unref as t, normalizeClass as f, createElementVNode as s, toDisplayString as l, Fragment as P, renderList as m, createCommentVNode as c, createTextVNode as G } from "vue";
2
2
  import { L as ge, a as Pe } from "./LandingPageFAQ-CZJXvor9.js";
3
- import { L as fe } from "./LandingPageSectionHeader-D_74W4My.js";
3
+ import { L as me } from "./LandingPageSectionHeader-D_74W4My.js";
4
4
  import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  /* empty css */
6
6
  import "./index-D3Kp6R4z.js";
7
7
  /* empty css */
8
- import { Spin as me, Button as H } from "@arco-design/web-vue";
8
+ import { Spin as ve, Button as H } from "@arco-design/web-vue";
9
9
  import { Icon as M } from "@iconify/vue";
10
- import { u as ve, a as pe } from "./useSubscriptionCheckout-DNLuRGmx.js";
10
+ import { u as fe, a as pe } from "./useSubscriptionCheckout-DNLuRGmx.js";
11
11
  import { u as he } from "./useEnsureAuthenticated-MpHmn2co.js";
12
12
  const ye = /* @__PURE__ */ K({
13
13
  __name: "PricingFAQ",
@@ -26,7 +26,7 @@ const ye = /* @__PURE__ */ K({
26
26
  }
27
27
  },
28
28
  setup(o) {
29
- const h = [{
29
+ const y = [{
30
30
  question: "可以先试用再付费吗?",
31
31
  answer: "可以。支持试用的方案会在卡片按钮上标明试用天数。试用期间可使用对应方案能力,到期后再决定是否继续订阅。"
32
32
  }, {
@@ -50,22 +50,22 @@ const ye = /* @__PURE__ */ K({
50
50
  }, {
51
51
  question: "使用订阅服务有什么限制?",
52
52
  answer: "请按正常业务场景使用服务,禁止共享、转售订阅或用于违法违规场景。严重滥用可能导致服务受限或账户终止。"
53
- }], y = o, k = d(() => y.faqItems ?? h);
54
- return (b, w) => (i(), O(ge, {
53
+ }], k = o, b = d(() => k.faqItems ?? y);
54
+ return (B, w) => (i(), O(ge, {
55
55
  class: "PricingFAQ"
56
56
  }, {
57
- BlockHeader: v(() => [m(fe, {
57
+ BlockHeader: p(() => [v(me, {
58
58
  title: o.title,
59
59
  subtitle: o.subtitle
60
60
  }, null, 8, ["title", "subtitle"])]),
61
- BlockBody: v(() => [m(Pe, {
61
+ BlockBody: p(() => [v(Pe, {
62
62
  "active-keys": o.activeKeys,
63
- "faq-items": k.value
63
+ "faq-items": b.value
64
64
  }, null, 8, ["active-keys", "faq-items"])]),
65
65
  _: 1
66
66
  }));
67
67
  }
68
- }), tt = /* @__PURE__ */ R(ye, [["__scopeId", "data-v-fcab2f05"]]), ke = {
68
+ }), et = /* @__PURE__ */ R(ye, [["__scopeId", "data-v-fcab2f05"]]), ke = {
69
69
  class: "PricingPlans"
70
70
  }, be = {
71
71
  class: "PricingPlans__trialMain"
@@ -91,34 +91,31 @@ const ye = /* @__PURE__ */ K({
91
91
  key: 1,
92
92
  class: "PricingPlans__note"
93
93
  }, Ae = {
94
- key: 2,
95
- class: "PricingPlans__grid"
96
- }, Fe = {
97
94
  class: "PricingPlans__badgeRow"
98
- }, Se = {
95
+ }, Fe = {
99
96
  class: "PricingPlans__header"
100
- }, xe = {
97
+ }, Se = {
101
98
  class: "PricingPlans__price"
102
- }, Ee = {
99
+ }, xe = {
103
100
  key: 0,
104
101
  class: "PricingPlans__originalPrice"
105
- }, Ne = {
102
+ }, Ee = {
106
103
  class: "PricingPlans__amount"
107
- }, Qe = {
104
+ }, Ne = {
108
105
  class: "PricingPlans__cycle"
109
- }, Ve = {
106
+ }, Qe = {
110
107
  key: 0,
111
108
  class: "PricingPlans__promotion"
112
- }, $e = {
109
+ }, Ve = {
113
110
  class: "PricingPlans__summary"
114
- }, ze = {
111
+ }, $e = {
115
112
  class: "PricingPlans__featureGroups"
116
- }, Ge = {
113
+ }, ze = {
117
114
  class: "PricingPlans__features"
118
- }, He = {
115
+ }, Ge = {
119
116
  key: 3,
120
117
  class: "PricingPlans__empty"
121
- }, Me = /* @__PURE__ */ K({
118
+ }, He = /* @__PURE__ */ K({
122
119
  __name: "PricingPlans",
123
120
  props: {
124
121
  appName: {
@@ -132,10 +129,10 @@ const ye = /* @__PURE__ */ K({
132
129
  }
133
130
  },
134
131
  setup(o) {
135
- const h = o, {
136
- products: y,
137
- plans: k,
138
- currentSubscription: b,
132
+ const y = o, {
133
+ products: k,
134
+ plans: b,
135
+ currentSubscription: B,
139
136
  currentLoading: w,
140
137
  listLoading: q,
141
138
  billingInterval: j,
@@ -156,10 +153,10 @@ const ye = /* @__PURE__ */ K({
156
153
  getFeatureGroups: E,
157
154
  loadCurrentSubscription: N,
158
155
  refresh: ie
159
- } = ve(h.defaultInterval), _ = d(() => {
156
+ } = fe(y.defaultInterval), _ = d(() => {
160
157
  var a;
161
- if (!b.value)
162
- for (const r of y.value) {
158
+ if (!B.value)
159
+ for (const r of k.value) {
163
160
  const g = r.prices.find((e) => e.type === "free");
164
161
  if (g)
165
162
  return {
@@ -168,11 +165,11 @@ const ye = /* @__PURE__ */ K({
168
165
  selectedPrice: g
169
166
  };
170
167
  }
171
- }), B = d(() => k.value.filter((a) => !W(a))), Q = d(() => !!localStorage.getItem("jwtToken")), C = d(() => !!U.value), I = d(() => Q.value && w.value && !C.value), V = d(() => C.value || I.value), {
168
+ }), h = d(() => b.value.filter((a) => !W(a))), Q = d(() => !!localStorage.getItem("jwtToken")), C = d(() => !!U.value), I = d(() => Q.value && w.value && !C.value), V = d(() => C.value || I.value), {
172
169
  checkout: ne,
173
170
  isCheckingOut: se
174
171
  } = pe({
175
- currentSubscription: b,
172
+ currentSubscription: B,
176
173
  refreshCurrentSubscription: N
177
174
  }), {
178
175
  ensureAuthenticated: le
@@ -202,49 +199,54 @@ const ye = /* @__PURE__ */ K({
202
199
  ie();
203
200
  }), (a, r) => {
204
201
  const g = _e("motion-slide-top");
205
- return i(), n("section", ke, [de((i(), O(t(me), {
202
+ return i(), n("section", ke, [de((i(), O(t(ve), {
206
203
  loading: t(q),
207
204
  tip: "数据加载中",
208
205
  class: "PricingPlans__spin"
209
206
  }, {
210
- default: v(() => [_.value ? (i(), n("article", {
207
+ default: p(() => [_.value ? (i(), n("article", {
211
208
  key: 0,
212
- class: p(["PricingPlans__trial", {
209
+ class: f(["PricingPlans__trial", {
213
210
  "is-current": t(T)(_.value)
214
211
  }])
215
- }, [s("div", be, [s("div", Be, [s("h2", null, l(_.value.name), 1), s("p", null, l(re(_.value)), 1), $(_.value).length ? (i(), n("ul", Ce, [(i(!0), n(P, null, f($(_.value), (e) => (i(), n("li", {
212
+ }, [s("div", be, [s("div", Be, [s("h2", null, l(_.value.name), 1), s("p", null, l(re(_.value)), 1), $(_.value).length ? (i(), n("ul", Ce, [(i(!0), n(P, null, m($(_.value), (e) => (i(), n("li", {
216
213
  key: e.title
217
- }, [m(t(M), {
214
+ }, [v(t(M), {
218
215
  icon: "mingcute:check-circle-fill",
219
216
  class: "PricingPlans__trialFeatureIcon"
220
- }), s("span", null, l(e.title), 1)]))), 128))])) : c("", !0)]), s("div", Ie, [m(t(H), {
217
+ }), s("span", null, l(e.title), 1)]))), 128))])) : c("", !0)]), s("div", Ie, [v(t(H), {
221
218
  size: "large",
222
219
  class: "PricingPlans__trialButton",
223
220
  loading: I.value,
224
221
  disabled: V.value,
225
222
  onClick: oe
226
223
  }, {
227
- default: v(() => [G(l(ce()), 1)]),
224
+ default: p(() => [G(l(ce()), 1)]),
228
225
  _: 1
229
- }, 8, ["loading", "disabled"])])])], 2)) : c("", !0), B.value.length ? (i(), n("div", Le, [t(D).length > 1 ? (i(), n("div", we, [(i(!0), n(P, null, f(t(D), (e) => (i(), n("button", {
226
+ }, 8, ["loading", "disabled"])])])], 2)) : c("", !0), h.value.length ? (i(), n("div", Le, [t(D).length > 1 ? (i(), n("div", we, [(i(!0), n(P, null, m(t(D), (e) => (i(), n("button", {
230
227
  key: e.value,
231
228
  type: "button",
232
- class: p(["PricingPlans__toggleItem", {
229
+ class: f(["PricingPlans__toggleItem", {
233
230
  "is-active": t(j) === e.value
234
231
  }]),
235
232
  onClick: (L) => t(J)(e.value)
236
- }, [s("span", null, l(e.label), 1), e.badge ? (i(), n("span", De, l(e.badge), 1)) : c("", !0)], 10, qe))), 128))])) : c("", !0), o.note ? (i(), n("p", Te, l(o.note), 1)) : c("", !0)])) : c("", !0), B.value.length ? (i(), n("div", Ae, [(i(!0), n(P, null, f(B.value, (e, L) => (i(), n("article", {
233
+ }, [s("span", null, l(e.label), 1), e.badge ? (i(), n("span", De, l(e.badge), 1)) : c("", !0)], 10, qe))), 128))])) : c("", !0), o.note ? (i(), n("p", Te, l(o.note), 1)) : c("", !0)])) : c("", !0), h.value.length ? (i(), n("div", {
234
+ key: 2,
235
+ class: f(["PricingPlans__grid", {
236
+ "PricingPlans__grid--compact": h.value.length <= 2
237
+ }])
238
+ }, [(i(!0), n(P, null, m(h.value, (e, L) => (i(), n("article", {
237
239
  key: e.id,
238
- class: p(["PricingPlans__card", {
240
+ class: f(["PricingPlans__card", {
239
241
  "is-recommended": t(A)(e),
240
242
  "is-current": t(T)(e)
241
243
  }])
242
- }, [s("div", Fe, [(i(!0), n(P, null, f(t(ee)(e), (u) => (i(), n("span", {
244
+ }, [s("div", Ae, [(i(!0), n(P, null, m(t(ee)(e), (u) => (i(), n("span", {
243
245
  key: u.type,
244
- class: p(["PricingPlans__badge", `is-${u.type}`])
245
- }, l(u.label), 3))), 128))]), s("div", Se, [s("h2", null, l(e.name), 1), s("p", null, l(e.description || ae(L)), 1)]), s("div", xe, [t(F)(e) ? (i(), n("span", Ee, " ¥" + l(t(F)(e)), 1)) : c("", !0), r[0] || (r[0] = s("span", {
246
+ class: f(["PricingPlans__badge", `is-${u.type}`])
247
+ }, l(u.label), 3))), 128))]), s("div", Fe, [s("h2", null, l(e.name), 1), s("p", null, l(e.description || ae(L)), 1)]), s("div", Se, [t(F)(e) ? (i(), n("span", xe, " ¥" + l(t(F)(e)), 1)) : c("", !0), r[0] || (r[0] = s("span", {
246
248
  class: "PricingPlans__currency"
247
- }, "¥", -1)), s("span", Ne, l(t(Y)(e)), 1), s("span", Qe, l(t(Z)(e)), 1)]), t(S)(e) ? (i(), n("p", Ve, l(t(S)(e)), 1)) : c("", !0), s("p", $e, l(t(x)(e, L)), 1), m(t(H), {
249
+ }, "¥", -1)), s("span", Ee, l(t(Y)(e)), 1), s("span", Ne, l(t(Z)(e)), 1)]), t(S)(e) ? (i(), n("p", Qe, l(t(S)(e)), 1)) : c("", !0), s("p", Ve, l(t(x)(e, L)), 1), v(t(H), {
248
250
  long: "",
249
251
  size: "large",
250
252
  class: "PricingPlans__button",
@@ -253,25 +255,25 @@ const ye = /* @__PURE__ */ K({
253
255
  disabled: t(X)(e),
254
256
  onClick: (u) => t(ne)(e)
255
257
  }, {
256
- default: v(() => [G(l(t(te)(e)), 1)]),
258
+ default: p(() => [G(l(t(te)(e)), 1)]),
257
259
  _: 2
258
260
  }, 1032, ["type", "loading", "disabled", "onClick"]), r[1] || (r[1] = s("div", {
259
261
  class: "PricingPlans__divider"
260
- }, null, -1)), s("div", ze, [(i(!0), n(P, null, f(t(E)(e.features), (u) => (i(), n("section", {
262
+ }, null, -1)), s("div", $e, [(i(!0), n(P, null, m(t(E)(e.features), (u) => (i(), n("section", {
261
263
  key: u.title,
262
264
  class: "PricingPlans__featureGroup"
263
- }, [s("h3", null, l(u.title), 1), s("ul", Ge, [(i(!0), n(P, null, f(u.items, (z) => (i(), n("li", {
265
+ }, [s("h3", null, l(u.title), 1), s("ul", ze, [(i(!0), n(P, null, m(u.items, (z) => (i(), n("li", {
264
266
  key: z.title
265
- }, [m(t(M), {
267
+ }, [v(t(M), {
266
268
  icon: "mingcute:check-circle-fill",
267
269
  class: "PricingPlans__featureIcon"
268
- }), s("span", null, l(z.title), 1)]))), 128))])]))), 128))])], 2))), 128))])) : !_.value && !t(q) ? (i(), n("div", He, " 当前暂无可订阅方案 ")) : c("", !0)]),
270
+ }), s("span", null, l(z.title), 1)]))), 128))])]))), 128))])], 2))), 128))], 2)) : !_.value && !t(q) ? (i(), n("div", Ge, " 当前暂无可订阅方案 ")) : c("", !0)]),
269
271
  _: 1
270
272
  }, 8, ["loading"])), [[g]])]);
271
273
  };
272
274
  }
273
- }), it = /* @__PURE__ */ R(Me, [["__scopeId", "data-v-4dedccfd"]]);
275
+ }), tt = /* @__PURE__ */ R(He, [["__scopeId", "data-v-6ca2e434"]]);
274
276
  export {
275
- tt as P,
276
- it as a
277
+ et as P,
278
+ tt as a
277
279
  };
package/dist/main.js CHANGED
@@ -37,7 +37,7 @@ import { C as J7, a as Q7 } from "./CollapseItem-DUzZA6tx.js";
37
37
  import { C as X7, E as e5 } from "./CustomTable-BUkwlbzN.js";
38
38
  import { M as o5, a as s5 } from "./Menu-Cy2ZPeaz.js";
39
39
  import { P as i5, u as n5 } from "./PaySubscriptions-DS4kJNb_.js";
40
- import { P as c5, a as l5 } from "./PricingPlans-B7lJ8lYV.js";
40
+ import { P as c5, a as l5 } from "./PricingPlans-CfW_mv5_.js";
41
41
  import { R as d5 } from "./ReferrerReferees-DhS91Ulf.js";
42
42
  import { _ as f5 } from "./Upload.vue_vue_type_script_setup_true_lang-DOHui-lA.js";
43
43
  import { U as h5, a as _5, b as g5, c as m5, d as L5, _ as y5, e as w5, f as F5, g as M5, h as k5, i as v5, j as x5, k as H5, l as Z5, m as V5 } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-9cF5hBYc.js";
package/dist/pay.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { P as a, u as r } from "./PaySubscriptions-DS4kJNb_.js";
2
- import { P as u, a as n } from "./PricingPlans-B7lJ8lYV.js";
2
+ import { P as u, a as n } from "./PricingPlans-CfW_mv5_.js";
3
3
  import { u as t, a as P } from "./useSubscriptionCheckout-DNLuRGmx.js";
4
4
  export {
5
5
  a as PaySubscriptions,