vue-amazing-ui 0.0.8 → 0.0.9
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/README.md +33 -0
- package/dist/style.css +1 -1
- package/dist/vue-amazing-ui.js +176 -45
- package/dist/vue-amazing-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,14 @@ npm install vue-amazing-ui
|
|
|
7
7
|
或:yarn add vue-amazing-ui
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
+
## 已有组件
|
|
11
|
+
|
|
12
|
+
组件名 | 说明
|
|
13
|
+
:--- | :---
|
|
14
|
+
Breadcrumb | 面包屑
|
|
15
|
+
Countdown | 倒计时
|
|
16
|
+
Pagination | 分页器
|
|
17
|
+
|
|
10
18
|
## 引入并注册插件
|
|
11
19
|
|
|
12
20
|
```
|
|
@@ -27,4 +35,29 @@ app.use(Breadcrumb)
|
|
|
27
35
|
|
|
28
36
|
```
|
|
29
37
|
<Breadcrumb :routes="routes" :height="60" />
|
|
38
|
+
|
|
39
|
+
<Pagination
|
|
40
|
+
@change="changePage"
|
|
41
|
+
:current="pagination.p"
|
|
42
|
+
:pageSize="pagination.pageSize"
|
|
43
|
+
:total="total"
|
|
44
|
+
:hideOnSinglePage="hideOnSinglePage"
|
|
45
|
+
:showQuickJumper="true"
|
|
46
|
+
:showTotal="true"
|
|
47
|
+
placement="center"/>
|
|
48
|
+
|
|
49
|
+
<Video
|
|
50
|
+
v-show="true"
|
|
51
|
+
:videoUrl="videoUrl"
|
|
52
|
+
:videoCover="videoCover"
|
|
53
|
+
:width="800"
|
|
54
|
+
:height="450"
|
|
55
|
+
:autoplay="true"
|
|
56
|
+
:controls="true"
|
|
57
|
+
:loop="false"
|
|
58
|
+
:muted="false"
|
|
59
|
+
preload="auto"
|
|
60
|
+
:showPlay="true"
|
|
61
|
+
:playWidth="96"
|
|
62
|
+
zoom="cotain"/>
|
|
30
63
|
```
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-pagination[data-v-0b4fe0d6]{margin:16px 0}.hidden[data-v-0b4fe0d6]{display:none}.left[data-v-0b4fe0d6]{text-align:left}.center[data-v-0b4fe0d6]{text-align:center}.right[data-v-0b4fe0d6]{text-align:right}.m-pagination-wrap[data-v-0b4fe0d6]{display:inline-block;height:32px;line-height:30px;font-size:14px;color:#000000a6;text-align:center}.m-pagination-wrap .mr8[data-v-0b4fe0d6]{margin-right:8px}.m-pagination-wrap .u-item[data-v-0b4fe0d6]{min-width:30px;height:30px;display:inline-block;user-select:none;border:1px solid #d9d9d9;border-radius:4px;cursor:pointer;transition:all .3s}.m-pagination-wrap .u-item[data-v-0b4fe0d6]:hover{font-weight:500;color:#1890ff;border-color:#1890ff}.m-pagination-wrap .u-item:hover .u-arrow[data-v-0b4fe0d6]{fill:#1890ff}.m-pagination-wrap .u-item .u-arrow[data-v-0b4fe0d6]{fill:#000000a6;width:12px;height:12px;transition:all .3s}.m-pagination-wrap .u-item[data-v-0b4fe0d6]:not(:last-child){margin-right:8px}.m-pagination-wrap .active[data-v-0b4fe0d6]{font-weight:500;color:#1890ff;border-color:#1890ff}.m-pagination-wrap .active .u-arrow[data-v-0b4fe0d6]{fill:#1890ff}.m-pagination-wrap .disabled[data-v-0b4fe0d6]{color:#00000040;background:#fff;border-color:#d9d9d9;cursor:not-allowed}.m-pagination-wrap .disabled[data-v-0b4fe0d6]:hover{font-weight:400;color:#000000a6;border-color:#d9d9d9}.m-pagination-wrap .disabled:hover .u-arrow[data-v-0b4fe0d6],.m-pagination-wrap .disabled .u-arrow[data-v-0b4fe0d6]{fill:#00000040}.m-pagination-wrap .m-arrow[data-v-0b4fe0d6]{display:inline-block;vertical-align:middle;margin-right:8px;min-width:32px;height:32px;letter-spacing:2px;font-size:12px;color:#00000040;transition:all .3s;cursor:pointer}.m-pagination-wrap .m-arrow .u-ellipsis[data-v-0b4fe0d6]{transition:all .3s}.m-pagination-wrap .m-arrow .u-icon[data-v-0b4fe0d6]{fill:#1890ff;width:12px;height:12px}.m-pagination-wrap .u-jump-page[data-v-0b4fe0d6]{margin-left:8px;line-height:32px;font-size:14px;color:#000000a6}.m-pagination-wrap .u-jump-page input[data-v-0b4fe0d6]{vertical-align:top;width:26px;height:20px;padding:5px 11px;margin:0 8px;border:1px solid #d9d9d9;border-radius:4px;background:transparent;text-align:left;outline:none;transition:all .3s}.m-pagination-wrap .u-jump-page input[data-v-0b4fe0d6]:hover{border-color:#1890ff}.m-pagination-wrap .u-jump-page input[data-v-0b4fe0d6]:focus{border-color:#1890ff;box-shadow:0 0 0 2px #1890ff33}.m-breadcrumb .m-bread[data-v-574bc864]{display:inline-block;vertical-align:middle}.m-breadcrumb .m-bread .u-route[data-v-574bc864]{height:22px;font-size:16px;font-weight:400;line-height:22px;color:#333;display:inline-block;vertical-align:middle;max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.m-breadcrumb .m-bread .u-route[data-v-574bc864]:hover{color:#1890ff}.m-breadcrumb .m-bread .active[data-v-574bc864]{color:#1890ff;cursor:default}.m-breadcrumb .m-bread .u-separator[data-v-574bc864]{display:inline-block;vertical-align:middle;margin:0 6px}.m-breadcrumb .m-bread .u-arrow[data-v-574bc864]{display:inline-block;vertical-align:middle;margin:0 5px;width:12px;height:12px}.m-breadcrumb .assist[data-v-574bc864]{height:100%;width:0;display:inline-block;vertical-align:middle}.m-countdown[data-v-
|
|
1
|
+
.m-pagination[data-v-0b4fe0d6]{margin:16px 0}.hidden[data-v-0b4fe0d6]{display:none}.left[data-v-0b4fe0d6]{text-align:left}.center[data-v-0b4fe0d6]{text-align:center}.right[data-v-0b4fe0d6]{text-align:right}.m-pagination-wrap[data-v-0b4fe0d6]{display:inline-block;height:32px;line-height:30px;font-size:14px;color:#000000a6;text-align:center}.m-pagination-wrap .mr8[data-v-0b4fe0d6]{margin-right:8px}.m-pagination-wrap .u-item[data-v-0b4fe0d6]{min-width:30px;height:30px;display:inline-block;user-select:none;border:1px solid #d9d9d9;border-radius:4px;cursor:pointer;transition:all .3s}.m-pagination-wrap .u-item[data-v-0b4fe0d6]:hover{font-weight:500;color:#1890ff;border-color:#1890ff}.m-pagination-wrap .u-item:hover .u-arrow[data-v-0b4fe0d6]{fill:#1890ff}.m-pagination-wrap .u-item .u-arrow[data-v-0b4fe0d6]{fill:#000000a6;width:12px;height:12px;transition:all .3s}.m-pagination-wrap .u-item[data-v-0b4fe0d6]:not(:last-child){margin-right:8px}.m-pagination-wrap .active[data-v-0b4fe0d6]{font-weight:500;color:#1890ff;border-color:#1890ff}.m-pagination-wrap .active .u-arrow[data-v-0b4fe0d6]{fill:#1890ff}.m-pagination-wrap .disabled[data-v-0b4fe0d6]{color:#00000040;background:#fff;border-color:#d9d9d9;cursor:not-allowed}.m-pagination-wrap .disabled[data-v-0b4fe0d6]:hover{font-weight:400;color:#000000a6;border-color:#d9d9d9}.m-pagination-wrap .disabled:hover .u-arrow[data-v-0b4fe0d6],.m-pagination-wrap .disabled .u-arrow[data-v-0b4fe0d6]{fill:#00000040}.m-pagination-wrap .m-arrow[data-v-0b4fe0d6]{display:inline-block;vertical-align:middle;margin-right:8px;min-width:32px;height:32px;letter-spacing:2px;font-size:12px;color:#00000040;transition:all .3s;cursor:pointer}.m-pagination-wrap .m-arrow .u-ellipsis[data-v-0b4fe0d6]{transition:all .3s}.m-pagination-wrap .m-arrow .u-icon[data-v-0b4fe0d6]{fill:#1890ff;width:12px;height:12px}.m-pagination-wrap .u-jump-page[data-v-0b4fe0d6]{margin-left:8px;line-height:32px;font-size:14px;color:#000000a6}.m-pagination-wrap .u-jump-page input[data-v-0b4fe0d6]{vertical-align:top;width:26px;height:20px;padding:5px 11px;margin:0 8px;border:1px solid #d9d9d9;border-radius:4px;background:transparent;text-align:left;outline:none;transition:all .3s}.m-pagination-wrap .u-jump-page input[data-v-0b4fe0d6]:hover{border-color:#1890ff}.m-pagination-wrap .u-jump-page input[data-v-0b4fe0d6]:focus{border-color:#1890ff;box-shadow:0 0 0 2px #1890ff33}.m-breadcrumb .m-bread[data-v-574bc864]{display:inline-block;vertical-align:middle}.m-breadcrumb .m-bread .u-route[data-v-574bc864]{height:22px;font-size:16px;font-weight:400;line-height:22px;color:#333;display:inline-block;vertical-align:middle;max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.m-breadcrumb .m-bread .u-route[data-v-574bc864]:hover{color:#1890ff}.m-breadcrumb .m-bread .active[data-v-574bc864]{color:#1890ff;cursor:default}.m-breadcrumb .m-bread .u-separator[data-v-574bc864]{display:inline-block;vertical-align:middle;margin:0 6px}.m-breadcrumb .m-bread .u-arrow[data-v-574bc864]{display:inline-block;vertical-align:middle;margin:0 5px;width:12px;height:12px}.m-breadcrumb .assist[data-v-574bc864]{height:100%;width:0;display:inline-block;vertical-align:middle}.m-countdown[data-v-203f9659]{display:inline-block}.m-countdown .u-title[data-v-203f9659]{margin-bottom:4px;color:#00000073;font-size:14px}.m-countdown .u-time[data-v-203f9659]{color:#000000d9;font-size:24px;line-height:1.5}.m-video[data-v-19a2828d]{display:inline-block;position:relative;background:#000;cursor:pointer}.m-video:hover .u-play[data-v-19a2828d]{opacity:.9}.m-video .u-play[data-v-19a2828d]{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;fill:none;color:#fff;pointer-events:none;opacity:.7;transition:opacity .3s}.m-video .hidden[data-v-19a2828d]{display:none}
|
package/dist/vue-amazing-ui.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, unref, createCommentVNode, withDirectives, vShow, Fragment, renderList, createTextVNode, vModelText, pushScopeId, popScopeId, normalizeStyle, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, unref, createCommentVNode, withDirectives, vShow, Fragment, renderList, createTextVNode, vModelText, pushScopeId, popScopeId, normalizeStyle, renderSlot, onUnmounted, withModifiers } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
|
-
const _withScopeId$
|
|
4
|
-
const _hoisted_1$
|
|
5
|
-
const _hoisted_2$
|
|
3
|
+
const _withScopeId$2 = (n) => (pushScopeId("data-v-0b4fe0d6"), n = n(), popScopeId(), n);
|
|
4
|
+
const _hoisted_1$3 = { class: "m-pagination-wrap" };
|
|
5
|
+
const _hoisted_2$3 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "mr8"
|
|
8
8
|
};
|
|
9
|
-
const _hoisted_3$
|
|
9
|
+
const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
10
10
|
class: "u-arrow",
|
|
11
11
|
viewBox: "64 64 896 896",
|
|
12
12
|
"data-icon": "left",
|
|
@@ -15,8 +15,8 @@ const _hoisted_3$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
|
|
|
15
15
|
}, [
|
|
16
16
|
/* @__PURE__ */ createElementVNode("path", { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" })
|
|
17
17
|
], -1));
|
|
18
|
-
const _hoisted_4$
|
|
19
|
-
_hoisted_3$
|
|
18
|
+
const _hoisted_4$3 = [
|
|
19
|
+
_hoisted_3$3
|
|
20
20
|
];
|
|
21
21
|
const _hoisted_5$1 = { class: "u-ellipsis" };
|
|
22
22
|
const _hoisted_6$1 = {
|
|
@@ -26,7 +26,7 @@ const _hoisted_6$1 = {
|
|
|
26
26
|
"aria-hidden": "true",
|
|
27
27
|
focusable: "false"
|
|
28
28
|
};
|
|
29
|
-
const _hoisted_7 = /* @__PURE__ */ _withScopeId$
|
|
29
|
+
const _hoisted_7 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("path", { d: "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 0 0 0 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 0 0 0 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" }, null, -1));
|
|
30
30
|
const _hoisted_8 = [
|
|
31
31
|
_hoisted_7
|
|
32
32
|
];
|
|
@@ -39,11 +39,11 @@ const _hoisted_11 = {
|
|
|
39
39
|
"aria-hidden": "true",
|
|
40
40
|
focusable: "false"
|
|
41
41
|
};
|
|
42
|
-
const _hoisted_12 = /* @__PURE__ */ _withScopeId$
|
|
42
|
+
const _hoisted_12 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("path", { d: "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 0 0 188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 0 0 492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" }, null, -1));
|
|
43
43
|
const _hoisted_13 = [
|
|
44
44
|
_hoisted_12
|
|
45
45
|
];
|
|
46
|
-
const _hoisted_14 = /* @__PURE__ */ _withScopeId$
|
|
46
|
+
const _hoisted_14 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47
47
|
class: "u-arrow",
|
|
48
48
|
viewBox: "64 64 896 896",
|
|
49
49
|
"data-icon": "right",
|
|
@@ -59,7 +59,7 @@ const _hoisted_16 = {
|
|
|
59
59
|
key: 1,
|
|
60
60
|
class: "u-jump-page"
|
|
61
61
|
};
|
|
62
|
-
const _sfc_main$
|
|
62
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
63
63
|
__name: "Pagination",
|
|
64
64
|
props: {
|
|
65
65
|
current: { default: 1 },
|
|
@@ -164,12 +164,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
164
164
|
return openBlock(), createElementBlock("div", {
|
|
165
165
|
class: normalizeClass([`m-pagination ${__props.placement}`, { hidden: __props.hideOnSinglePage && __props.total <= __props.pageSize }])
|
|
166
166
|
}, [
|
|
167
|
-
createElementVNode("div", _hoisted_1$
|
|
168
|
-
__props.showTotal ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
167
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
168
|
+
__props.showTotal ? (openBlock(), createElementBlock("span", _hoisted_2$3, "共 " + toDisplayString(unref(totalPage)) + " 页 / " + toDisplayString(__props.total) + " 条", 1)) : createCommentVNode("", true),
|
|
169
169
|
createElementVNode("span", {
|
|
170
170
|
class: normalizeClass(["u-item", { disabled: currentPage.value === 1 }]),
|
|
171
171
|
onClick: _cache[0] || (_cache[0] = ($event) => changePage(currentPage.value - 1))
|
|
172
|
-
}, _hoisted_4$
|
|
172
|
+
}, _hoisted_4$3, 2),
|
|
173
173
|
createElementVNode("span", {
|
|
174
174
|
class: normalizeClass(["u-item", { active: currentPage.value === 1 }]),
|
|
175
175
|
onClick: _cache[1] || (_cache[1] = ($event) => changePage(1))
|
|
@@ -246,17 +246,17 @@ const _export_sfc = (sfc, props) => {
|
|
|
246
246
|
}
|
|
247
247
|
return target;
|
|
248
248
|
};
|
|
249
|
-
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
249
|
+
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-0b4fe0d6"]]);
|
|
250
250
|
Pagination.install = (app) => {
|
|
251
251
|
app.component(Pagination.__name, Pagination);
|
|
252
252
|
};
|
|
253
|
-
const _withScopeId = (n) => (pushScopeId("data-v-574bc864"), n = n(), popScopeId(), n);
|
|
254
|
-
const _hoisted_1$
|
|
255
|
-
const _hoisted_2$
|
|
253
|
+
const _withScopeId$1 = (n) => (pushScopeId("data-v-574bc864"), n = n(), popScopeId(), n);
|
|
254
|
+
const _hoisted_1$2 = ["onClick", "title"];
|
|
255
|
+
const _hoisted_2$2 = {
|
|
256
256
|
key: 0,
|
|
257
257
|
class: "u-separator"
|
|
258
258
|
};
|
|
259
|
-
const _hoisted_3$
|
|
259
|
+
const _hoisted_3$2 = {
|
|
260
260
|
key: 1,
|
|
261
261
|
class: "u-arrow",
|
|
262
262
|
viewBox: "64 64 896 896",
|
|
@@ -264,12 +264,12 @@ const _hoisted_3$1 = {
|
|
|
264
264
|
"aria-hidden": "true",
|
|
265
265
|
focusable: "false"
|
|
266
266
|
};
|
|
267
|
-
const _hoisted_4$
|
|
267
|
+
const _hoisted_4$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("path", { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z" }, null, -1));
|
|
268
268
|
const _hoisted_5 = [
|
|
269
|
-
_hoisted_4$
|
|
269
|
+
_hoisted_4$2
|
|
270
270
|
];
|
|
271
|
-
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "assist" }, null, -1));
|
|
272
|
-
const _sfc_main$
|
|
271
|
+
const _hoisted_6 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "assist" }, null, -1));
|
|
272
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
273
273
|
__name: "Breadcrumb",
|
|
274
274
|
props: {
|
|
275
275
|
routes: { default: () => [] },
|
|
@@ -299,9 +299,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
299
299
|
class: normalizeClass(["u-route", { active: index === unref(len) - 1 }]),
|
|
300
300
|
onClick: ($event) => index === unref(len) - 1 ? (e) => e.preventDefault() : goRouter(route),
|
|
301
301
|
title: route.name
|
|
302
|
-
}, toDisplayString(route.name || "--"), 11, _hoisted_1$
|
|
302
|
+
}, toDisplayString(route.name || "--"), 11, _hoisted_1$2),
|
|
303
303
|
index !== unref(len) - 1 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
304
|
-
__props.separator ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
304
|
+
__props.separator ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(__props.separator), 1)) : (openBlock(), createElementBlock("svg", _hoisted_3$2, _hoisted_5))
|
|
305
305
|
], 64)) : createCommentVNode("", true)
|
|
306
306
|
]);
|
|
307
307
|
}), 128)),
|
|
@@ -311,15 +311,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
313
|
const Breadcrumb_vue_vue_type_style_index_0_scoped_574bc864_lang = "";
|
|
314
|
-
const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
314
|
+
const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-574bc864"]]);
|
|
315
315
|
Breadcrumb.install = (app) => {
|
|
316
316
|
app.component(Breadcrumb.__name, Breadcrumb);
|
|
317
317
|
};
|
|
318
|
-
const _hoisted_1 = { class: "m-countdown" };
|
|
319
|
-
const _hoisted_2 = { class: "u-title" };
|
|
320
|
-
const _hoisted_3 = { class: "u-time" };
|
|
321
|
-
const _hoisted_4 = { key: 2 };
|
|
322
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
318
|
+
const _hoisted_1$1 = { class: "m-countdown" };
|
|
319
|
+
const _hoisted_2$1 = { class: "u-title" };
|
|
320
|
+
const _hoisted_3$1 = { class: "u-time" };
|
|
321
|
+
const _hoisted_4$1 = { key: 2 };
|
|
322
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
323
323
|
__name: "Countdown",
|
|
324
324
|
props: {
|
|
325
325
|
countdown: { default: 0 },
|
|
@@ -351,20 +351,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
351
351
|
}
|
|
352
352
|
if (showTime2.includes("H")) {
|
|
353
353
|
m = m % 60;
|
|
354
|
-
var
|
|
354
|
+
var H = Math.floor((time - s - m * 60) / 60 / 60);
|
|
355
355
|
} else {
|
|
356
|
-
var
|
|
356
|
+
var H = 0;
|
|
357
357
|
}
|
|
358
358
|
if (showTime2.includes("D")) {
|
|
359
|
-
|
|
360
|
-
var
|
|
359
|
+
H = H % 24;
|
|
360
|
+
var D = Math.floor((time - s - m * 60 - H * 60 * 60) / 60 / 60 / 24);
|
|
361
361
|
} else {
|
|
362
|
-
var
|
|
362
|
+
var D = 0;
|
|
363
|
+
}
|
|
364
|
+
if (showTime2.includes("M")) {
|
|
365
|
+
D = D % 30;
|
|
366
|
+
var M = Math.floor((time - s - m * 60 - H * 60 * 60 - D * 24 * 60 * 60) / 60 / 60 / 24 / 30);
|
|
367
|
+
} else {
|
|
368
|
+
var M = 0;
|
|
369
|
+
}
|
|
370
|
+
if (showTime2.includes("Y")) {
|
|
371
|
+
M = M % 12;
|
|
372
|
+
var Y = Math.floor((time - s - m * 60 - H * 60 * 60 - D * 24 * 60 * 60 - M * 30 * 24 * 60 * 60) / 60 / 60 / 24 / 30 / 12);
|
|
373
|
+
} else {
|
|
374
|
+
var Y = 0;
|
|
363
375
|
}
|
|
364
376
|
showTime2 = showTime2.includes("ss") ? showTime2.replace("ss", fixedTwo(s)) : showTime2.replace("s", String(s));
|
|
365
377
|
showTime2 = showTime2.includes("mm") ? showTime2.replace("mm", fixedTwo(m)) : showTime2.replace("m", String(m));
|
|
366
|
-
showTime2 = showTime2.includes("HH") ? showTime2.replace("HH", fixedTwo(
|
|
367
|
-
showTime2 = showTime2.includes("DD") ? showTime2.replace("DD", fixedTwo(
|
|
378
|
+
showTime2 = showTime2.includes("HH") ? showTime2.replace("HH", fixedTwo(H)) : showTime2.replace("H", String(H));
|
|
379
|
+
showTime2 = showTime2.includes("DD") ? showTime2.replace("DD", fixedTwo(D)) : showTime2.replace("D", String(D));
|
|
380
|
+
showTime2 = showTime2.includes("MM") ? showTime2.replace("MM", fixedTwo(M)) : showTime2.replace("M", String(M));
|
|
381
|
+
showTime2 = showTime2.includes("YY") ? showTime2.replace("YY", fixedTwo(Y)) : showTime2.replace("Y", String(Y));
|
|
368
382
|
return showTime2;
|
|
369
383
|
}
|
|
370
384
|
const showTime = computed(() => {
|
|
@@ -381,20 +395,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
381
395
|
}, 1e3);
|
|
382
396
|
}
|
|
383
397
|
onMounted(() => {
|
|
398
|
+
if (restTime.value > Date.now()) {
|
|
399
|
+
restTime.value = Math.floor((restTime.value - Date.now()) / 1e3);
|
|
400
|
+
}
|
|
384
401
|
CountDown(restTime);
|
|
385
402
|
});
|
|
386
403
|
return (_ctx, _cache) => {
|
|
387
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
404
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
388
405
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
389
|
-
createElementVNode("p", _hoisted_2, toDisplayString(props.title), 1)
|
|
406
|
+
createElementVNode("p", _hoisted_2$1, toDisplayString(props.title), 1)
|
|
390
407
|
], true),
|
|
391
|
-
createElementVNode("div", _hoisted_3, [
|
|
408
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
392
409
|
restTime.value > 0 ? renderSlot(_ctx.$slots, "prefix", { key: 0 }, () => [
|
|
393
410
|
createTextVNode(toDisplayString(__props.prefix), 1)
|
|
394
411
|
], true) : createCommentVNode("", true),
|
|
395
412
|
__props.finishedText && restTime.value === 0 ? renderSlot(_ctx.$slots, "finish", { key: 1 }, () => [
|
|
396
413
|
createTextVNode(toDisplayString(__props.finishedText), 1)
|
|
397
|
-
], true) : (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(unref(showTime)), 1)),
|
|
414
|
+
], true) : (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(unref(showTime)), 1)),
|
|
398
415
|
restTime.value > 0 ? renderSlot(_ctx.$slots, "suffix", { key: 3 }, () => [
|
|
399
416
|
createTextVNode(toDisplayString(__props.suffix), 1)
|
|
400
417
|
], true) : createCommentVNode("", true)
|
|
@@ -403,15 +420,128 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
403
420
|
};
|
|
404
421
|
}
|
|
405
422
|
});
|
|
406
|
-
const
|
|
407
|
-
const Countdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
423
|
+
const Countdown_vue_vue_type_style_index_0_scoped_203f9659_lang = "";
|
|
424
|
+
const Countdown = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-203f9659"]]);
|
|
408
425
|
Countdown.install = (app) => {
|
|
409
426
|
app.component(Countdown.__name, Countdown);
|
|
410
427
|
};
|
|
428
|
+
const _withScopeId = (n) => (pushScopeId("data-v-19a2828d"), n = n(), popScopeId(), n);
|
|
429
|
+
const _hoisted_1 = ["src", "poster", "width", "height", "autoplay", "controls", "loop", "muted", "preload", "onClickOnce"];
|
|
430
|
+
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("path", {
|
|
431
|
+
stroke: "currentColor",
|
|
432
|
+
"stroke-linecap": "round",
|
|
433
|
+
"stroke-linejoin": "round",
|
|
434
|
+
"stroke-width": "1.5",
|
|
435
|
+
d: "M4.75 6.75C4.75 5.64543 5.64543 4.75 6.75 4.75H17.25C18.3546 4.75 19.25 5.64543 19.25 6.75V17.25C19.25 18.3546 18.3546 19.25 17.25 19.25H6.75C5.64543 19.25 4.75 18.3546 4.75 17.25V6.75Z"
|
|
436
|
+
}, null, -1));
|
|
437
|
+
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("path", {
|
|
438
|
+
stroke: "currentColor",
|
|
439
|
+
"stroke-linecap": "round",
|
|
440
|
+
"stroke-linejoin": "round",
|
|
441
|
+
"stroke-width": "1.5",
|
|
442
|
+
d: "M15.25 12L9.75 8.75V15.25L15.25 12Z"
|
|
443
|
+
}, null, -1));
|
|
444
|
+
const _hoisted_4 = [
|
|
445
|
+
_hoisted_2,
|
|
446
|
+
_hoisted_3
|
|
447
|
+
];
|
|
448
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
449
|
+
__name: "Video",
|
|
450
|
+
props: {
|
|
451
|
+
videoUrl: { default: "" },
|
|
452
|
+
videoCover: { default: "" },
|
|
453
|
+
width: { default: 800 },
|
|
454
|
+
height: { default: 450 },
|
|
455
|
+
autoplay: { type: Boolean, default: false },
|
|
456
|
+
controls: { type: Boolean, default: true },
|
|
457
|
+
loop: { type: Boolean, default: false },
|
|
458
|
+
muted: { type: Boolean, default: false },
|
|
459
|
+
preload: { default: "auto" },
|
|
460
|
+
showPlay: { type: Boolean, default: false },
|
|
461
|
+
playWidth: { default: 96 },
|
|
462
|
+
zoom: { default: "none" }
|
|
463
|
+
},
|
|
464
|
+
setup(__props) {
|
|
465
|
+
const props = __props;
|
|
466
|
+
const originPlay = ref(true);
|
|
467
|
+
const vplay = ref(false);
|
|
468
|
+
const veo = ref(null);
|
|
469
|
+
function onPlay() {
|
|
470
|
+
var _a, _b;
|
|
471
|
+
console.log("click");
|
|
472
|
+
if (props.autoplay) {
|
|
473
|
+
(_a = veo.value) == null ? void 0 : _a.pause();
|
|
474
|
+
} else {
|
|
475
|
+
vplay.value = true;
|
|
476
|
+
originPlay.value = false;
|
|
477
|
+
(_b = veo.value) == null ? void 0 : _b.play();
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function onPause() {
|
|
481
|
+
vplay.value = false;
|
|
482
|
+
console.log("pause");
|
|
483
|
+
}
|
|
484
|
+
function onPlaying() {
|
|
485
|
+
vplay.value = true;
|
|
486
|
+
console.log("playing");
|
|
487
|
+
}
|
|
488
|
+
onMounted(() => {
|
|
489
|
+
var _a, _b;
|
|
490
|
+
if (props.showPlay) {
|
|
491
|
+
(_a = veo.value) == null ? void 0 : _a.addEventListener("pause", onPause);
|
|
492
|
+
(_b = veo.value) == null ? void 0 : _b.addEventListener("playing", onPlaying);
|
|
493
|
+
}
|
|
494
|
+
if (props.autoplay) {
|
|
495
|
+
vplay.value = true;
|
|
496
|
+
originPlay.value = false;
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
onUnmounted(() => {
|
|
500
|
+
var _a, _b;
|
|
501
|
+
(_a = veo.value) == null ? void 0 : _a.removeEventListener("pause", onPause);
|
|
502
|
+
(_b = veo.value) == null ? void 0 : _b.removeEventListener("playing", onPlaying);
|
|
503
|
+
});
|
|
504
|
+
return (_ctx, _cache) => {
|
|
505
|
+
return openBlock(), createElementBlock("div", {
|
|
506
|
+
class: "m-video",
|
|
507
|
+
style: normalizeStyle(`width: ${__props.width}px; height: ${__props.height}px;`)
|
|
508
|
+
}, [
|
|
509
|
+
createElementVNode("video", {
|
|
510
|
+
ref_key: "veo",
|
|
511
|
+
ref: veo,
|
|
512
|
+
style: normalizeStyle(`object-fit: ${__props.zoom};`),
|
|
513
|
+
src: __props.videoUrl,
|
|
514
|
+
poster: __props.videoCover,
|
|
515
|
+
width: __props.width,
|
|
516
|
+
height: __props.height,
|
|
517
|
+
autoplay: __props.autoplay,
|
|
518
|
+
controls: !originPlay.value && __props.controls,
|
|
519
|
+
loop: __props.loop,
|
|
520
|
+
muted: __props.autoplay || __props.muted,
|
|
521
|
+
preload: __props.preload,
|
|
522
|
+
onClickOnce: withModifiers(onPlay, ["prevent"])
|
|
523
|
+
}, " 您的浏览器不支持video标签。 ", 44, _hoisted_1),
|
|
524
|
+
withDirectives((openBlock(), createElementBlock("svg", {
|
|
525
|
+
class: normalizeClass([vplay.value ? "hidden" : "u-play"]),
|
|
526
|
+
style: normalizeStyle(`width: ${__props.playWidth}px; height: ${__props.playWidth}px;`),
|
|
527
|
+
viewBox: "0 0 24 24"
|
|
528
|
+
}, _hoisted_4, 6)), [
|
|
529
|
+
[vShow, originPlay.value || __props.showPlay]
|
|
530
|
+
])
|
|
531
|
+
], 4);
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
const Video_vue_vue_type_style_index_0_scoped_19a2828d_lang = "";
|
|
536
|
+
const Video = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-19a2828d"]]);
|
|
537
|
+
Video.install = (app) => {
|
|
538
|
+
app.component(Video.__name, Video);
|
|
539
|
+
};
|
|
411
540
|
const components = [
|
|
412
541
|
Pagination,
|
|
413
542
|
Breadcrumb,
|
|
414
|
-
Countdown
|
|
543
|
+
Countdown,
|
|
544
|
+
Video
|
|
415
545
|
];
|
|
416
546
|
console.log("components:", components);
|
|
417
547
|
const install = (app) => {
|
|
@@ -424,5 +554,6 @@ export {
|
|
|
424
554
|
Breadcrumb,
|
|
425
555
|
Countdown,
|
|
426
556
|
Pagination,
|
|
557
|
+
Video,
|
|
427
558
|
VueAmazingUI as default
|
|
428
559
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("vue-router")):"function"==typeof define&&define.amd?define(["exports","vue","vue-router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueAmazingUI={},e.Vue,e.VueRouter)}(this,(function(e,t,a){"use strict";const l=e=>(t.pushScopeId("data-v-0b4fe0d6"),e=e(),t.popScopeId(),e),n={class:"m-pagination-wrap"},o={key:0,class:"mr8"},r=[l((()=>t.createElementVNode("svg",{class:"u-arrow",viewBox:"64 64 896 896","data-icon":"left","aria-hidden":"true",focusable:"false"},[t.createElementVNode("path",{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"})],-1)))],c={class:"u-ellipsis"},s={class:"u-icon",viewBox:"64 64 896 896","data-icon":"double-left","aria-hidden":"true",focusable:"false"},i=[l((()=>t.createElementVNode("path",{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 0 0 0 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 0 0 0 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"},null,-1)))],u=["onClick"],d={class:"u-ellipsis"},p={class:"u-icon",viewBox:"64 64 896 896","data-icon":"double-right","aria-hidden":"true",focusable:"false"},m=[l((()=>t.createElementVNode("path",{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 0 0 188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 0 0 492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"},null,-1)))],f=[l((()=>t.createElementVNode("svg",{class:"u-arrow",viewBox:"64 64 896 896","data-icon":"right","aria-hidden":"true",focusable:"false"},[t.createElementVNode("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"})],-1)))],v={key:1,class:"u-jump-page"},h=(e,t)=>{const a=e.__vccOpts||e;for(const[l,n]of t)a[l]=n;return a},g=h(t.defineComponent({__name:"Pagination",props:{current:{default:1},pageSize:{default:10},total:{default:0},pageListNum:{default:5},hideOnSinglePage:{type:Boolean,default:!1},showQuickJumper:{type:Boolean,default:!1},showTotal:{type:Boolean,default:!1},placement:{default:"right"}},emits:["change"],setup(e,{emit:a}){const l=e,h=t.ref(l.current),g=t.ref(""),k=t.ref(!1),w=t.ref(!1),N=t.ref(!1),S=t.ref(!1),B=t.computed((()=>Math.ceil(l.total/l.pageSize))),V=t.computed((()=>function(e){var t=[],a=Math.floor(l.pageListNum/2),n={start:e-a,end:e+a};n.start<1&&(n.end=n.end+(1-n.start),n.start=1);n.end>B.value&&(n.start=n.start-(n.end-B.value),n.end=B.value);n.start<1&&(n.start=1);n.start>1?k.value=!0:k.value=!1;n.end<B.value?w.value=!0:w.value=!1;for(let l=n.start;l<=n.end;l++)t.push(l);return t}(h.value).filter((e=>1!==e&&e!==B.value))));function y(){h.value=h.value-l.pageListNum>0?h.value-l.pageListNum:1}function E(){h.value=h.value+l.pageListNum<B.value?h.value+l.pageListNum:B.value}function C(e){if(0===e||e===B.value+1)return!1;h.value!==e&&(h.value=e)}return t.watch(h,(e=>{a("change",{page:e,pageSize:l.pageSize})})),t.onMounted((()=>{document.onkeydown=e=>{const t=e||window.event;t&&13===t.keyCode&&g.value&&function(e){Number(e)&&(Number(e)<1&&(e=1),Number(e)>B.value&&(e=B.value),C(Number(e)));g.value=""}(g.value)}})),(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([`m-pagination ${e.placement}`,{hidden:e.hideOnSinglePage&&e.total<=e.pageSize}])},[t.createElementVNode("div",n,[e.showTotal?(t.openBlock(),t.createElementBlock("span",o,"共 "+t.toDisplayString(t.unref(B))+" 页 / "+t.toDisplayString(e.total)+" 条",1)):t.createCommentVNode("",!0),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{disabled:1===h.value}]),onClick:l[0]||(l[0]=e=>C(h.value-1))},r,2),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{active:1===h.value}]),onClick:l[1]||(l[1]=e=>C(1))},"1",2),t.withDirectives(t.createElementVNode("span",{class:"m-arrow",ref:"forward",onClick:y,onMouseenter:l[2]||(l[2]=e=>N.value=!0),onMouseleave:l[3]||(l[3]=e=>N.value=!1)},[t.withDirectives(t.createElementVNode("span",c,"•••",512),[[t.vShow,!N.value]]),t.withDirectives((t.openBlock(),t.createElementBlock("svg",s,i,512)),[[t.vShow,N.value]])],544),[[t.vShow,k.value&&t.unref(V)[0]-1>1]]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(V),((e,a)=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["u-item",{active:h.value===e}]),key:a,onClick:t=>C(e)},t.toDisplayString(e),11,u)))),128)),t.withDirectives(t.createElementVNode("span",{class:"m-arrow",ref:"backward",onClick:E,onMouseenter:l[4]||(l[4]=e=>S.value=!0),onMouseleave:l[5]||(l[5]=e=>S.value=!1)},[t.withDirectives(t.createElementVNode("span",d,"•••",512),[[t.vShow,!S.value]]),t.withDirectives((t.openBlock(),t.createElementBlock("svg",p,m,512)),[[t.vShow,S.value]])],544),[[t.vShow,w.value&&t.unref(V)[t.unref(V).length-1]+1<t.unref(B)]]),t.withDirectives(t.createElementVNode("span",{class:t.normalizeClass(["u-item",{active:h.value===t.unref(B)}]),onClick:l[6]||(l[6]=e=>C(t.unref(B)))},t.toDisplayString(t.unref(B)),3),[[t.vShow,1!==t.unref(B)]]),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{disabled:h.value===t.unref(B)}]),onClick:l[7]||(l[7]=e=>C(h.value+1))},f,2),e.showQuickJumper?(t.openBlock(),t.createElementBlock("span",v,[t.createTextVNode("跳至"),t.withDirectives(t.createElementVNode("input",{type:"text","onUpdate:modelValue":l[8]||(l[8]=e=>g.value=e)},null,512),[[t.vModelText,g.value]]),t.createTextVNode("页")])):t.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-0b4fe0d6"]]);g.install=e=>{e.component(g.__name,g)};const k=e=>(t.pushScopeId("data-v-574bc864"),e=e(),t.popScopeId(),e),w=["onClick","title"],N={key:0,class:"u-separator"},S={key:1,class:"u-arrow",viewBox:"64 64 896 896","data-icon":"right","aria-hidden":"true",focusable:"false"},B=[k((()=>t.createElementVNode("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"},null,-1)))],V=k((()=>t.createElementVNode("div",{class:"assist"},null,-1))),y=h(t.defineComponent({__name:"Breadcrumb",props:{routes:{default:()=>[]},height:{default:60},separator:{default:""}},setup(e){const l=e,n=t.computed((()=>l.routes.length)),o=a.useRouter();return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:"m-breadcrumb",style:t.normalizeStyle(`height: ${e.height}px;`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.routes,((a,l)=>(t.openBlock(),t.createElementBlock("div",{class:"m-bread",key:l},[t.createElementVNode("a",{class:t.normalizeClass(["u-route",{active:l===t.unref(n)-1}]),onClick:e=>l===t.unref(n)-1?e=>e.preventDefault():function(e){o.push({path:e.path,query:e.query||{}})}(a),title:a.name},t.toDisplayString(a.name||"--"),11,w),l!==t.unref(n)-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.separator?(t.openBlock(),t.createElementBlock("span",N,t.toDisplayString(e.separator),1)):(t.openBlock(),t.createElementBlock("svg",S,B))],64)):t.createCommentVNode("",!0)])))),128)),V],4))}}),[["__scopeId","data-v-574bc864"]]);y.install=e=>{e.component(y.__name,y)};const E={class:"m-countdown"},C={class:"u-title"},b={class:"u-time"},D={key:2},x=h(t.defineComponent({__name:"Countdown",props:{countdown:{default:0},title:{default:"Countdown"},format:{default:"HH:mm:ss"},prefix:{default:""},suffix:{default:""},finishedText:{default:""}},emits:["finish"],setup(e,{emit:a}){const l=e,n=t.ref(l.countdown);function o(e){return e<10?"0"+e:String(e)}const r=t.computed((()=>function(e){let t=l.format;if(t.includes("s"))var a=e;else a=0;if(t.includes("m")){a%=60;var n=Math.floor((e-a)/60)}else n=0;if(t.includes("H")){n%=60;var r=Math.floor((e-a-60*n)/60/60)}else r=0;if(t.includes("D")){r%=24;var c=Math.floor((e-a-60*n-60*r*60)/60/60/24)}else c=0;return t=t.includes("ss")?t.replace("ss",o(a)):t.replace("s",String(a)),t=t.includes("mm")?t.replace("mm",o(n)):t.replace("m",String(n)),t=t.includes("HH")?t.replace("HH",o(r)):t.replace("H",String(r)),t=t.includes("DD")?t.replace("DD",o(c)):t.replace("D",String(c)),t}(n.value)));function c(e){setTimeout((()=>{e.value--,e.value>0?c(e):a("finish")}),1e3)}return t.onMounted((()=>{c(n)})),(a,o)=>(t.openBlock(),t.createElementBlock("div",E,[t.renderSlot(a.$slots,"title",{},(()=>[t.createElementVNode("p",C,t.toDisplayString(l.title),1)]),!0),t.createElementVNode("div",b,[n.value>0?t.renderSlot(a.$slots,"prefix",{key:0},(()=>[t.createTextVNode(t.toDisplayString(e.prefix),1)]),!0):t.createCommentVNode("",!0),e.finishedText&&0===n.value?t.renderSlot(a.$slots,"finish",{key:1},(()=>[t.createTextVNode(t.toDisplayString(e.finishedText),1)]),!0):(t.openBlock(),t.createElementBlock("span",D,t.toDisplayString(t.unref(r)),1)),n.value>0?t.renderSlot(a.$slots,"suffix",{key:3},(()=>[t.createTextVNode(t.toDisplayString(e.suffix),1)]),!0):t.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-186d410a"]]);x.install=e=>{e.component(x.__name,x)};const _=[g,y,x],z={install:e=>{_.forEach((t=>e.component(t.__name,t)))}};e.Breadcrumb=y,e.Countdown=x,e.Pagination=g,e.default=z,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("vue-router")):"function"==typeof define&&define.amd?define(["exports","vue","vue-router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueAmazingUI={},e.Vue,e.VueRouter)}(this,(function(e,t,a){"use strict";const l=e=>(t.pushScopeId("data-v-0b4fe0d6"),e=e(),t.popScopeId(),e),o={class:"m-pagination-wrap"},n={key:0,class:"mr8"},r=[l((()=>t.createElementVNode("svg",{class:"u-arrow",viewBox:"64 64 896 896","data-icon":"left","aria-hidden":"true",focusable:"false"},[t.createElementVNode("path",{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"})],-1)))],u={class:"u-ellipsis"},i={class:"u-icon",viewBox:"64 64 896 896","data-icon":"double-left","aria-hidden":"true",focusable:"false"},s=[l((()=>t.createElementVNode("path",{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 0 0 0 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 0 0 0 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"},null,-1)))],c=["onClick"],d={class:"u-ellipsis"},p={class:"u-icon",viewBox:"64 64 896 896","data-icon":"double-right","aria-hidden":"true",focusable:"false"},v=[l((()=>t.createElementVNode("path",{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 0 0 188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 0 0 492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"},null,-1)))],m=[l((()=>t.createElementVNode("svg",{class:"u-arrow",viewBox:"64 64 896 896","data-icon":"right","aria-hidden":"true",focusable:"false"},[t.createElementVNode("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"})],-1)))],f={key:1,class:"u-jump-page"},h=(e,t)=>{const a=e.__vccOpts||e;for(const[l,o]of t)a[l]=o;return a},g=h(t.defineComponent({__name:"Pagination",props:{current:{default:1},pageSize:{default:10},total:{default:0},pageListNum:{default:5},hideOnSinglePage:{type:Boolean,default:!1},showQuickJumper:{type:Boolean,default:!1},showTotal:{type:Boolean,default:!1},placement:{default:"right"}},emits:["change"],setup(e,{emit:a}){const l=e,h=t.ref(l.current),g=t.ref(""),k=t.ref(!1),y=t.ref(!1),w=t.ref(!1),B=t.ref(!1),S=t.computed((()=>Math.ceil(l.total/l.pageSize))),E=t.computed((()=>function(e){var t=[],a=Math.floor(l.pageListNum/2),o={start:e-a,end:e+a};o.start<1&&(o.end=o.end+(1-o.start),o.start=1);o.end>S.value&&(o.start=o.start-(o.end-S.value),o.end=S.value);o.start<1&&(o.start=1);o.start>1?k.value=!0:k.value=!1;o.end<S.value?y.value=!0:y.value=!1;for(let l=o.start;l<=o.end;l++)t.push(l);return t}(h.value).filter((e=>1!==e&&e!==S.value))));function V(){h.value=h.value-l.pageListNum>0?h.value-l.pageListNum:1}function N(){h.value=h.value+l.pageListNum<S.value?h.value+l.pageListNum:S.value}function C(e){if(0===e||e===S.value+1)return!1;h.value!==e&&(h.value=e)}return t.watch(h,(e=>{a("change",{page:e,pageSize:l.pageSize})})),t.onMounted((()=>{document.onkeydown=e=>{const t=e||window.event;t&&13===t.keyCode&&g.value&&function(e){Number(e)&&(Number(e)<1&&(e=1),Number(e)>S.value&&(e=S.value),C(Number(e)));g.value=""}(g.value)}})),(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([`m-pagination ${e.placement}`,{hidden:e.hideOnSinglePage&&e.total<=e.pageSize}])},[t.createElementVNode("div",o,[e.showTotal?(t.openBlock(),t.createElementBlock("span",n,"共 "+t.toDisplayString(t.unref(S))+" 页 / "+t.toDisplayString(e.total)+" 条",1)):t.createCommentVNode("",!0),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{disabled:1===h.value}]),onClick:l[0]||(l[0]=e=>C(h.value-1))},r,2),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{active:1===h.value}]),onClick:l[1]||(l[1]=e=>C(1))},"1",2),t.withDirectives(t.createElementVNode("span",{class:"m-arrow",ref:"forward",onClick:V,onMouseenter:l[2]||(l[2]=e=>w.value=!0),onMouseleave:l[3]||(l[3]=e=>w.value=!1)},[t.withDirectives(t.createElementVNode("span",u,"•••",512),[[t.vShow,!w.value]]),t.withDirectives((t.openBlock(),t.createElementBlock("svg",i,s,512)),[[t.vShow,w.value]])],544),[[t.vShow,k.value&&t.unref(E)[0]-1>1]]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(E),((e,a)=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["u-item",{active:h.value===e}]),key:a,onClick:t=>C(e)},t.toDisplayString(e),11,c)))),128)),t.withDirectives(t.createElementVNode("span",{class:"m-arrow",ref:"backward",onClick:N,onMouseenter:l[4]||(l[4]=e=>B.value=!0),onMouseleave:l[5]||(l[5]=e=>B.value=!1)},[t.withDirectives(t.createElementVNode("span",d,"•••",512),[[t.vShow,!B.value]]),t.withDirectives((t.openBlock(),t.createElementBlock("svg",p,v,512)),[[t.vShow,B.value]])],544),[[t.vShow,y.value&&t.unref(E)[t.unref(E).length-1]+1<t.unref(S)]]),t.withDirectives(t.createElementVNode("span",{class:t.normalizeClass(["u-item",{active:h.value===t.unref(S)}]),onClick:l[6]||(l[6]=e=>C(t.unref(S)))},t.toDisplayString(t.unref(S)),3),[[t.vShow,1!==t.unref(S)]]),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{disabled:h.value===t.unref(S)}]),onClick:l[7]||(l[7]=e=>C(h.value+1))},m,2),e.showQuickJumper?(t.openBlock(),t.createElementBlock("span",f,[t.createTextVNode("跳至"),t.withDirectives(t.createElementVNode("input",{type:"text","onUpdate:modelValue":l[8]||(l[8]=e=>g.value=e)},null,512),[[t.vModelText,g.value]]),t.createTextVNode("页")])):t.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-0b4fe0d6"]]);g.install=e=>{e.component(g.__name,g)};const k=e=>(t.pushScopeId("data-v-574bc864"),e=e(),t.popScopeId(),e),y=["onClick","title"],w={key:0,class:"u-separator"},B={key:1,class:"u-arrow",viewBox:"64 64 896 896","data-icon":"right","aria-hidden":"true",focusable:"false"},S=[k((()=>t.createElementVNode("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"},null,-1)))],E=k((()=>t.createElementVNode("div",{class:"assist"},null,-1))),V=h(t.defineComponent({__name:"Breadcrumb",props:{routes:{default:()=>[]},height:{default:60},separator:{default:""}},setup(e){const l=e,o=t.computed((()=>l.routes.length)),n=a.useRouter();return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:"m-breadcrumb",style:t.normalizeStyle(`height: ${e.height}px;`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.routes,((a,l)=>(t.openBlock(),t.createElementBlock("div",{class:"m-bread",key:l},[t.createElementVNode("a",{class:t.normalizeClass(["u-route",{active:l===t.unref(o)-1}]),onClick:e=>l===t.unref(o)-1?e=>e.preventDefault():function(e){n.push({path:e.path,query:e.query||{}})}(a),title:a.name},t.toDisplayString(a.name||"--"),11,y),l!==t.unref(o)-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.separator?(t.openBlock(),t.createElementBlock("span",w,t.toDisplayString(e.separator),1)):(t.openBlock(),t.createElementBlock("svg",B,S))],64)):t.createCommentVNode("",!0)])))),128)),E],4))}}),[["__scopeId","data-v-574bc864"]]);V.install=e=>{e.component(V.__name,V)};const N={class:"m-countdown"},C={class:"u-title"},M={class:"u-time"},_={key:2},x=h(t.defineComponent({__name:"Countdown",props:{countdown:{default:0},title:{default:"Countdown"},format:{default:"HH:mm:ss"},prefix:{default:""},suffix:{default:""},finishedText:{default:""}},emits:["finish"],setup(e,{emit:a}){const l=e,o=t.ref(l.countdown);function n(e){return e<10?"0"+e:String(e)}const r=t.computed((()=>function(e){let t=l.format;if(t.includes("s"))var a=e;else a=0;if(t.includes("m")){a%=60;var o=Math.floor((e-a)/60)}else o=0;if(t.includes("H")){o%=60;var r=Math.floor((e-a-60*o)/60/60)}else r=0;if(t.includes("D")){r%=24;var u=Math.floor((e-a-60*o-60*r*60)/60/60/24)}else u=0;if(t.includes("M")){u%=30;var i=Math.floor((e-a-60*o-60*r*60-24*u*60*60)/60/60/24/30)}else i=0;if(t.includes("Y")){i%=12;var s=Math.floor((e-a-60*o-60*r*60-24*u*60*60-30*i*24*60*60)/60/60/24/30/12)}else s=0;return t=t.includes("ss")?t.replace("ss",n(a)):t.replace("s",String(a)),t=t.includes("mm")?t.replace("mm",n(o)):t.replace("m",String(o)),t=t.includes("HH")?t.replace("HH",n(r)):t.replace("H",String(r)),t=t.includes("DD")?t.replace("DD",n(u)):t.replace("D",String(u)),t=t.includes("MM")?t.replace("MM",n(i)):t.replace("M",String(i)),t=t.includes("YY")?t.replace("YY",n(s)):t.replace("Y",String(s)),t}(o.value)));function u(e){setTimeout((()=>{e.value--,e.value>0?u(e):a("finish")}),1e3)}return t.onMounted((()=>{o.value>Date.now()&&(o.value=Math.floor((o.value-Date.now())/1e3)),u(o)})),(a,n)=>(t.openBlock(),t.createElementBlock("div",N,[t.renderSlot(a.$slots,"title",{},(()=>[t.createElementVNode("p",C,t.toDisplayString(l.title),1)]),!0),t.createElementVNode("div",M,[o.value>0?t.renderSlot(a.$slots,"prefix",{key:0},(()=>[t.createTextVNode(t.toDisplayString(e.prefix),1)]),!0):t.createCommentVNode("",!0),e.finishedText&&0===o.value?t.renderSlot(a.$slots,"finish",{key:1},(()=>[t.createTextVNode(t.toDisplayString(e.finishedText),1)]),!0):(t.openBlock(),t.createElementBlock("span",_,t.toDisplayString(t.unref(r)),1)),o.value>0?t.renderSlot(a.$slots,"suffix",{key:3},(()=>[t.createTextVNode(t.toDisplayString(e.suffix),1)]),!0):t.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-203f9659"]]);x.install=e=>{e.component(x.__name,x)};const b=e=>(t.pushScopeId("data-v-19a2828d"),e=e(),t.popScopeId(),e),D=["src","poster","width","height","autoplay","controls","loop","muted","preload","onClickOnce"],z=[b((()=>t.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M4.75 6.75C4.75 5.64543 5.64543 4.75 6.75 4.75H17.25C18.3546 4.75 19.25 5.64543 19.25 6.75V17.25C19.25 18.3546 18.3546 19.25 17.25 19.25H6.75C5.64543 19.25 4.75 18.3546 4.75 17.25V6.75Z"},null,-1))),b((()=>t.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15.25 12L9.75 8.75V15.25L15.25 12Z"},null,-1)))],L=h(t.defineComponent({__name:"Video",props:{videoUrl:{default:""},videoCover:{default:""},width:{default:800},height:{default:450},autoplay:{type:Boolean,default:!1},controls:{type:Boolean,default:!0},loop:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},preload:{default:"auto"},showPlay:{type:Boolean,default:!1},playWidth:{default:96},zoom:{default:"none"}},setup(e){const a=e,l=t.ref(!0),o=t.ref(!1),n=t.ref(null);function r(){var e,t;a.autoplay?null==(e=n.value)||e.pause():(o.value=!0,l.value=!1,null==(t=n.value)||t.play())}function u(){o.value=!1}function i(){o.value=!0}return t.onMounted((()=>{var e,t;a.showPlay&&(null==(e=n.value)||e.addEventListener("pause",u),null==(t=n.value)||t.addEventListener("playing",i)),a.autoplay&&(o.value=!0,l.value=!1)})),t.onUnmounted((()=>{var e,t;null==(e=n.value)||e.removeEventListener("pause",u),null==(t=n.value)||t.removeEventListener("playing",i)})),(a,u)=>(t.openBlock(),t.createElementBlock("div",{class:"m-video",style:t.normalizeStyle(`width: ${e.width}px; height: ${e.height}px;`)},[t.createElementVNode("video",{ref_key:"veo",ref:n,style:t.normalizeStyle(`object-fit: ${e.zoom};`),src:e.videoUrl,poster:e.videoCover,width:e.width,height:e.height,autoplay:e.autoplay,controls:!l.value&&e.controls,loop:e.loop,muted:e.autoplay||e.muted,preload:e.preload,onClickOnce:t.withModifiers(r,["prevent"])}," 您的浏览器不支持video标签。 ",44,D),t.withDirectives((t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([o.value?"hidden":"u-play"]),style:t.normalizeStyle(`width: ${e.playWidth}px; height: ${e.playWidth}px;`),viewBox:"0 0 24 24"},z,6)),[[t.vShow,l.value||e.showPlay]])],4))}}),[["__scopeId","data-v-19a2828d"]]);L.install=e=>{e.component(L.__name,L)};const T=[g,V,x,L],H={install:e=>{T.forEach((t=>e.component(t.__name,t)))}};e.Breadcrumb=V,e.Countdown=x,e.Pagination=g,e.Video=L,e.default=H,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|