@nutui/nutui 4.0.0-beta.7 → 4.0.0-beta.8
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/dist/nutui.es.js +121 -0
- package/dist/nutui.umd.cjs +267 -339
- package/dist/packages/_es/Barrage.js +15 -27
- package/dist/packages/_es/ImagePreview.js +4 -5
- package/dist/packages/_es/Notify.js +2 -0
- package/dist/packages/_es/Swiper.js +56 -114
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/barrage/index.scss +17 -1
- package/dist/packages/cell/index.scss +3 -1
- package/dist/packages/pullrefresh/index.scss +3 -2
- package/dist/smartips/attributes.json +19 -15
- package/dist/smartips/tags.json +3 -2
- package/dist/smartips/web-types.json +32 -23
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +50 -50
- package/dist/styles/themes/jdb.scss +50 -50
- package/dist/styles/themes/jddkh.scss +50 -50
- package/dist/styles/themes/jdt.scss +50 -50
- package/dist/types/__VUE/barrage/index.vue.d.ts +0 -1
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +0 -9
- package/dist/types/__VUE/swiper/index.vue.d.ts +8 -7
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useSlots, computed, ref, onMounted, onUnmounted, onDeactivated, watch, nextTick,
|
|
1
|
+
import { useSlots, computed, ref, onMounted, onUnmounted, onDeactivated, watch, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("barrage");
|
|
6
|
-
const
|
|
6
|
+
const _sfc_main = create({
|
|
7
7
|
name: "barrage",
|
|
8
8
|
props: {
|
|
9
9
|
danmu: {
|
|
@@ -66,6 +66,8 @@ const __default__ = create({
|
|
|
66
66
|
danmuList.value = dmList;
|
|
67
67
|
}
|
|
68
68
|
setTimeout(() => {
|
|
69
|
+
var _a2;
|
|
70
|
+
(_a2 = dmBody.value) == null ? void 0 : _a2.style.setProperty("--move-distance", `-${danmuCWidth.value}px`);
|
|
69
71
|
run();
|
|
70
72
|
}, 300);
|
|
71
73
|
});
|
|
@@ -98,14 +100,13 @@ const __default__ = create({
|
|
|
98
100
|
const run = () => {
|
|
99
101
|
clearInterval(timer);
|
|
100
102
|
timer = 0;
|
|
101
|
-
timer =
|
|
103
|
+
timer = setTimeout(() => {
|
|
102
104
|
play();
|
|
103
105
|
run();
|
|
104
106
|
}, props.frequency);
|
|
105
107
|
};
|
|
106
|
-
const distance = ref("0");
|
|
107
108
|
const play = () => {
|
|
108
|
-
var _a
|
|
109
|
+
var _a;
|
|
109
110
|
if (!props.loop && index2.value >= danmuList.value.length) {
|
|
110
111
|
return;
|
|
111
112
|
}
|
|
@@ -113,13 +114,7 @@ const __default__ = create({
|
|
|
113
114
|
let el = document.createElement(`view`);
|
|
114
115
|
if (slotDefault && typeof danmuList.value[_index] == "object") {
|
|
115
116
|
el = danmuList.value[_index];
|
|
116
|
-
|
|
117
|
-
el.classList.remove("nut-barrage__item");
|
|
118
|
-
}
|
|
119
|
-
if ((_b = el == null ? void 0 : el.classList) == null ? void 0 : _b.contains("move")) {
|
|
120
|
-
el.classList.remove("move");
|
|
121
|
-
}
|
|
122
|
-
(_c = el == null ? void 0 : el.classList) == null ? void 0 : _c.add("nut-barrage__item");
|
|
117
|
+
(_a = el == null ? void 0 : el.classList) == null ? void 0 : _a.add("nut-barrage__item");
|
|
123
118
|
} else {
|
|
124
119
|
el.innerHTML = danmuList.value[_index];
|
|
125
120
|
el.classList.add("nut-barrage__item");
|
|
@@ -136,11 +131,15 @@ const __default__ = create({
|
|
|
136
131
|
const width = el.offsetWidth;
|
|
137
132
|
el.style.width = width + 20 + "px";
|
|
138
133
|
}
|
|
139
|
-
el.style.setProperty("--move-distance", `-${danmuCWidth.value}px`);
|
|
140
|
-
distance.value = "-" + speeds / 1e3 * 150 + "%";
|
|
141
134
|
el.dataset.index = `${_index}`;
|
|
142
135
|
if (slotDefault) {
|
|
143
136
|
index2.value++;
|
|
137
|
+
el.addEventListener("animationend", () => {
|
|
138
|
+
var _a3;
|
|
139
|
+
if ((_a3 = el == null ? void 0 : el.classList) == null ? void 0 : _a3.contains("move")) {
|
|
140
|
+
el.classList.remove("move");
|
|
141
|
+
}
|
|
142
|
+
});
|
|
144
143
|
} else {
|
|
145
144
|
el.addEventListener("animationend", () => {
|
|
146
145
|
dmContainer.value.removeChild(el);
|
|
@@ -149,20 +148,9 @@ const __default__ = create({
|
|
|
149
148
|
}
|
|
150
149
|
});
|
|
151
150
|
};
|
|
152
|
-
return { classTime, classes, danmuList, dmBody, dmContainer, add
|
|
151
|
+
return { classTime, classes, danmuList, dmBody, dmContainer, add };
|
|
153
152
|
}
|
|
154
153
|
});
|
|
155
|
-
const __injectCSSVars__ = () => {
|
|
156
|
-
useCssVars((_ctx) => ({
|
|
157
|
-
"9e8362c8": _ctx.distance
|
|
158
|
-
}));
|
|
159
|
-
};
|
|
160
|
-
const __setup__ = __default__.setup;
|
|
161
|
-
__default__.setup = __setup__ ? (props, ctx) => {
|
|
162
|
-
__injectCSSVars__();
|
|
163
|
-
return __setup__(props, ctx);
|
|
164
|
-
} : __injectCSSVars__;
|
|
165
|
-
const index_vue_vue_type_style_index_0_lang = "";
|
|
166
154
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
167
155
|
return openBlock(), createElementBlock("div", {
|
|
168
156
|
ref: "dmBody",
|
|
@@ -181,7 +169,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
181
169
|
], 2)
|
|
182
170
|
], 2);
|
|
183
171
|
}
|
|
184
|
-
const index = /* @__PURE__ */ _export_sfc(
|
|
172
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
185
173
|
export {
|
|
186
174
|
index as default
|
|
187
175
|
};
|
|
@@ -19,6 +19,7 @@ import "../locale/lang";
|
|
|
19
19
|
import { C as CreateComponent } from "./mountComponent-1ece4110.js";
|
|
20
20
|
import Overlay from "./Overlay.js";
|
|
21
21
|
import "./index-79c5dc33.js";
|
|
22
|
+
import "./raf-729dad54.js";
|
|
22
23
|
const baseProps = {
|
|
23
24
|
show: { type: Boolean, default: false },
|
|
24
25
|
initNo: { type: Number, default: 0 },
|
|
@@ -291,10 +292,6 @@ const _sfc_main = create({
|
|
|
291
292
|
type: Boolean,
|
|
292
293
|
default: false
|
|
293
294
|
},
|
|
294
|
-
closeIcon: {
|
|
295
|
-
type: String,
|
|
296
|
-
default: "circle-close"
|
|
297
|
-
},
|
|
298
295
|
closeIconPosition: {
|
|
299
296
|
type: String,
|
|
300
297
|
default: "top-right"
|
|
@@ -351,6 +348,7 @@ const _sfc_main = create({
|
|
|
351
348
|
const init = () => {
|
|
352
349
|
if (swipeRef.value) {
|
|
353
350
|
const rect = useRect(swipeRef.value);
|
|
351
|
+
console.log("show");
|
|
354
352
|
state.rootHeight = rect.height;
|
|
355
353
|
state.rootWidth = rect.width;
|
|
356
354
|
}
|
|
@@ -358,6 +356,7 @@ const _sfc_main = create({
|
|
|
358
356
|
watch(
|
|
359
357
|
() => props.show,
|
|
360
358
|
(val) => {
|
|
359
|
+
console.log("展示", val);
|
|
361
360
|
state.showPop = val;
|
|
362
361
|
init();
|
|
363
362
|
}
|
|
@@ -481,7 +480,7 @@ class ImagePreviewFunction {
|
|
|
481
480
|
__publicField(this, "options", new ImagePreviewOptions());
|
|
482
481
|
const options = Object.assign(this.options, _options);
|
|
483
482
|
const { instance, unmount } = CreateComponent(options, {
|
|
484
|
-
name: "
|
|
483
|
+
name: "image-preview",
|
|
485
484
|
components: [Popup, Video, Swiper, SwiperItem, Overlay],
|
|
486
485
|
wrapper: () => {
|
|
487
486
|
return {
|
|
@@ -108,6 +108,7 @@ const defaultOptions = {
|
|
|
108
108
|
background: void 0,
|
|
109
109
|
duration: 3e3,
|
|
110
110
|
className: "",
|
|
111
|
+
onClose: Function,
|
|
111
112
|
teleport: "",
|
|
112
113
|
unmount: new Function()
|
|
113
114
|
};
|
|
@@ -168,6 +169,7 @@ const mountNotify = (opts) => {
|
|
|
168
169
|
opts.teleport = `#notify-${opts.id}`;
|
|
169
170
|
onMounted(() => {
|
|
170
171
|
setTimeout(() => {
|
|
172
|
+
opts.onClose && opts.onClose();
|
|
171
173
|
document.body.removeChild(root);
|
|
172
174
|
}, opts.duration);
|
|
173
175
|
});
|
|
@@ -1,56 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
1
|
+
import { ref, reactive, computed, provide, onDeactivated, onBeforeUnmount, watch, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
|
+
import { c as createComponent, e as clamp } from "./component-81a4c1d0.js";
|
|
3
|
+
import { u as useTouch } from "./index-7a7385e4.js";
|
|
3
4
|
import { u as useExpose } from "./index-79c5dc33.js";
|
|
5
|
+
import { r as requestAniFrame } from "./raf-729dad54.js";
|
|
4
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
7
|
import "../locale/lang";
|
|
6
|
-
const DISTANCE = 5;
|
|
7
|
-
function useTouch() {
|
|
8
|
-
const state = reactive({
|
|
9
|
-
startX: 0,
|
|
10
|
-
startY: 0,
|
|
11
|
-
deltaX: 0,
|
|
12
|
-
deltaY: 0,
|
|
13
|
-
offsetX: 0,
|
|
14
|
-
offsetY: 0,
|
|
15
|
-
direction: ""
|
|
16
|
-
});
|
|
17
|
-
const getDirection = (x, y) => {
|
|
18
|
-
if (x > y && x > DISTANCE)
|
|
19
|
-
return "horizontal";
|
|
20
|
-
if (y > x && y > DISTANCE)
|
|
21
|
-
return "vertical";
|
|
22
|
-
return "";
|
|
23
|
-
};
|
|
24
|
-
const reset = () => {
|
|
25
|
-
state.startX = 0;
|
|
26
|
-
state.startY = 0;
|
|
27
|
-
state.deltaX = 0;
|
|
28
|
-
state.deltaY = 0;
|
|
29
|
-
state.offsetX = 0;
|
|
30
|
-
state.offsetY = 0;
|
|
31
|
-
state.direction = "";
|
|
32
|
-
};
|
|
33
|
-
const start = (e) => {
|
|
34
|
-
reset();
|
|
35
|
-
state.startX = e.touches[0].clientX;
|
|
36
|
-
state.startY = e.touches[0].clientY;
|
|
37
|
-
};
|
|
38
|
-
const move = (e) => {
|
|
39
|
-
state.deltaX = e.touches[0].clientX - state.startX;
|
|
40
|
-
state.deltaY = e.touches[0].clientY - state.startY;
|
|
41
|
-
state.offsetX = Math.abs(state.deltaX);
|
|
42
|
-
state.offsetY = Math.abs(state.deltaY);
|
|
43
|
-
if (!state.direction) {
|
|
44
|
-
state.direction = getDirection(state.offsetX, state.offsetY);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return {
|
|
48
|
-
state,
|
|
49
|
-
start,
|
|
50
|
-
reset,
|
|
51
|
-
move
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
8
|
const { create, componentName } = createComponent("swiper");
|
|
55
9
|
const _sfc_main = create({
|
|
56
10
|
props: {
|
|
@@ -63,7 +17,7 @@ const _sfc_main = create({
|
|
|
63
17
|
default: 0
|
|
64
18
|
},
|
|
65
19
|
direction: {
|
|
66
|
-
type:
|
|
20
|
+
type: String,
|
|
67
21
|
default: "horizontal"
|
|
68
22
|
},
|
|
69
23
|
paginationVisible: {
|
|
@@ -132,11 +86,25 @@ const _sfc_main = create({
|
|
|
132
86
|
};
|
|
133
87
|
});
|
|
134
88
|
const isVertical = computed(() => props.direction === "vertical");
|
|
89
|
+
const classesInner = computed(() => {
|
|
90
|
+
const prefixCls = componentName;
|
|
91
|
+
return {
|
|
92
|
+
[`${prefixCls}-inner`]: true,
|
|
93
|
+
[`${prefixCls}-vertical`]: isVertical.value
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
const classesPagination = computed(() => {
|
|
97
|
+
const prefixCls = componentName;
|
|
98
|
+
return {
|
|
99
|
+
[`${prefixCls}-pagination`]: true,
|
|
100
|
+
[`${prefixCls}-pagination-vertical`]: isVertical.value
|
|
101
|
+
};
|
|
102
|
+
});
|
|
135
103
|
const delTa = computed(() => {
|
|
136
|
-
return isVertical.value ? touch.
|
|
104
|
+
return isVertical.value ? touch.deltaY.value : touch.deltaX.value;
|
|
137
105
|
});
|
|
138
106
|
const isCorrectDirection = computed(() => {
|
|
139
|
-
return touch.
|
|
107
|
+
return touch.direction.value === props.direction;
|
|
140
108
|
});
|
|
141
109
|
const childCount = computed(() => state.children.length);
|
|
142
110
|
const size = computed(() => state[isVertical.value ? "height" : "width"]);
|
|
@@ -151,12 +119,7 @@ const _sfc_main = create({
|
|
|
151
119
|
const activePagination = computed(() => (state.active + childCount.value) % childCount.value);
|
|
152
120
|
const getStyle = () => {
|
|
153
121
|
let offset = 0;
|
|
154
|
-
|
|
155
|
-
offset = state.offset;
|
|
156
|
-
} else {
|
|
157
|
-
let val = isVertical.value ? state.rect.height - size.value : state.rect.width - size.value;
|
|
158
|
-
offset = state.offset + (state.active === childCount.value - 1 ? -val / 2 : val / 2);
|
|
159
|
-
}
|
|
122
|
+
offset = state.offset;
|
|
160
123
|
state.style = {
|
|
161
124
|
transitionDuration: `${state.moving ? 0 : props.duration}ms`,
|
|
162
125
|
transform: `translate${isVertical.value ? "Y" : "X"}(${offset}px)`,
|
|
@@ -167,26 +130,27 @@ const _sfc_main = create({
|
|
|
167
130
|
const relation = (child) => {
|
|
168
131
|
var _a;
|
|
169
132
|
let children = [];
|
|
133
|
+
const childrenVNodeLen = state.childrenVNode.length;
|
|
170
134
|
let slot = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots);
|
|
171
135
|
slot = slot.filter((item) => item.children && Array.isArray(item.children));
|
|
172
136
|
slot.forEach((item) => {
|
|
173
137
|
children = children.concat(item.children);
|
|
174
138
|
});
|
|
175
|
-
if (!
|
|
139
|
+
if (!childrenVNodeLen) {
|
|
176
140
|
state.childrenVNode = children.slice();
|
|
177
141
|
child.proxy && state.children.push(child.proxy);
|
|
178
142
|
} else {
|
|
179
|
-
if (
|
|
143
|
+
if (childrenVNodeLen > children.length) {
|
|
180
144
|
state.children = state.children.filter((item) => child.proxy !== item);
|
|
181
|
-
} else if (
|
|
182
|
-
for (let i = 0; i <
|
|
145
|
+
} else if (childrenVNodeLen < children.length) {
|
|
146
|
+
for (let i = 0; i < childrenVNodeLen; i++) {
|
|
183
147
|
if (children[i].key !== state.childrenVNode[i].key) {
|
|
184
148
|
child.proxy && state.children.splice(i, 0, child.proxy);
|
|
185
149
|
child.vnode && state.childrenVNode.splice(i, 0, child.vnode);
|
|
186
150
|
break;
|
|
187
151
|
}
|
|
188
152
|
}
|
|
189
|
-
if (
|
|
153
|
+
if (childrenVNodeLen !== children.length) {
|
|
190
154
|
child.proxy && state.children.push(child.proxy);
|
|
191
155
|
child.vnode && state.childrenVNode.push(child.vnode);
|
|
192
156
|
}
|
|
@@ -196,12 +160,6 @@ const _sfc_main = create({
|
|
|
196
160
|
}
|
|
197
161
|
}
|
|
198
162
|
};
|
|
199
|
-
const range = (num, min, max) => {
|
|
200
|
-
return Math.min(Math.max(num, min), max);
|
|
201
|
-
};
|
|
202
|
-
const requestFrame = (fn) => {
|
|
203
|
-
window.requestAnimationFrame.call(window, fn);
|
|
204
|
-
};
|
|
205
163
|
const getOffset = (active, offset = 0) => {
|
|
206
164
|
let currentPosition = active * size.value;
|
|
207
165
|
if (!props.loop) {
|
|
@@ -209,7 +167,7 @@ const _sfc_main = create({
|
|
|
209
167
|
}
|
|
210
168
|
let targetOffset = offset - currentPosition;
|
|
211
169
|
if (!props.loop) {
|
|
212
|
-
targetOffset =
|
|
170
|
+
targetOffset = clamp(targetOffset, minOffset.value, 0);
|
|
213
171
|
}
|
|
214
172
|
return targetOffset;
|
|
215
173
|
};
|
|
@@ -217,9 +175,9 @@ const _sfc_main = create({
|
|
|
217
175
|
const { active } = state;
|
|
218
176
|
if (pace) {
|
|
219
177
|
if (props.loop) {
|
|
220
|
-
return
|
|
178
|
+
return clamp(active + pace, -1, childCount.value);
|
|
221
179
|
}
|
|
222
|
-
return
|
|
180
|
+
return clamp(active + pace, 0, childCount.value - 1);
|
|
223
181
|
}
|
|
224
182
|
return active;
|
|
225
183
|
};
|
|
@@ -258,48 +216,39 @@ const _sfc_main = create({
|
|
|
258
216
|
const stopAutoPlay = () => {
|
|
259
217
|
clearTimeout(state.autoplayTimer);
|
|
260
218
|
};
|
|
261
|
-
const
|
|
219
|
+
const jump = (pace) => {
|
|
262
220
|
resettPosition();
|
|
263
221
|
touch.reset();
|
|
264
|
-
|
|
265
|
-
|
|
222
|
+
requestAniFrame(() => {
|
|
223
|
+
requestAniFrame(() => {
|
|
266
224
|
state.moving = false;
|
|
267
225
|
move({
|
|
268
|
-
pace
|
|
226
|
+
pace,
|
|
269
227
|
isEmit: true
|
|
270
228
|
});
|
|
271
229
|
});
|
|
272
230
|
});
|
|
273
231
|
};
|
|
232
|
+
const prev = () => {
|
|
233
|
+
jump(-1);
|
|
234
|
+
};
|
|
274
235
|
const next = () => {
|
|
275
|
-
|
|
276
|
-
touch.reset();
|
|
277
|
-
requestFrame(() => {
|
|
278
|
-
requestFrame(() => {
|
|
279
|
-
state.moving = false;
|
|
280
|
-
move({
|
|
281
|
-
pace: 1,
|
|
282
|
-
isEmit: true
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
});
|
|
236
|
+
jump(1);
|
|
286
237
|
};
|
|
287
238
|
const to = (index) => {
|
|
288
239
|
resettPosition();
|
|
289
240
|
touch.reset();
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
isEmit: true
|
|
302
|
-
});
|
|
241
|
+
requestAniFrame(() => {
|
|
242
|
+
state.moving = false;
|
|
243
|
+
let targetIndex;
|
|
244
|
+
if (props.loop && childCount.value === index) {
|
|
245
|
+
targetIndex = state.active === 0 ? 0 : index;
|
|
246
|
+
} else {
|
|
247
|
+
targetIndex = index % childCount.value;
|
|
248
|
+
}
|
|
249
|
+
move({
|
|
250
|
+
pace: targetIndex - state.active,
|
|
251
|
+
isEmit: true
|
|
303
252
|
});
|
|
304
253
|
});
|
|
305
254
|
};
|
|
@@ -353,7 +302,7 @@ const _sfc_main = create({
|
|
|
353
302
|
const isShouldMove = Math.abs(speed) > 0.3 || Math.abs(delTa.value) > +(size.value / 2).toFixed(2);
|
|
354
303
|
if (isShouldMove && isCorrectDirection.value) {
|
|
355
304
|
let pace = 0;
|
|
356
|
-
const offset = isVertical.value ? touch.
|
|
305
|
+
const offset = isVertical.value ? touch.offsetY.value : touch.offsetX.value;
|
|
357
306
|
if (props.loop) {
|
|
358
307
|
pace = offset > 0 ? delTa.value > 0 ? -1 : 1 : 0;
|
|
359
308
|
} else {
|
|
@@ -411,10 +360,9 @@ const _sfc_main = create({
|
|
|
411
360
|
return {
|
|
412
361
|
state,
|
|
413
362
|
classes,
|
|
363
|
+
classesInner,
|
|
364
|
+
classesPagination,
|
|
414
365
|
container,
|
|
415
|
-
componentName,
|
|
416
|
-
isVertical,
|
|
417
|
-
slots,
|
|
418
366
|
activePagination,
|
|
419
367
|
onTouchStart,
|
|
420
368
|
onTouchMove,
|
|
@@ -432,21 +380,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
432
380
|
onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
|
|
433
381
|
}, [
|
|
434
382
|
createElementVNode("view", {
|
|
435
|
-
class: normalizeClass(
|
|
436
|
-
[`${_ctx.componentName}-inner`]: true,
|
|
437
|
-
[`${_ctx.componentName}-vertical`]: _ctx.isVertical
|
|
438
|
-
}),
|
|
383
|
+
class: normalizeClass(_ctx.classesInner),
|
|
439
384
|
style: normalizeStyle(_ctx.state.style)
|
|
440
385
|
}, [
|
|
441
386
|
renderSlot(_ctx.$slots, "default")
|
|
442
387
|
], 6),
|
|
443
388
|
renderSlot(_ctx.$slots, "page"),
|
|
444
|
-
_ctx.paginationVisible && !_ctx
|
|
389
|
+
_ctx.paginationVisible && !_ctx.$slots.page ? (openBlock(), createElementBlock("view", {
|
|
445
390
|
key: 0,
|
|
446
|
-
class: normalizeClass(
|
|
447
|
-
[`${_ctx.componentName}-pagination`]: true,
|
|
448
|
-
[`${_ctx.componentName}-pagination-vertical`]: _ctx.isVertical
|
|
449
|
-
})
|
|
391
|
+
class: normalizeClass(_ctx.classesPagination)
|
|
450
392
|
}, [
|
|
451
393
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.children.length, (item, index) => {
|
|
452
394
|
return openBlock(), createElementBlock("i", {
|
|
@@ -97,7 +97,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
97
97
|
}, [
|
|
98
98
|
createElementVNode("view", _hoisted_1, [
|
|
99
99
|
_ctx.loading ? renderSlot(_ctx.$slots, "icon", { key: 0 }, () => [
|
|
100
|
-
createVNode(_component_Loading1)
|
|
100
|
+
createVNode(_component_Loading1, { name: "loading" })
|
|
101
101
|
]) : createCommentVNode("", true),
|
|
102
102
|
_ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
103
103
|
withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
height: 100%;
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
box-sizing: border-box;
|
|
9
|
-
|
|
9
|
+
--move-distance: '300%';
|
|
10
10
|
&__item {
|
|
11
11
|
width: 100px;
|
|
12
12
|
display: block;
|
|
@@ -25,6 +25,22 @@
|
|
|
25
25
|
animation-timing-function: linear;
|
|
26
26
|
animation-play-state: running;
|
|
27
27
|
}
|
|
28
|
+
@keyframes moving {
|
|
29
|
+
from {
|
|
30
|
+
transform: translateX(100%);
|
|
31
|
+
}
|
|
32
|
+
to {
|
|
33
|
+
transform: translateX(var(--move-distance));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
@-webkit-keyframes moving {
|
|
37
|
+
from {
|
|
38
|
+
-webkit-transform: translateX(100%);
|
|
39
|
+
}
|
|
40
|
+
to {
|
|
41
|
+
transform: translateX(var(--move-distance));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
28
44
|
}
|
|
29
45
|
}
|
|
30
46
|
.nut-theme-dark {
|
|
@@ -72,7 +72,8 @@
|
|
|
72
72
|
&__icon {
|
|
73
73
|
display: flex;
|
|
74
74
|
flex-direction: row;
|
|
75
|
-
margin
|
|
75
|
+
margin: $cell-default-icon-margin;
|
|
76
|
+
align-items: center;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
&__title {
|
|
@@ -94,5 +95,6 @@
|
|
|
94
95
|
}
|
|
95
96
|
&__link {
|
|
96
97
|
color: #979797;
|
|
98
|
+
align-self: center;
|
|
97
99
|
}
|
|
98
100
|
}
|
|
@@ -1429,31 +1429,31 @@
|
|
|
1429
1429
|
},
|
|
1430
1430
|
"nut-notify/type": {
|
|
1431
1431
|
"type": "string",
|
|
1432
|
-
"description": "
|
|
1432
|
+
"description": "属性说明:提示的信息类型,可选值为`primary` `success` `danger` `warning`,默认值:`danger`"
|
|
1433
1433
|
},
|
|
1434
1434
|
"nut-notify/message": {
|
|
1435
1435
|
"type": "boolean",
|
|
1436
|
-
"description": "属性说明:展示文案,支持通过\\n
|
|
1436
|
+
"description": "属性说明:展示文案,支持通过\\n换行,默认值:`false`"
|
|
1437
1437
|
},
|
|
1438
1438
|
"nut-notify/duration": {
|
|
1439
1439
|
"type": "number",
|
|
1440
|
-
"description": "属性说明:展示时长(ms),值为 0 时,notify
|
|
1440
|
+
"description": "属性说明:展示时长(ms),值为 0 时,notify 不会消失,默认值:`3000`"
|
|
1441
1441
|
},
|
|
1442
1442
|
"nut-notify/color": {
|
|
1443
1443
|
"type": "string",
|
|
1444
|
-
"description": "
|
|
1444
|
+
"description": "属性说明:字体颜色,默认值:`''`"
|
|
1445
1445
|
},
|
|
1446
1446
|
"nut-notify/background": {
|
|
1447
1447
|
"type": "string",
|
|
1448
|
-
"description": "
|
|
1448
|
+
"description": "属性说明:背景颜色,默认值:`''`"
|
|
1449
1449
|
},
|
|
1450
1450
|
"nut-notify/class-name": {
|
|
1451
|
-
"type": "string
|
|
1452
|
-
"description": "
|
|
1451
|
+
"type": "string\\/number",
|
|
1452
|
+
"description": "属性说明:自定义类名,默认值:`1`"
|
|
1453
1453
|
},
|
|
1454
1454
|
"nut-notify/position": {
|
|
1455
1455
|
"type": "string",
|
|
1456
|
-
"description": "
|
|
1456
|
+
"description": "属性说明:自定义位置,可选值为 `top` `bottom` `left` `right` `center`,默认值:`top`"
|
|
1457
1457
|
},
|
|
1458
1458
|
"nut-numberkeyboard/v-model:visible": {
|
|
1459
1459
|
"type": "boolean",
|
|
@@ -1500,7 +1500,7 @@
|
|
|
1500
1500
|
"description": "属性说明:自定义遮罩层级,默认值:`2000`"
|
|
1501
1501
|
},
|
|
1502
1502
|
"nut-overlay/duration": {
|
|
1503
|
-
"type": "string,
|
|
1503
|
+
"type": "string, number",
|
|
1504
1504
|
"description": "属性说明:显示/隐藏的动画时长,单位秒,默认值:`0.3`"
|
|
1505
1505
|
},
|
|
1506
1506
|
"nut-overlay/overlay-class": {
|
|
@@ -1735,6 +1735,14 @@
|
|
|
1735
1735
|
"type": "boolean",
|
|
1736
1736
|
"description": "属性说明:是否允许挂载节点,默认值:`false`"
|
|
1737
1737
|
},
|
|
1738
|
+
"nut-popup/overlay-class": {
|
|
1739
|
+
"type": "string",
|
|
1740
|
+
"description": "属性说明:自定义遮罩层类名,默认值:''"
|
|
1741
|
+
},
|
|
1742
|
+
"nut-popup/overlay-style": {
|
|
1743
|
+
"type": "string",
|
|
1744
|
+
"description": "属性说明:自定义遮罩层样式,默认值:''"
|
|
1745
|
+
},
|
|
1738
1746
|
"nut-popup/safe-area-inset-bottom": {
|
|
1739
1747
|
"type": "boolean",
|
|
1740
1748
|
"description": "属性说明:是否开启 iphone 系列全面屏底部安全区适配,仅当 `position` 为 `bottom` 时有效,默认值:`false`"
|
|
@@ -1761,11 +1769,11 @@
|
|
|
1761
1769
|
},
|
|
1762
1770
|
"nut-price/position": {
|
|
1763
1771
|
"type": "string",
|
|
1764
|
-
"description": "属性说明:符号显示在价格前或者后,`before`、`after
|
|
1772
|
+
"description": "属性说明:符号显示在价格前或者后,`before`、`after`,默认值:`before`"
|
|
1765
1773
|
},
|
|
1766
1774
|
"nut-price/size": {
|
|
1767
1775
|
"type": "string",
|
|
1768
|
-
"description": "属性说明:价格尺寸,`large`、`normal`、`small
|
|
1776
|
+
"description": "属性说明:价格尺寸,`large`、`normal`、`small`,默认值:`large`"
|
|
1769
1777
|
},
|
|
1770
1778
|
"nut-progress/percentage": {
|
|
1771
1779
|
"type": "number",
|
|
@@ -2247,10 +2255,6 @@
|
|
|
2247
2255
|
"type": "boolean",
|
|
2248
2256
|
"description": "属性说明:滑动过程中是否禁止冒泡,默认值:true"
|
|
2249
2257
|
},
|
|
2250
|
-
"nut-swiper/is-center": {
|
|
2251
|
-
"type": "boolean",
|
|
2252
|
-
"description": "属性说明:是否居中展示,必须传对应的`width` 和 `height`,默认值:false"
|
|
2253
|
-
},
|
|
2254
2258
|
"nut-switch/v-model": {
|
|
2255
2259
|
"type": "boolean | string | number",
|
|
2256
2260
|
"description": "属性说明:开关状态,默认值:`false`"
|
package/dist/smartips/tags.json
CHANGED
|
@@ -647,6 +647,8 @@
|
|
|
647
647
|
"round",
|
|
648
648
|
"teleport",
|
|
649
649
|
"teleport-disable",
|
|
650
|
+
"overlay-class",
|
|
651
|
+
"overlay-style",
|
|
650
652
|
"safe-area-inset-bottom"
|
|
651
653
|
]
|
|
652
654
|
},
|
|
@@ -838,8 +840,7 @@
|
|
|
838
840
|
"init-page",
|
|
839
841
|
"touchable",
|
|
840
842
|
"is-preventDefault",
|
|
841
|
-
"is-stopPropagation"
|
|
842
|
-
"is-center"
|
|
843
|
+
"is-stopPropagation"
|
|
843
844
|
]
|
|
844
845
|
},
|
|
845
846
|
"nut-swiperitem": {
|