@nutui/nutui 4.3.2 → 4.3.3
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/CHANGELOG.md +20 -0
- package/dist/nutui.es.js +2 -4
- package/dist/nutui.js +6502 -6815
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/addresslist/AddressList.js +2 -2
- package/dist/packages/backtop/Backtop.js +79 -89
- package/dist/packages/calendar/Calendar.js +814 -3
- package/dist/packages/calendar/index.scss +0 -1
- package/dist/packages/calendarcard/CalendarCard.js +1 -1
- package/dist/packages/card/Card.js +2 -2
- package/dist/packages/circleprogress/CircleProgress.js +90 -97
- package/dist/packages/comment/Comment.js +2 -2
- package/dist/packages/ecard/Ecard.js +2 -2
- package/dist/packages/input/Input.js +7 -7
- package/dist/packages/inputnumber/InputNumber.js +83 -102
- package/dist/packages/invoice/Invoice.js +87 -138
- package/dist/packages/navbar/Navbar.js +103 -115
- package/dist/packages/progress/Progress.js +96 -115
- package/dist/packages/rate/Rate.js +98 -140
- package/dist/packages/sku/Sku.js +2 -2
- package/dist/packages/swipe/Swipe.js +96 -110
- package/dist/packages/swipegroup/SwipeGroup.js +41 -23
- package/dist/packages/tag/Tag.js +57 -66
- package/dist/packages/uploader/Uploader.js +4 -4
- package/dist/smartips/web-types.json +2 -2
- package/dist/styles/base-jdb.css +1 -1
- package/dist/styles/base-jddkh.css +1 -1
- package/dist/styles/base-jdt.css +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/themes/jdb.scss +0 -1
- package/dist/styles/themes/jddkh.scss +0 -1
- package/dist/styles/themes/jdt.scss +0 -1
- package/dist/styles/variables-jdb.scss +0 -1
- package/dist/styles/variables-jddkh.scss +0 -1
- package/dist/styles/variables-jdt.scss +0 -1
- package/dist/styles/variables.scss +0 -1
- package/dist/types/__VUE/backtop/backtop.vue.d.ts +87 -0
- package/dist/types/__VUE/backtop/index.d.ts +5 -0
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -12
- package/dist/types/__VUE/circleprogress/circle-progress.vue.d.ts +88 -0
- package/dist/types/__VUE/circleprogress/index.d.ts +6 -0
- package/dist/types/__VUE/inputnumber/index.d.ts +5 -0
- package/dist/types/__VUE/inputnumber/input-number.vue.d.ts +112 -0
- package/dist/types/__VUE/invoice/index.d.ts +6 -0
- package/dist/types/__VUE/invoice/invoice.vue.d.ts +59 -0
- package/dist/types/__VUE/invoice/types.d.ts +12 -0
- package/dist/types/__VUE/navbar/index.d.ts +5 -0
- package/dist/types/__VUE/navbar/navbar.vue.d.ts +125 -0
- package/dist/types/__VUE/progress/index.d.ts +6 -0
- package/dist/types/__VUE/progress/progress.vue.d.ts +91 -0
- package/dist/types/__VUE/rate/index.d.ts +5 -0
- package/dist/types/__VUE/rate/rate.vue.d.ts +208 -0
- package/dist/types/__VUE/swipe/index.d.ts +6 -0
- package/dist/types/__VUE/swipe/swipe.vue.d.ts +79 -0
- package/dist/types/__VUE/swipe/types.d.ts +1 -0
- package/dist/types/__VUE/swipegroup/index.d.ts +5 -0
- package/dist/types/__VUE/swipegroup/swipe-group.vue.d.ts +47 -0
- package/dist/types/__VUE/tag/index.d.ts +6 -0
- package/dist/types/__VUE/tag/tag.vue.d.ts +90 -0
- package/dist/types/__VUE/tag/types.d.ts +1 -1
- package/dist/types/index.d.ts +22 -13
- package/package.json +1 -1
- package/dist/packages/calendaritem/CalendarItem.js +0 -819
- package/dist/packages/calendaritem/index.css +0 -0
- package/dist/packages/calendaritem/index.mjs +0 -2
- package/dist/packages/calendaritem/index.scss +0 -0
- package/dist/packages/calendaritem/style/css.mjs +0 -2
- package/dist/packages/calendaritem/style/index.mjs +0 -2
- package/dist/types/__VUE/backtop/index.vue.d.ts +0 -98
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +0 -95
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +0 -117
- package/dist/types/__VUE/invoice/index.vue.d.ts +0 -53
- package/dist/types/__VUE/navbar/index.vue.d.ts +0 -129
- package/dist/types/__VUE/progress/index.vue.d.ts +0 -120
- package/dist/types/__VUE/rate/index.vue.d.ts +0 -240
- package/dist/types/__VUE/swipe/index.vue.d.ts +0 -70
- package/dist/types/__VUE/swipegroup/index.vue.d.ts +0 -26
- package/dist/types/__VUE/tag/index.vue.d.ts +0 -94
|
@@ -5,7 +5,7 @@ import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
|
5
5
|
import { Del, Edit } from "@nutui/icons-vue";
|
|
6
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
7
7
|
import { Button as _sfc_main$3 } from "../button/Button.js";
|
|
8
|
-
import
|
|
8
|
+
import { Swipe as _sfc_main$4 } from "../swipe/Swipe.js";
|
|
9
9
|
const { create: create$2 } = createComponent("address-list-item");
|
|
10
10
|
const cN$1 = "NutAddressList";
|
|
11
11
|
const _sfc_main$2 = create$2({
|
|
@@ -107,7 +107,7 @@ const _sfc_main$1 = create$1({
|
|
|
107
107
|
components: {
|
|
108
108
|
ItemContents,
|
|
109
109
|
NutButton: _sfc_main$3,
|
|
110
|
-
NutSwipe
|
|
110
|
+
NutSwipe: _sfc_main$4
|
|
111
111
|
},
|
|
112
112
|
setup(props, { emit }) {
|
|
113
113
|
const renderCompontent = () => {
|
|
@@ -1,57 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, ref, computed, onMounted, onUnmounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, createVNode, unref } from "vue";
|
|
3
21
|
import { r as requestAniFrame, c as cancelRaf } from "../raf-MQjoO-Ag.js";
|
|
4
22
|
import { Top } from "@nutui/icons-vue";
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
23
|
+
import { w as withInstall } from "../with-install-p59gYYU_.js";
|
|
24
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
25
|
+
name: "NutBacktop"
|
|
26
|
+
}), {
|
|
27
|
+
__name: "backtop",
|
|
11
28
|
props: {
|
|
12
|
-
bottom: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
elId: {
|
|
21
|
-
type: [String],
|
|
22
|
-
default: "body"
|
|
23
|
-
},
|
|
24
|
-
distance: {
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 200
|
|
27
|
-
},
|
|
28
|
-
zIndex: {
|
|
29
|
-
type: Number,
|
|
30
|
-
default: 10
|
|
31
|
-
},
|
|
32
|
-
isAnimation: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: true
|
|
35
|
-
},
|
|
36
|
-
duration: {
|
|
37
|
-
type: Number,
|
|
38
|
-
default: 1e3
|
|
39
|
-
}
|
|
29
|
+
bottom: { default: 20 },
|
|
30
|
+
right: { default: 10 },
|
|
31
|
+
elId: { default: "body" },
|
|
32
|
+
distance: { default: 200 },
|
|
33
|
+
zIndex: { default: 10 },
|
|
34
|
+
isAnimation: { type: Boolean, default: true },
|
|
35
|
+
duration: { default: 1e3 }
|
|
40
36
|
},
|
|
41
37
|
emits: ["click"],
|
|
42
|
-
setup(
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
setup(__props, { emit: __emit }) {
|
|
39
|
+
const props = __props;
|
|
40
|
+
const emit = __emit;
|
|
41
|
+
const backTop = ref(false);
|
|
42
|
+
const scrollTop = ref(0);
|
|
43
|
+
const scrollEl = ref(window);
|
|
44
|
+
const startTime = ref(0);
|
|
45
|
+
const keepAlive = ref(false);
|
|
50
46
|
const classes = computed(() => {
|
|
51
|
-
const prefixCls =
|
|
47
|
+
const prefixCls = "nut-backtop";
|
|
52
48
|
return {
|
|
53
49
|
[prefixCls]: true,
|
|
54
|
-
show:
|
|
50
|
+
show: backTop.value
|
|
55
51
|
};
|
|
56
52
|
});
|
|
57
53
|
const style = computed(() => {
|
|
@@ -62,24 +58,24 @@ const _sfc_main = create({
|
|
|
62
58
|
};
|
|
63
59
|
});
|
|
64
60
|
function scrollListener() {
|
|
65
|
-
if (
|
|
66
|
-
|
|
61
|
+
if (scrollEl.value instanceof Window) {
|
|
62
|
+
scrollTop.value = scrollEl.value.scrollY;
|
|
67
63
|
} else {
|
|
68
|
-
|
|
64
|
+
scrollTop.value = scrollEl.value.scrollTop;
|
|
69
65
|
}
|
|
70
|
-
|
|
66
|
+
backTop.value = scrollTop.value >= props.distance;
|
|
71
67
|
}
|
|
72
68
|
function scroll(y = 0) {
|
|
73
|
-
if (
|
|
69
|
+
if (scrollEl.value instanceof Window) {
|
|
74
70
|
window.scrollTo(0, y);
|
|
75
71
|
} else {
|
|
76
|
-
|
|
72
|
+
scrollEl.value.scrollTop = y;
|
|
77
73
|
}
|
|
78
74
|
}
|
|
79
75
|
function scrollAnimation() {
|
|
80
76
|
let cid = requestAniFrame(function fn() {
|
|
81
|
-
var t = props.duration - Math.max(0,
|
|
82
|
-
var y = t * -
|
|
77
|
+
var t = props.duration - Math.max(0, startTime.value - +/* @__PURE__ */ new Date() + props.duration);
|
|
78
|
+
var y = t * -scrollTop.value / props.duration + scrollTop.value;
|
|
83
79
|
scroll(y);
|
|
84
80
|
cid = requestAniFrame(fn);
|
|
85
81
|
if (t == props.duration || y == 0) {
|
|
@@ -88,27 +84,27 @@ const _sfc_main = create({
|
|
|
88
84
|
});
|
|
89
85
|
}
|
|
90
86
|
function addEventListener() {
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
scrollEl.value.addEventListener("scroll", scrollListener, false);
|
|
88
|
+
scrollEl.value.addEventListener("resize", scrollListener, false);
|
|
93
89
|
}
|
|
94
90
|
function removeEventListener() {
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
scrollEl.value.removeEventListener("scroll", scrollListener, false);
|
|
92
|
+
scrollEl.value.removeEventListener("resize", scrollListener, false);
|
|
97
93
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
94
|
+
function handleClick(e) {
|
|
95
|
+
startTime.value = +/* @__PURE__ */ new Date();
|
|
100
96
|
props.isAnimation && props.duration > 0 ? scrollAnimation() : scroll();
|
|
101
97
|
emit("click", e);
|
|
102
98
|
}
|
|
103
99
|
function init() {
|
|
104
100
|
if (props.elId && document.getElementById(props.elId)) {
|
|
105
|
-
|
|
101
|
+
scrollEl.value = document.getElementById(props.elId);
|
|
106
102
|
}
|
|
107
103
|
addEventListener();
|
|
108
104
|
}
|
|
109
105
|
onMounted(() => {
|
|
110
106
|
if (props.distance == 0) {
|
|
111
|
-
|
|
107
|
+
backTop.value = true;
|
|
112
108
|
}
|
|
113
109
|
init();
|
|
114
110
|
});
|
|
@@ -116,40 +112,34 @@ const _sfc_main = create({
|
|
|
116
112
|
removeEventListener();
|
|
117
113
|
});
|
|
118
114
|
onActivated(() => {
|
|
119
|
-
if (
|
|
120
|
-
|
|
115
|
+
if (keepAlive.value) {
|
|
116
|
+
keepAlive.value = false;
|
|
121
117
|
init();
|
|
122
118
|
}
|
|
123
119
|
});
|
|
124
120
|
onDeactivated(() => {
|
|
125
|
-
|
|
121
|
+
keepAlive.value = true;
|
|
126
122
|
removeEventListener();
|
|
127
123
|
});
|
|
128
|
-
return {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
124
|
+
return (_ctx, _cache) => {
|
|
125
|
+
return openBlock(), createElementBlock("div", {
|
|
126
|
+
class: normalizeClass(classes.value),
|
|
127
|
+
style: normalizeStyle(style.value),
|
|
128
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
129
|
+
}, [
|
|
130
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
131
|
+
createVNode(unref(Top), {
|
|
132
|
+
width: "19px",
|
|
133
|
+
height: "19px",
|
|
134
|
+
class: "nut-backtop-main"
|
|
135
|
+
})
|
|
136
|
+
])
|
|
137
|
+
], 6);
|
|
133
138
|
};
|
|
134
139
|
}
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
const _component_Top = resolveComponent("Top");
|
|
138
|
-
return openBlock(), createElementBlock("div", {
|
|
139
|
-
class: normalizeClass(_ctx.classes),
|
|
140
|
-
style: normalizeStyle(_ctx.style),
|
|
141
|
-
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.click && _ctx.click(...args), ["stop"]))
|
|
142
|
-
}, [
|
|
143
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
144
|
-
createVNode(_component_Top, {
|
|
145
|
-
width: "19px",
|
|
146
|
-
height: "19px",
|
|
147
|
-
class: "nut-backtop-main"
|
|
148
|
-
})
|
|
149
|
-
])
|
|
150
|
-
], 6);
|
|
151
|
-
}
|
|
152
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
140
|
+
}));
|
|
141
|
+
withInstall(_sfc_main);
|
|
153
142
|
export {
|
|
154
|
-
|
|
143
|
+
_sfc_main as Backtop,
|
|
144
|
+
_sfc_main as default
|
|
155
145
|
};
|