vue-amazing-ui 0.0.7 → 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 +440 -264
- 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-
|
|
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,170 +1,12 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, withDirectives, vShow, Fragment, renderList, createTextVNode, vModelText, pushScopeId, popScopeId,
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
current: {
|
|
7
|
-
// 当前页数
|
|
8
|
-
type: Number,
|
|
9
|
-
default: 1
|
|
10
|
-
},
|
|
11
|
-
pageSize: {
|
|
12
|
-
// 每页条数
|
|
13
|
-
type: Number,
|
|
14
|
-
default: 10
|
|
15
|
-
},
|
|
16
|
-
total: {
|
|
17
|
-
// 数据总数
|
|
18
|
-
type: Number,
|
|
19
|
-
default: 0
|
|
20
|
-
},
|
|
21
|
-
pageListNum: {
|
|
22
|
-
// 显示的页码数组长度
|
|
23
|
-
type: Number,
|
|
24
|
-
default: 5
|
|
25
|
-
},
|
|
26
|
-
hideOnSinglePage: {
|
|
27
|
-
// 只有一页时是否隐藏分页器
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false
|
|
30
|
-
},
|
|
31
|
-
showQuickJumper: {
|
|
32
|
-
// 是否可以快速跳转至某页
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: false
|
|
35
|
-
},
|
|
36
|
-
showTotal: {
|
|
37
|
-
// 是否显示当前页数和数据总量
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false
|
|
40
|
-
},
|
|
41
|
-
placement: {
|
|
42
|
-
// 分页器展示位置,靠左,居中,靠右
|
|
43
|
-
type: String,
|
|
44
|
-
default: "right"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
data() {
|
|
48
|
-
return {
|
|
49
|
-
currentPage: this.current,
|
|
50
|
-
// 当前页数
|
|
51
|
-
jumpNumber: "",
|
|
52
|
-
// 跳转的页码
|
|
53
|
-
forwardMore: false,
|
|
54
|
-
// 左省略号展示
|
|
55
|
-
backwardMore: false,
|
|
56
|
-
// 右省略号展示
|
|
57
|
-
forwardArrow: false,
|
|
58
|
-
// 左箭头展示
|
|
59
|
-
backwardArrow: false
|
|
60
|
-
// 右箭头展示
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
computed: {
|
|
64
|
-
totalPage() {
|
|
65
|
-
return Math.ceil(this.total / this.pageSize);
|
|
66
|
-
},
|
|
67
|
-
pageList() {
|
|
68
|
-
return this.dealPageList(this.currentPage).filter((n) => n !== 1 && n !== this.totalPage);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
watch: {
|
|
72
|
-
current(to) {
|
|
73
|
-
this.currentPage = to;
|
|
74
|
-
},
|
|
75
|
-
currentPage(to) {
|
|
76
|
-
console.log("change:", to);
|
|
77
|
-
this.$emit("change", {
|
|
78
|
-
page: to,
|
|
79
|
-
pageSize: this.pageSize
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
created() {
|
|
84
|
-
document.onkeydown = (e) => {
|
|
85
|
-
const ev = e || window.event;
|
|
86
|
-
if (ev && ev.keyCode === 13 && this.jumpNumber) {
|
|
87
|
-
this.jumpPage(this.jumpNumber);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
methods: {
|
|
92
|
-
dealPageList(curPage) {
|
|
93
|
-
var resList = [];
|
|
94
|
-
var offset = Math.floor(this.pageListNum / 2);
|
|
95
|
-
var pager = {
|
|
96
|
-
start: curPage - offset,
|
|
97
|
-
end: curPage + offset
|
|
98
|
-
};
|
|
99
|
-
if (pager.start < 1) {
|
|
100
|
-
pager.end = pager.end + (1 - pager.start);
|
|
101
|
-
pager.start = 1;
|
|
102
|
-
}
|
|
103
|
-
if (pager.end > this.totalPage) {
|
|
104
|
-
pager.start = pager.start - (pager.end - this.totalPage);
|
|
105
|
-
pager.end = this.totalPage;
|
|
106
|
-
}
|
|
107
|
-
if (pager.start < 1) {
|
|
108
|
-
pager.start = 1;
|
|
109
|
-
}
|
|
110
|
-
if (pager.start > 1) {
|
|
111
|
-
this.forwardMore = true;
|
|
112
|
-
} else {
|
|
113
|
-
this.forwardMore = false;
|
|
114
|
-
}
|
|
115
|
-
if (pager.end < this.totalPage) {
|
|
116
|
-
this.backwardMore = true;
|
|
117
|
-
} else {
|
|
118
|
-
this.backwardMore = false;
|
|
119
|
-
}
|
|
120
|
-
for (let i = pager.start; i <= pager.end; i++) {
|
|
121
|
-
resList.push(i);
|
|
122
|
-
}
|
|
123
|
-
return resList;
|
|
124
|
-
},
|
|
125
|
-
onForward() {
|
|
126
|
-
this.currentPage = this.currentPage - this.pageListNum > 0 ? this.currentPage - this.pageListNum : 1;
|
|
127
|
-
},
|
|
128
|
-
onBackward() {
|
|
129
|
-
this.currentPage = this.currentPage + this.pageListNum < this.totalPage ? this.currentPage + this.pageListNum : this.totalPage;
|
|
130
|
-
},
|
|
131
|
-
jumpPage(jumpNum) {
|
|
132
|
-
if (Number(jumpNum)) {
|
|
133
|
-
if (Number(jumpNum) < 1) {
|
|
134
|
-
jumpNum = 1;
|
|
135
|
-
}
|
|
136
|
-
if (Number(jumpNum) > this.totalPage) {
|
|
137
|
-
jumpNum = this.totalPage;
|
|
138
|
-
}
|
|
139
|
-
this.changePage(Number(jumpNum));
|
|
140
|
-
}
|
|
141
|
-
this.jumpNumber = "";
|
|
142
|
-
},
|
|
143
|
-
changePage(pageNum) {
|
|
144
|
-
if (pageNum === 0 || pageNum === this.totalPage + 1) {
|
|
145
|
-
return false;
|
|
146
|
-
}
|
|
147
|
-
if (this.currentPage !== pageNum) {
|
|
148
|
-
this.currentPage = pageNum;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
const Pagination_vue_vue_type_style_index_0_scoped_90e9305f_lang = "";
|
|
154
|
-
const _export_sfc = (sfc, props) => {
|
|
155
|
-
const target = sfc.__vccOpts || sfc;
|
|
156
|
-
for (const [key, val] of props) {
|
|
157
|
-
target[key] = val;
|
|
158
|
-
}
|
|
159
|
-
return target;
|
|
160
|
-
};
|
|
161
|
-
const _withScopeId$1 = (n) => (pushScopeId("data-v-90e9305f"), n = n(), popScopeId(), n);
|
|
162
|
-
const _hoisted_1$1 = { class: "m-pagination-wrap" };
|
|
163
|
-
const _hoisted_2$1 = {
|
|
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 = {
|
|
164
6
|
key: 0,
|
|
165
7
|
class: "mr8"
|
|
166
8
|
};
|
|
167
|
-
const _hoisted_3$
|
|
9
|
+
const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
168
10
|
class: "u-arrow",
|
|
169
11
|
viewBox: "64 64 896 896",
|
|
170
12
|
"data-icon": "left",
|
|
@@ -173,8 +15,8 @@ const _hoisted_3$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
|
|
|
173
15
|
}, [
|
|
174
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" })
|
|
175
17
|
], -1));
|
|
176
|
-
const _hoisted_4$
|
|
177
|
-
_hoisted_3$
|
|
18
|
+
const _hoisted_4$3 = [
|
|
19
|
+
_hoisted_3$3
|
|
178
20
|
];
|
|
179
21
|
const _hoisted_5$1 = { class: "u-ellipsis" };
|
|
180
22
|
const _hoisted_6$1 = {
|
|
@@ -184,7 +26,7 @@ const _hoisted_6$1 = {
|
|
|
184
26
|
"aria-hidden": "true",
|
|
185
27
|
focusable: "false"
|
|
186
28
|
};
|
|
187
|
-
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));
|
|
188
30
|
const _hoisted_8 = [
|
|
189
31
|
_hoisted_7
|
|
190
32
|
];
|
|
@@ -197,11 +39,11 @@ const _hoisted_11 = {
|
|
|
197
39
|
"aria-hidden": "true",
|
|
198
40
|
focusable: "false"
|
|
199
41
|
};
|
|
200
|
-
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));
|
|
201
43
|
const _hoisted_13 = [
|
|
202
44
|
_hoisted_12
|
|
203
45
|
];
|
|
204
|
-
const _hoisted_14 = /* @__PURE__ */ _withScopeId$
|
|
46
|
+
const _hoisted_14 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
205
47
|
class: "u-arrow",
|
|
206
48
|
viewBox: "64 64 896 896",
|
|
207
49
|
"data-icon": "right",
|
|
@@ -217,93 +59,204 @@ const _hoisted_16 = {
|
|
|
217
59
|
key: 1,
|
|
218
60
|
class: "u-jump-page"
|
|
219
61
|
};
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
62
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
63
|
+
__name: "Pagination",
|
|
64
|
+
props: {
|
|
65
|
+
current: { default: 1 },
|
|
66
|
+
pageSize: { default: 10 },
|
|
67
|
+
total: { default: 0 },
|
|
68
|
+
pageListNum: { default: 5 },
|
|
69
|
+
hideOnSinglePage: { type: Boolean, default: false },
|
|
70
|
+
showQuickJumper: { type: Boolean, default: false },
|
|
71
|
+
showTotal: { type: Boolean, default: false },
|
|
72
|
+
placement: { default: "right" }
|
|
73
|
+
},
|
|
74
|
+
emits: ["change"],
|
|
75
|
+
setup(__props, { emit }) {
|
|
76
|
+
const props = __props;
|
|
77
|
+
const currentPage = ref(props.current);
|
|
78
|
+
const jumpNumber = ref("");
|
|
79
|
+
const forwardMore = ref(false);
|
|
80
|
+
const backwardMore = ref(false);
|
|
81
|
+
const forwardArrow = ref(false);
|
|
82
|
+
const backwardArrow = ref(false);
|
|
83
|
+
const totalPage = computed(() => {
|
|
84
|
+
return Math.ceil(props.total / props.pageSize);
|
|
85
|
+
});
|
|
86
|
+
const pageList = computed(() => {
|
|
87
|
+
return dealPageList(currentPage.value).filter((n) => n !== 1 && n !== totalPage.value);
|
|
88
|
+
});
|
|
89
|
+
watch(currentPage, (to) => {
|
|
90
|
+
console.log("change:", to);
|
|
91
|
+
emit("change", {
|
|
92
|
+
page: to,
|
|
93
|
+
pageSize: props.pageSize
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
onMounted(() => {
|
|
97
|
+
document.onkeydown = (e) => {
|
|
98
|
+
const ev = e || window.event;
|
|
99
|
+
if (ev && ev.keyCode === 13 && jumpNumber.value) {
|
|
100
|
+
jumpPage(jumpNumber.value);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
function dealPageList(curPage) {
|
|
105
|
+
var resList = [];
|
|
106
|
+
var offset = Math.floor(props.pageListNum / 2);
|
|
107
|
+
var pager = {
|
|
108
|
+
start: curPage - offset,
|
|
109
|
+
end: curPage + offset
|
|
110
|
+
};
|
|
111
|
+
if (pager.start < 1) {
|
|
112
|
+
pager.end = pager.end + (1 - pager.start);
|
|
113
|
+
pager.start = 1;
|
|
114
|
+
}
|
|
115
|
+
if (pager.end > totalPage.value) {
|
|
116
|
+
pager.start = pager.start - (pager.end - totalPage.value);
|
|
117
|
+
pager.end = totalPage.value;
|
|
118
|
+
}
|
|
119
|
+
if (pager.start < 1) {
|
|
120
|
+
pager.start = 1;
|
|
121
|
+
}
|
|
122
|
+
if (pager.start > 1) {
|
|
123
|
+
forwardMore.value = true;
|
|
124
|
+
} else {
|
|
125
|
+
forwardMore.value = false;
|
|
126
|
+
}
|
|
127
|
+
if (pager.end < totalPage.value) {
|
|
128
|
+
backwardMore.value = true;
|
|
129
|
+
} else {
|
|
130
|
+
backwardMore.value = false;
|
|
131
|
+
}
|
|
132
|
+
for (let i = pager.start; i <= pager.end; i++) {
|
|
133
|
+
resList.push(i);
|
|
134
|
+
}
|
|
135
|
+
return resList;
|
|
136
|
+
}
|
|
137
|
+
function onForward() {
|
|
138
|
+
currentPage.value = currentPage.value - props.pageListNum > 0 ? currentPage.value - props.pageListNum : 1;
|
|
139
|
+
}
|
|
140
|
+
function onBackward() {
|
|
141
|
+
currentPage.value = currentPage.value + props.pageListNum < totalPage.value ? currentPage.value + props.pageListNum : totalPage.value;
|
|
142
|
+
}
|
|
143
|
+
function jumpPage(jumpNum) {
|
|
144
|
+
if (Number(jumpNum)) {
|
|
145
|
+
if (Number(jumpNum) < 1) {
|
|
146
|
+
jumpNum = 1;
|
|
147
|
+
}
|
|
148
|
+
if (Number(jumpNum) > totalPage.value) {
|
|
149
|
+
jumpNum = totalPage.value;
|
|
150
|
+
}
|
|
151
|
+
changePage(Number(jumpNum));
|
|
152
|
+
}
|
|
153
|
+
jumpNumber.value = "";
|
|
154
|
+
}
|
|
155
|
+
function changePage(pageNum) {
|
|
156
|
+
if (pageNum === 0 || pageNum === totalPage.value + 1) {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
if (currentPage.value !== pageNum) {
|
|
160
|
+
currentPage.value = pageNum;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return (_ctx, _cache) => {
|
|
164
|
+
return openBlock(), createElementBlock("div", {
|
|
165
|
+
class: normalizeClass([`m-pagination ${__props.placement}`, { hidden: __props.hideOnSinglePage && __props.total <= __props.pageSize }])
|
|
263
166
|
}, [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
+
createElementVNode("span", {
|
|
170
|
+
class: normalizeClass(["u-item", { disabled: currentPage.value === 1 }]),
|
|
171
|
+
onClick: _cache[0] || (_cache[0] = ($event) => changePage(currentPage.value - 1))
|
|
172
|
+
}, _hoisted_4$3, 2),
|
|
173
|
+
createElementVNode("span", {
|
|
174
|
+
class: normalizeClass(["u-item", { active: currentPage.value === 1 }]),
|
|
175
|
+
onClick: _cache[1] || (_cache[1] = ($event) => changePage(1))
|
|
176
|
+
}, "1", 2),
|
|
177
|
+
withDirectives(createElementVNode("span", {
|
|
178
|
+
class: "m-arrow",
|
|
179
|
+
ref: "forward",
|
|
180
|
+
onClick: onForward,
|
|
181
|
+
onMouseenter: _cache[2] || (_cache[2] = ($event) => forwardArrow.value = true),
|
|
182
|
+
onMouseleave: _cache[3] || (_cache[3] = ($event) => forwardArrow.value = false)
|
|
183
|
+
}, [
|
|
184
|
+
withDirectives(createElementVNode("span", _hoisted_5$1, "•••", 512), [
|
|
185
|
+
[vShow, !forwardArrow.value]
|
|
186
|
+
]),
|
|
187
|
+
withDirectives((openBlock(), createElementBlock("svg", _hoisted_6$1, _hoisted_8, 512)), [
|
|
188
|
+
[vShow, forwardArrow.value]
|
|
189
|
+
])
|
|
190
|
+
], 544), [
|
|
191
|
+
[vShow, forwardMore.value && unref(pageList)[0] - 1 > 1]
|
|
192
|
+
]),
|
|
193
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pageList), (page, index) => {
|
|
194
|
+
return openBlock(), createElementBlock("span", {
|
|
195
|
+
class: normalizeClass(["u-item", { active: currentPage.value === page }]),
|
|
196
|
+
key: index,
|
|
197
|
+
onClick: ($event) => changePage(page)
|
|
198
|
+
}, toDisplayString(page), 11, _hoisted_9);
|
|
199
|
+
}), 128)),
|
|
200
|
+
withDirectives(createElementVNode("span", {
|
|
201
|
+
class: "m-arrow",
|
|
202
|
+
ref: "backward",
|
|
203
|
+
onClick: onBackward,
|
|
204
|
+
onMouseenter: _cache[4] || (_cache[4] = ($event) => backwardArrow.value = true),
|
|
205
|
+
onMouseleave: _cache[5] || (_cache[5] = ($event) => backwardArrow.value = false)
|
|
206
|
+
}, [
|
|
207
|
+
withDirectives(createElementVNode("span", _hoisted_10, "•••", 512), [
|
|
208
|
+
[vShow, !backwardArrow.value]
|
|
209
|
+
]),
|
|
210
|
+
withDirectives((openBlock(), createElementBlock("svg", _hoisted_11, _hoisted_13, 512)), [
|
|
211
|
+
[vShow, backwardArrow.value]
|
|
212
|
+
])
|
|
213
|
+
], 544), [
|
|
214
|
+
[vShow, backwardMore.value && unref(pageList)[unref(pageList).length - 1] + 1 < unref(totalPage)]
|
|
215
|
+
]),
|
|
216
|
+
withDirectives(createElementVNode("span", {
|
|
217
|
+
class: normalizeClass(["u-item", { active: currentPage.value === unref(totalPage) }]),
|
|
218
|
+
onClick: _cache[6] || (_cache[6] = ($event) => changePage(unref(totalPage)))
|
|
219
|
+
}, toDisplayString(unref(totalPage)), 3), [
|
|
220
|
+
[vShow, unref(totalPage) !== 1]
|
|
221
|
+
]),
|
|
222
|
+
createElementVNode("span", {
|
|
223
|
+
class: normalizeClass(["u-item", { disabled: currentPage.value === unref(totalPage) }]),
|
|
224
|
+
onClick: _cache[7] || (_cache[7] = ($event) => changePage(currentPage.value + 1))
|
|
225
|
+
}, _hoisted_15, 2),
|
|
226
|
+
__props.showQuickJumper ? (openBlock(), createElementBlock("span", _hoisted_16, [
|
|
227
|
+
createTextVNode("跳至"),
|
|
228
|
+
withDirectives(createElementVNode("input", {
|
|
229
|
+
type: "text",
|
|
230
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => jumpNumber.value = $event)
|
|
231
|
+
}, null, 512), [
|
|
232
|
+
[vModelText, jumpNumber.value]
|
|
233
|
+
]),
|
|
234
|
+
createTextVNode("页")
|
|
235
|
+
])) : createCommentVNode("", true)
|
|
269
236
|
])
|
|
270
|
-
],
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
_ctx.showQuickJumper ? (openBlock(), createElementBlock("span", _hoisted_16, [
|
|
284
|
-
createTextVNode("跳至"),
|
|
285
|
-
withDirectives(createElementVNode("input", {
|
|
286
|
-
type: "text",
|
|
287
|
-
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => _ctx.jumpNumber = $event)
|
|
288
|
-
}, null, 512), [
|
|
289
|
-
[vModelText, _ctx.jumpNumber]
|
|
290
|
-
]),
|
|
291
|
-
createTextVNode("页")
|
|
292
|
-
])) : createCommentVNode("", true)
|
|
293
|
-
])
|
|
294
|
-
], 2);
|
|
295
|
-
}
|
|
296
|
-
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-90e9305f"]]);
|
|
237
|
+
], 2);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
const Pagination_vue_vue_type_style_index_0_scoped_0b4fe0d6_lang = "";
|
|
242
|
+
const _export_sfc = (sfc, props) => {
|
|
243
|
+
const target = sfc.__vccOpts || sfc;
|
|
244
|
+
for (const [key, val] of props) {
|
|
245
|
+
target[key] = val;
|
|
246
|
+
}
|
|
247
|
+
return target;
|
|
248
|
+
};
|
|
249
|
+
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-0b4fe0d6"]]);
|
|
297
250
|
Pagination.install = (app) => {
|
|
298
|
-
app.component(Pagination.
|
|
251
|
+
app.component(Pagination.__name, Pagination);
|
|
299
252
|
};
|
|
300
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
301
|
-
const _hoisted_1 = ["onClick", "title"];
|
|
302
|
-
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 = {
|
|
303
256
|
key: 0,
|
|
304
257
|
class: "u-separator"
|
|
305
258
|
};
|
|
306
|
-
const _hoisted_3 = {
|
|
259
|
+
const _hoisted_3$2 = {
|
|
307
260
|
key: 1,
|
|
308
261
|
class: "u-arrow",
|
|
309
262
|
viewBox: "64 64 896 896",
|
|
@@ -311,17 +264,13 @@ const _hoisted_3 = {
|
|
|
311
264
|
"aria-hidden": "true",
|
|
312
265
|
focusable: "false"
|
|
313
266
|
};
|
|
314
|
-
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__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));
|
|
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));
|
|
315
268
|
const _hoisted_5 = [
|
|
316
|
-
_hoisted_4
|
|
269
|
+
_hoisted_4$2
|
|
317
270
|
];
|
|
318
|
-
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "assist" }, null, -1));
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
name: "Breadcrumb"
|
|
322
|
-
};
|
|
323
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
324
|
-
...__default__,
|
|
271
|
+
const _hoisted_6 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "assist" }, null, -1));
|
|
272
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
273
|
+
__name: "Breadcrumb",
|
|
325
274
|
props: {
|
|
326
275
|
routes: { default: () => [] },
|
|
327
276
|
height: { default: 60 },
|
|
@@ -350,9 +299,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
350
299
|
class: normalizeClass(["u-route", { active: index === unref(len) - 1 }]),
|
|
351
300
|
onClick: ($event) => index === unref(len) - 1 ? (e) => e.preventDefault() : goRouter(route),
|
|
352
301
|
title: route.name
|
|
353
|
-
}, toDisplayString(route.name || "--"), 11, _hoisted_1),
|
|
302
|
+
}, toDisplayString(route.name || "--"), 11, _hoisted_1$2),
|
|
354
303
|
index !== unref(len) - 1 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
355
|
-
__props.separator ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.separator), 1)) : (openBlock(), createElementBlock("svg", _hoisted_3, _hoisted_5))
|
|
304
|
+
__props.separator ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(__props.separator), 1)) : (openBlock(), createElementBlock("svg", _hoisted_3$2, _hoisted_5))
|
|
356
305
|
], 64)) : createCommentVNode("", true)
|
|
357
306
|
]);
|
|
358
307
|
}), 128)),
|
|
@@ -361,23 +310,250 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
361
310
|
};
|
|
362
311
|
}
|
|
363
312
|
});
|
|
364
|
-
const
|
|
365
|
-
const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
313
|
+
const Breadcrumb_vue_vue_type_style_index_0_scoped_574bc864_lang = "";
|
|
314
|
+
const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-574bc864"]]);
|
|
366
315
|
Breadcrumb.install = (app) => {
|
|
367
|
-
app.component(Breadcrumb.
|
|
316
|
+
app.component(Breadcrumb.__name, Breadcrumb);
|
|
317
|
+
};
|
|
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
|
+
__name: "Countdown",
|
|
324
|
+
props: {
|
|
325
|
+
countdown: { default: 0 },
|
|
326
|
+
title: { default: "Countdown" },
|
|
327
|
+
format: { default: "HH:mm:ss" },
|
|
328
|
+
prefix: { default: "" },
|
|
329
|
+
suffix: { default: "" },
|
|
330
|
+
finishedText: { default: "" }
|
|
331
|
+
},
|
|
332
|
+
emits: ["finish"],
|
|
333
|
+
setup(__props, { emit }) {
|
|
334
|
+
const props = __props;
|
|
335
|
+
const restTime = ref(props.countdown);
|
|
336
|
+
function fixedTwo(value) {
|
|
337
|
+
return value < 10 ? "0" + value : String(value);
|
|
338
|
+
}
|
|
339
|
+
function timeFormat(time) {
|
|
340
|
+
let showTime2 = props.format;
|
|
341
|
+
if (showTime2.includes("s")) {
|
|
342
|
+
var s = time;
|
|
343
|
+
} else {
|
|
344
|
+
var s = 0;
|
|
345
|
+
}
|
|
346
|
+
if (showTime2.includes("m")) {
|
|
347
|
+
s = s % 60;
|
|
348
|
+
var m = Math.floor((time - s) / 60);
|
|
349
|
+
} else {
|
|
350
|
+
var m = 0;
|
|
351
|
+
}
|
|
352
|
+
if (showTime2.includes("H")) {
|
|
353
|
+
m = m % 60;
|
|
354
|
+
var H = Math.floor((time - s - m * 60) / 60 / 60);
|
|
355
|
+
} else {
|
|
356
|
+
var H = 0;
|
|
357
|
+
}
|
|
358
|
+
if (showTime2.includes("D")) {
|
|
359
|
+
H = H % 24;
|
|
360
|
+
var D = Math.floor((time - s - m * 60 - H * 60 * 60) / 60 / 60 / 24);
|
|
361
|
+
} else {
|
|
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;
|
|
375
|
+
}
|
|
376
|
+
showTime2 = showTime2.includes("ss") ? showTime2.replace("ss", fixedTwo(s)) : showTime2.replace("s", String(s));
|
|
377
|
+
showTime2 = showTime2.includes("mm") ? showTime2.replace("mm", fixedTwo(m)) : showTime2.replace("m", String(m));
|
|
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));
|
|
382
|
+
return showTime2;
|
|
383
|
+
}
|
|
384
|
+
const showTime = computed(() => {
|
|
385
|
+
return timeFormat(restTime.value);
|
|
386
|
+
});
|
|
387
|
+
function CountDown(restTime2) {
|
|
388
|
+
setTimeout(() => {
|
|
389
|
+
restTime2.value--;
|
|
390
|
+
if (restTime2.value > 0) {
|
|
391
|
+
CountDown(restTime2);
|
|
392
|
+
} else {
|
|
393
|
+
emit("finish");
|
|
394
|
+
}
|
|
395
|
+
}, 1e3);
|
|
396
|
+
}
|
|
397
|
+
onMounted(() => {
|
|
398
|
+
if (restTime.value > Date.now()) {
|
|
399
|
+
restTime.value = Math.floor((restTime.value - Date.now()) / 1e3);
|
|
400
|
+
}
|
|
401
|
+
CountDown(restTime);
|
|
402
|
+
});
|
|
403
|
+
return (_ctx, _cache) => {
|
|
404
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
405
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
406
|
+
createElementVNode("p", _hoisted_2$1, toDisplayString(props.title), 1)
|
|
407
|
+
], true),
|
|
408
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
409
|
+
restTime.value > 0 ? renderSlot(_ctx.$slots, "prefix", { key: 0 }, () => [
|
|
410
|
+
createTextVNode(toDisplayString(__props.prefix), 1)
|
|
411
|
+
], true) : createCommentVNode("", true),
|
|
412
|
+
__props.finishedText && restTime.value === 0 ? renderSlot(_ctx.$slots, "finish", { key: 1 }, () => [
|
|
413
|
+
createTextVNode(toDisplayString(__props.finishedText), 1)
|
|
414
|
+
], true) : (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(unref(showTime)), 1)),
|
|
415
|
+
restTime.value > 0 ? renderSlot(_ctx.$slots, "suffix", { key: 3 }, () => [
|
|
416
|
+
createTextVNode(toDisplayString(__props.suffix), 1)
|
|
417
|
+
], true) : createCommentVNode("", true)
|
|
418
|
+
])
|
|
419
|
+
]);
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
});
|
|
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"]]);
|
|
425
|
+
Countdown.install = (app) => {
|
|
426
|
+
app.component(Countdown.__name, Countdown);
|
|
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);
|
|
368
539
|
};
|
|
369
540
|
const components = [
|
|
370
541
|
Pagination,
|
|
371
|
-
Breadcrumb
|
|
542
|
+
Breadcrumb,
|
|
543
|
+
Countdown,
|
|
544
|
+
Video
|
|
372
545
|
];
|
|
546
|
+
console.log("components:", components);
|
|
373
547
|
const install = (app) => {
|
|
374
|
-
components.forEach((component) => app.component(component.
|
|
548
|
+
components.forEach((component) => app.component(component.__name, component));
|
|
375
549
|
};
|
|
376
550
|
const VueAmazingUI = {
|
|
377
551
|
install
|
|
378
552
|
};
|
|
379
553
|
export {
|
|
380
554
|
Breadcrumb,
|
|
555
|
+
Countdown,
|
|
381
556
|
Pagination,
|
|
557
|
+
Video,
|
|
382
558
|
VueAmazingUI as default
|
|
383
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 r=t.defineComponent({name:"Pagination",props:{current:{type:Number,default:1},pageSize:{type:Number,default:10},total:{type:Number,default:0},pageListNum:{type:Number,default:5},hideOnSinglePage:{type:Boolean,default:!1},showQuickJumper:{type:Boolean,default:!1},showTotal:{type:Boolean,default:!1},placement:{type:String,default:"right"}},data(){return{currentPage:this.current,jumpNumber:"",forwardMore:!1,backwardMore:!1,forwardArrow:!1,backwardArrow:!1}},computed:{totalPage(){return Math.ceil(this.total/this.pageSize)},pageList(){return this.dealPageList(this.currentPage).filter((e=>1!==e&&e!==this.totalPage))}},watch:{current(e){this.currentPage=e},currentPage(e){this.$emit("change",{page:e,pageSize:this.pageSize})}},created(){document.onkeydown=e=>{const t=e||window.event;t&&13===t.keyCode&&this.jumpNumber&&this.jumpPage(this.jumpNumber)}},methods:{dealPageList(e){var t=[],a=Math.floor(this.pageListNum/2),r={start:e-a,end:e+a};r.start<1&&(r.end=r.end+(1-r.start),r.start=1),r.end>this.totalPage&&(r.start=r.start-(r.end-this.totalPage),r.end=this.totalPage),r.start<1&&(r.start=1),r.start>1?this.forwardMore=!0:this.forwardMore=!1,r.end<this.totalPage?this.backwardMore=!0:this.backwardMore=!1;for(let o=r.start;o<=r.end;o++)t.push(o);return t},onForward(){this.currentPage=this.currentPage-this.pageListNum>0?this.currentPage-this.pageListNum:1},onBackward(){this.currentPage=this.currentPage+this.pageListNum<this.totalPage?this.currentPage+this.pageListNum:this.totalPage},jumpPage(e){Number(e)&&(Number(e)<1&&(e=1),Number(e)>this.totalPage&&(e=this.totalPage),this.changePage(Number(e))),this.jumpNumber=""},changePage(e){if(0===e||e===this.totalPage+1)return!1;this.currentPage!==e&&(this.currentPage=e)}}}),o=(e,t)=>{const a=e.__vccOpts||e;for(const[r,o]of t)a[r]=o;return a},n=e=>(t.pushScopeId("data-v-90e9305f"),e=e(),t.popScopeId(),e),l={class:"m-pagination-wrap"},c={key:0,class:"mr8"},s=[n((()=>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)))],i={class:"u-ellipsis"},u={class:"u-icon",viewBox:"64 64 896 896","data-icon":"double-left","aria-hidden":"true",focusable:"false"},d=[n((()=>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)))],p=["onClick"],m={class:"u-ellipsis"},g={class:"u-icon",viewBox:"64 64 896 896","data-icon":"double-right","aria-hidden":"true",focusable:"false"},h=[n((()=>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)))],w=[n((()=>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"};const k=o(r,[["render",function(e,a,r,o,n,k){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([`m-pagination ${e.placement}`,{hidden:e.hideOnSinglePage&&e.total<=e.pageSize}])},[t.createElementVNode("div",l,[e.showTotal?(t.openBlock(),t.createElementBlock("span",c,"共 "+t.toDisplayString(e.totalPage)+" 页 / "+t.toDisplayString(e.total)+" 条",1)):t.createCommentVNode("",!0),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{disabled:1===e.currentPage}]),onClick:a[0]||(a[0]=t=>e.changePage(e.currentPage-1))},s,2),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{active:1===e.currentPage}]),onClick:a[1]||(a[1]=t=>e.changePage(1))},"1",2),t.withDirectives(t.createElementVNode("span",{class:"m-arrow",ref:"forward",onClick:a[2]||(a[2]=(...t)=>e.onForward&&e.onForward(...t)),onMouseenter:a[3]||(a[3]=t=>e.forwardArrow=!0),onMouseleave:a[4]||(a[4]=t=>e.forwardArrow=!1)},[t.withDirectives(t.createElementVNode("span",i,"•••",512),[[t.vShow,!e.forwardArrow]]),t.withDirectives((t.openBlock(),t.createElementBlock("svg",u,d,512)),[[t.vShow,e.forwardArrow]])],544),[[t.vShow,e.forwardMore&&e.pageList[0]-1>1]]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.pageList,((a,r)=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["u-item",{active:e.currentPage===a}]),key:r,onClick:t=>e.changePage(a)},t.toDisplayString(a),11,p)))),128)),t.withDirectives(t.createElementVNode("span",{class:"m-arrow",ref:"backward",onClick:a[5]||(a[5]=(...t)=>e.onBackward&&e.onBackward(...t)),onMouseenter:a[6]||(a[6]=t=>e.backwardArrow=!0),onMouseleave:a[7]||(a[7]=t=>e.backwardArrow=!1)},[t.withDirectives(t.createElementVNode("span",m,"•••",512),[[t.vShow,!e.backwardArrow]]),t.withDirectives((t.openBlock(),t.createElementBlock("svg",g,h,512)),[[t.vShow,e.backwardArrow]])],544),[[t.vShow,e.backwardMore&&e.pageList[e.pageList.length-1]+1<e.totalPage]]),t.withDirectives(t.createElementVNode("span",{class:t.normalizeClass(["u-item",{active:e.currentPage===e.totalPage}]),onClick:a[8]||(a[8]=t=>e.changePage(e.totalPage))},t.toDisplayString(e.totalPage),3),[[t.vShow,1!==e.totalPage]]),t.createElementVNode("span",{class:t.normalizeClass(["u-item",{disabled:e.currentPage===e.totalPage}]),onClick:a[9]||(a[9]=t=>e.changePage(e.currentPage+1))},w,2),e.showQuickJumper?(t.openBlock(),t.createElementBlock("span",f,[t.createTextVNode("跳至"),t.withDirectives(t.createElementVNode("input",{type:"text","onUpdate:modelValue":a[10]||(a[10]=t=>e.jumpNumber=t)},null,512),[[t.vModelText,e.jumpNumber]]),t.createTextVNode("页")])):t.createCommentVNode("",!0)])],2)}],["__scopeId","data-v-90e9305f"]]);k.install=e=>{e.component(k.name,k)};const v=e=>(t.pushScopeId("data-v-e7eb3765"),e=e(),t.popScopeId(),e),P=["onClick","title"],b={key:0,class:"u-separator"},N={key:1,class:"u-arrow",viewBox:"64 64 896 896","data-icon":"right","aria-hidden":"true",focusable:"false"},B=[v((()=>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)))],y=v((()=>t.createElementVNode("div",{class:"assist"},null,-1))),E=o(t.defineComponent({name:"Breadcrumb",props:{routes:{default:()=>[]},height:{default:60},separator:{default:""}},setup(e){const r=e,o=t.computed((()=>r.routes.length)),n=a.useRouter();return(a,r)=>(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,r)=>(t.openBlock(),t.createElementBlock("div",{class:"m-bread",key:r},[t.createElementVNode("a",{class:t.normalizeClass(["u-route",{active:r===t.unref(o)-1}]),onClick:e=>r===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,P),r!==t.unref(o)-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.separator?(t.openBlock(),t.createElementBlock("span",b,t.toDisplayString(e.separator),1)):(t.openBlock(),t.createElementBlock("svg",N,B))],64)):t.createCommentVNode("",!0)])))),128)),y],4))}}),[["__scopeId","data-v-e7eb3765"]]);E.install=e=>{e.component(E.name,E)};const V=[k,E],S={install:e=>{V.forEach((t=>e.component(t.name,t)))}};e.Breadcrumb=E,e.Pagination=k,e.default=S,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"}})}));
|