@nutui/nutui 3.1.12-beta.0 → 3.1.13
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 +54 -0
- package/README.md +139 -37
- package/dist/nutui.d.ts +12 -2
- package/dist/nutui.es.js +6704 -5011
- package/dist/nutui.umd.js +6720 -5017
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +18 -17
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/Card.js +105 -0
- package/dist/packages/_es/Cascader.js +547 -0
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +10 -4
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -4
- package/dist/packages/_es/CountUp.js +3 -1
- package/dist/packages/_es/DatePicker.js +2 -2
- package/dist/packages/_es/Dialog.js +10 -23
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Elevator.js +3 -2
- package/dist/packages/_es/Empty.js +74 -0
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +151 -0
- package/dist/packages/_es/FormItem.js +110 -0
- package/dist/packages/_es/Grid.js +12 -0
- package/dist/packages/_es/GridItem.js +149 -0
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +148 -32
- package/dist/packages/_es/Indicator.js +66 -0
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +1 -1
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/Menu.js +2 -2
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +6 -8
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +9 -7
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +2 -2
- package/dist/packages/_es/Popover.js +11 -17
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +3 -3
- package/dist/packages/_es/Rate.js +19 -5
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +138 -0
- package/dist/packages/_es/Sku.js +2 -37
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Swipe.js +2 -2
- package/dist/packages/_es/Swiper.js +11 -11
- package/dist/packages/_es/SwiperItem.js +3 -3
- package/dist/packages/_es/Switch.js +43 -13
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +191 -0
- package/dist/packages/_es/Tabs.js +6 -2
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +18 -8
- package/dist/packages/_es/Uploader.js +1 -1
- package/dist/packages/_es/Video.js +3 -3
- package/dist/packages/_es/common.js +136 -0
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +7 -58
- package/dist/packages/_es/index2.js +56 -28
- package/dist/packages/_es/index3.js +31 -8
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/util.js +47 -0
- package/dist/packages/button/index.scss +6 -0
- package/dist/packages/card/index.scss +97 -0
- package/dist/packages/cascader/index.scss +81 -0
- package/dist/packages/cellgroup/index.scss +9 -0
- package/dist/packages/checkbox/index.scss +1 -1
- package/dist/packages/dialog/index.scss +17 -0
- package/dist/packages/drag/index.scss +4 -0
- package/dist/packages/empty/index.scss +33 -0
- package/dist/packages/fixednav/index.scss +6 -1
- package/dist/packages/form/index.scss +2 -0
- package/dist/packages/formitem/index.scss +63 -0
- package/dist/packages/grid/index.scss +10 -0
- package/dist/packages/griditem/index.scss +92 -0
- package/dist/packages/icon/index.scss +2 -1
- package/dist/packages/indicator/index.scss +48 -0
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/popover/index.scss +2 -2
- package/dist/packages/rate/index.scss +1 -0
- package/dist/packages/skeleton/index.scss +57 -0
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/table/index.scss +81 -0
- package/dist/packages/tabs/index.scss +16 -0
- package/dist/packages/textarea/index.scss +1 -0
- package/dist/packages/timedetail/index.scss +1 -2
- package/dist/packages/timeselect/index.scss +3 -0
- package/dist/packages/toast/index.scss +6 -0
- package/dist/style.css +1 -1
- package/dist/styles/.DS_Store +0 -0
- package/dist/styles/font/config.json +2 -1
- package/dist/styles/font/demo_index.html +26 -3
- package/dist/styles/font/iconfont.css +7 -3
- package/dist/styles/font/iconfont.js +31 -32
- package/dist/styles/font/iconfont.json +7 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +44 -34
- package/dist/styles/variables.scss +64 -1
- package/package.json +3 -4
|
@@ -17,18 +17,26 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __publicField = (obj, key, value) => {
|
|
21
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
+
return value;
|
|
23
|
+
};
|
|
20
24
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
25
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
26
|
* (c) 2021 @jdf2e.
|
|
23
27
|
* Released under the MIT License.
|
|
24
28
|
*/
|
|
25
|
-
import { toRefs, reactive, watch, resolveComponent, openBlock,
|
|
29
|
+
import { toRefs, reactive, watch, onMounted, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withModifiers, createElementBlock, Fragment, renderList, createVNode, createCommentVNode, toDisplayString, render, h } from "vue";
|
|
26
30
|
import { c as createComponent } from "./component.js";
|
|
27
31
|
import Popup from "./Popup.js";
|
|
32
|
+
import Video from "./Video.js";
|
|
33
|
+
import Swiper from "./Swiper.js";
|
|
34
|
+
import SwiperItem from "./SwiperItem.js";
|
|
28
35
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
36
|
import "./OverLay.js";
|
|
30
37
|
import "./Icon.js";
|
|
31
38
|
import "./pxCheck.js";
|
|
39
|
+
import "./index.js";
|
|
32
40
|
const { componentName, create } = createComponent("imagepreview");
|
|
33
41
|
const _sfc_main = create({
|
|
34
42
|
props: {
|
|
@@ -39,21 +47,59 @@ const _sfc_main = create({
|
|
|
39
47
|
images: {
|
|
40
48
|
type: Array,
|
|
41
49
|
default: () => []
|
|
50
|
+
},
|
|
51
|
+
videos: {
|
|
52
|
+
type: Array,
|
|
53
|
+
default: () => []
|
|
54
|
+
},
|
|
55
|
+
contentClose: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
initNo: {
|
|
60
|
+
type: Number,
|
|
61
|
+
default: 1
|
|
62
|
+
},
|
|
63
|
+
paginationVisible: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
paginationColor: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: "#fff"
|
|
42
70
|
}
|
|
43
71
|
},
|
|
72
|
+
emits: ["close"],
|
|
44
73
|
components: {
|
|
45
|
-
[Popup.name]: Popup
|
|
74
|
+
[Popup.name]: Popup,
|
|
75
|
+
[Video.name]: Video,
|
|
76
|
+
[Swiper.name]: Swiper,
|
|
77
|
+
[SwiperItem.name]: SwiperItem
|
|
46
78
|
},
|
|
47
79
|
setup(props, { emit }) {
|
|
48
|
-
|
|
80
|
+
toRefs(props);
|
|
49
81
|
const state = reactive({
|
|
50
|
-
showPop:
|
|
51
|
-
active: 1
|
|
82
|
+
showPop: false,
|
|
83
|
+
active: 1,
|
|
84
|
+
maxNo: 1,
|
|
85
|
+
source: {
|
|
86
|
+
src: "https://storage.jd.com/about/big-final.mp4?Expires=3730193075&AccessKey=3LoYX1dQWa6ZXzQl&Signature=ViMFjz%2BOkBxS%2FY1rjtUVqbopbJI%3D",
|
|
87
|
+
type: "video/mp4"
|
|
88
|
+
},
|
|
89
|
+
options: {
|
|
90
|
+
muted: true,
|
|
91
|
+
controls: true
|
|
92
|
+
}
|
|
52
93
|
});
|
|
53
94
|
const slideChangeEnd = function(page) {
|
|
54
95
|
state.active = page + 1;
|
|
55
96
|
};
|
|
56
|
-
const
|
|
97
|
+
const closeOnImg = () => {
|
|
98
|
+
if (props.contentClose) {
|
|
99
|
+
onClose();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const onClose = () => {
|
|
57
103
|
state.showPop = false;
|
|
58
104
|
state.active = 1;
|
|
59
105
|
emit("close");
|
|
@@ -61,56 +107,126 @@ const _sfc_main = create({
|
|
|
61
107
|
watch(() => props.show, (val) => {
|
|
62
108
|
state.showPop = val;
|
|
63
109
|
});
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
state.active = props.initNo;
|
|
112
|
+
state.showPop = props.show;
|
|
113
|
+
state.maxNo = props.images.length + props.videos.length;
|
|
114
|
+
});
|
|
64
115
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
65
116
|
slideChangeEnd,
|
|
66
|
-
|
|
117
|
+
onClose,
|
|
118
|
+
closeOnImg
|
|
67
119
|
});
|
|
68
120
|
}
|
|
69
121
|
});
|
|
70
|
-
const _hoisted_1 =
|
|
71
|
-
const _hoisted_2 =
|
|
72
|
-
const _hoisted_3 = { class: "nut-imagepreview-index" };
|
|
122
|
+
const _hoisted_1 = ["src"];
|
|
123
|
+
const _hoisted_2 = { class: "nut-imagepreview-index" };
|
|
73
124
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
125
|
+
const _component_nut_video = resolveComponent("nut-video");
|
|
74
126
|
const _component_nut_swiper_item = resolveComponent("nut-swiper-item");
|
|
75
127
|
const _component_nut_swiper = resolveComponent("nut-swiper");
|
|
76
128
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
77
|
-
return openBlock(),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
129
|
+
return openBlock(), createBlock(_component_nut_popup, {
|
|
130
|
+
"pop-class": "custom-pop",
|
|
131
|
+
visible: _ctx.showPop,
|
|
132
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.showPop = $event),
|
|
133
|
+
onClick: _ctx.onClose
|
|
134
|
+
}, {
|
|
135
|
+
default: withCtx(() => [
|
|
136
|
+
createElementVNode("view", {
|
|
137
|
+
class: "nut-imagepreview",
|
|
138
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.closeOnImg && _ctx.closeOnImg(...args), ["stop"]))
|
|
139
|
+
}, [
|
|
85
140
|
_ctx.showPop ? (openBlock(), createBlock(_component_nut_swiper, {
|
|
86
141
|
key: 0,
|
|
87
142
|
"auto-play": 3e3,
|
|
88
143
|
class: "nut-imagepreview-swiper",
|
|
89
144
|
loop: true,
|
|
145
|
+
"is-preventDefault": false,
|
|
90
146
|
direction: "horizontal",
|
|
91
147
|
onChange: _ctx.slideChangeEnd,
|
|
92
|
-
"
|
|
148
|
+
"init-page": _ctx.initNo > _ctx.maxNo ? _ctx.maxNo - 1 : _ctx.initNo - 1,
|
|
149
|
+
"pagination-visible": _ctx.paginationVisible,
|
|
150
|
+
"pagination-color": _ctx.paginationColor
|
|
93
151
|
}, {
|
|
94
152
|
default: withCtx(() => [
|
|
95
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.
|
|
96
|
-
return openBlock(), createBlock(_component_nut_swiper_item, { key:
|
|
153
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.videos, (item, index) => {
|
|
154
|
+
return openBlock(), createBlock(_component_nut_swiper_item, { key: index }, {
|
|
155
|
+
default: withCtx(() => [
|
|
156
|
+
createVNode(_component_nut_video, {
|
|
157
|
+
source: item.source,
|
|
158
|
+
options: item.options
|
|
159
|
+
}, null, 8, ["source", "options"])
|
|
160
|
+
]),
|
|
161
|
+
_: 2
|
|
162
|
+
}, 1024);
|
|
163
|
+
}), 128)),
|
|
164
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (item, index) => {
|
|
165
|
+
return openBlock(), createBlock(_component_nut_swiper_item, { key: index }, {
|
|
97
166
|
default: withCtx(() => [
|
|
98
167
|
createElementVNode("img", {
|
|
99
|
-
src: item.
|
|
168
|
+
src: item.src,
|
|
100
169
|
class: "nut-imagepreview-img"
|
|
101
|
-
}, null, 8,
|
|
170
|
+
}, null, 8, _hoisted_1)
|
|
102
171
|
]),
|
|
103
172
|
_: 2
|
|
104
173
|
}, 1024);
|
|
105
174
|
}), 128))
|
|
106
175
|
]),
|
|
107
176
|
_: 1
|
|
108
|
-
}, 8, ["onChange"])) : createCommentVNode("", true),
|
|
109
|
-
createElementVNode("view",
|
|
110
|
-
])
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
]);
|
|
177
|
+
}, 8, ["onChange", "init-page", "pagination-visible", "pagination-color"])) : createCommentVNode("", true),
|
|
178
|
+
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.active) + " / " + toDisplayString(_ctx.images.length + _ctx.videos.length), 1)
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["visible", "onClick"]);
|
|
183
|
+
}
|
|
184
|
+
var ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
185
|
+
class ImagePreviewOptions {
|
|
186
|
+
constructor() {
|
|
187
|
+
__publicField(this, "show", false);
|
|
188
|
+
__publicField(this, "images", []);
|
|
189
|
+
__publicField(this, "initNo", 1);
|
|
190
|
+
__publicField(this, "paginationVisible", false);
|
|
191
|
+
__publicField(this, "paginationColor", "");
|
|
192
|
+
__publicField(this, "teleport", "body");
|
|
193
|
+
__publicField(this, "onClose", () => {
|
|
194
|
+
});
|
|
195
|
+
}
|
|
114
196
|
}
|
|
115
|
-
|
|
116
|
-
|
|
197
|
+
class ImagePreviewFunction {
|
|
198
|
+
constructor(_options) {
|
|
199
|
+
__publicField(this, "options", new ImagePreviewOptions());
|
|
200
|
+
let options = Object.assign(this.options, _options);
|
|
201
|
+
let elWarp = document.body;
|
|
202
|
+
let teleport = options.teleport;
|
|
203
|
+
if (teleport != "body") {
|
|
204
|
+
if (typeof teleport == "string") {
|
|
205
|
+
elWarp = document.querySelector(teleport);
|
|
206
|
+
} else {
|
|
207
|
+
elWarp = options.teleport;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const root = document.createElement("view");
|
|
211
|
+
root.id = "imagepreview-" + new Date().getTime();
|
|
212
|
+
const Wrapper = {
|
|
213
|
+
setup() {
|
|
214
|
+
options.teleport = `#${root.id}`;
|
|
215
|
+
return () => {
|
|
216
|
+
return h(ImagePreview, options);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
const instance = createVNode(Wrapper);
|
|
221
|
+
elWarp.appendChild(root);
|
|
222
|
+
render(instance, root);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
const _ImagePreview = function(options) {
|
|
226
|
+
return new ImagePreviewFunction(options);
|
|
227
|
+
};
|
|
228
|
+
_ImagePreview.install = (app) => {
|
|
229
|
+
app.use(ImagePreview);
|
|
230
|
+
app.config.globalProperties.$imagepreview = _ImagePreview;
|
|
231
|
+
};
|
|
232
|
+
export { ImagePreview, ImagePreviewOptions, _ImagePreview as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
|
+
* (c) 2021 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { toRefs, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, toDisplayString } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
const { componentName, create } = createComponent("indicator");
|
|
10
|
+
const _sfc_main = create({
|
|
11
|
+
props: {
|
|
12
|
+
size: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 3,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
current: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 1,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
block: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
align: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "center"
|
|
29
|
+
},
|
|
30
|
+
fillZero: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
setup(props) {
|
|
36
|
+
const { block, align } = toRefs(props);
|
|
37
|
+
const classes = computed(() => {
|
|
38
|
+
const prefixCls = componentName;
|
|
39
|
+
return {
|
|
40
|
+
[prefixCls]: true,
|
|
41
|
+
[`${prefixCls}--block`]: block.value,
|
|
42
|
+
[`${prefixCls}--align__${align.value}`]: block.value && align.value
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
return { classes, componentName };
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
49
|
+
return openBlock(), createElementBlock("view", {
|
|
50
|
+
class: normalizeClass(_ctx.classes)
|
|
51
|
+
}, [
|
|
52
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.size, (item) => {
|
|
53
|
+
return openBlock(), createElementBlock(Fragment, { key: item }, [
|
|
54
|
+
item === _ctx.current ? (openBlock(), createElementBlock("view", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: normalizeClass(`${_ctx.componentName}--number`)
|
|
57
|
+
}, toDisplayString(_ctx.fillZero && item < 10 ? `0${item}` : item), 3)) : (openBlock(), createElementBlock("view", {
|
|
58
|
+
key: 1,
|
|
59
|
+
class: normalizeClass(`${_ctx.componentName}--dot`)
|
|
60
|
+
}, null, 2))
|
|
61
|
+
], 64);
|
|
62
|
+
}), 128))
|
|
63
|
+
], 2);
|
|
64
|
+
}
|
|
65
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
66
|
+
export { index as default };
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, reactive, provide, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, createVNode, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useRect } from "./
|
|
8
|
+
import { u as useRect } from "./index3.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const { componentName, create } = createComponent("menu");
|
|
11
11
|
const _sfc_main = create({
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -152,8 +152,9 @@ const _sfc_main = create({
|
|
|
152
152
|
};
|
|
153
153
|
} else {
|
|
154
154
|
if (state.animate) {
|
|
155
|
+
let a = ~~(props.height / props.speed / 4);
|
|
155
156
|
styles = {
|
|
156
|
-
transition: `all ${~~(props.height / props.speed
|
|
157
|
+
transition: `all ${a == 0 ? ~~(props.height / props.speed) : a}s`,
|
|
157
158
|
"margin-top": `-${props.height}px`
|
|
158
159
|
};
|
|
159
160
|
}
|
|
@@ -202,7 +203,7 @@ const _sfc_main = create({
|
|
|
202
203
|
};
|
|
203
204
|
const startRollEasy = () => {
|
|
204
205
|
showhorseLamp();
|
|
205
|
-
state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4
|
|
206
|
+
state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4 * 1e3) + props.standTime);
|
|
206
207
|
};
|
|
207
208
|
const showhorseLamp = () => {
|
|
208
209
|
state.animate = true;
|
|
@@ -210,7 +211,7 @@ const _sfc_main = create({
|
|
|
210
211
|
state.scrollList.push(state.scrollList[0]);
|
|
211
212
|
state.scrollList.shift();
|
|
212
213
|
state.animate = false;
|
|
213
|
-
}, ~~(props.height / props.speed / 4
|
|
214
|
+
}, ~~(props.height / props.speed / 4 * 1e3));
|
|
214
215
|
};
|
|
215
216
|
const startRoll = () => {
|
|
216
217
|
state.timer = setInterval(() => {
|
|
@@ -314,10 +315,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
314
315
|
createElementVNode("view", _hoisted_1, [
|
|
315
316
|
createElementVNode("view", {
|
|
316
317
|
ref: "content",
|
|
317
|
-
class: normalizeClass(["content", [
|
|
318
|
-
_ctx.animationClass,
|
|
319
|
-
{ "nut-ellipsis": !_ctx.scrollable && !_ctx.wrapable }
|
|
320
|
-
]]),
|
|
318
|
+
class: normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis": !_ctx.scrollable && !_ctx.wrapable }]]),
|
|
321
319
|
style: normalizeStyle(_ctx.contentStyle),
|
|
322
320
|
onAnimationend: _cache[0] || (_cache[0] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args)),
|
|
323
321
|
onWebkitAnimationEnd: _cache[1] || (_cache[1] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args))
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -36,10 +36,15 @@ const _sfc_main = create({
|
|
|
36
36
|
randomKeys: {
|
|
37
37
|
type: Boolean,
|
|
38
38
|
default: false
|
|
39
|
+
},
|
|
40
|
+
overlay: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
emits: ["input", "delete", "close", "update:value"],
|
|
42
46
|
setup(props, { emit }) {
|
|
47
|
+
console.log(props.overlay);
|
|
43
48
|
const clickKeyIndex = ref(void 0);
|
|
44
49
|
const show = ref(props.visible);
|
|
45
50
|
const root = ref();
|
|
@@ -171,6 +176,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
176
|
visible: _ctx.show,
|
|
172
177
|
"onUpdate:visible": _cache[6] || (_cache[6] = ($event) => _ctx.show = $event),
|
|
173
178
|
position: "bottom",
|
|
179
|
+
overlay: _ctx.overlay,
|
|
174
180
|
onClickOverlay: _cache[7] || (_cache[7] = ($event) => _ctx.closeBoard()),
|
|
175
181
|
"overlay-class": "nut-numberkeyboard-overlay"
|
|
176
182
|
}, {
|
|
@@ -230,11 +236,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
230
236
|
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.closeBoard())
|
|
231
237
|
}, [
|
|
232
238
|
createElementVNode("div", {
|
|
233
|
-
class: normalizeClass([
|
|
234
|
-
"key",
|
|
235
|
-
"finish",
|
|
236
|
-
{ activeFinsh: _ctx.clickKeyIndex == "finish" }
|
|
237
|
-
])
|
|
239
|
+
class: normalizeClass(["key", "finish", { activeFinsh: _ctx.clickKeyIndex == "finish" }])
|
|
238
240
|
}, " \u5B8C\u6210 ", 2)
|
|
239
241
|
])) : createCommentVNode("", true)
|
|
240
242
|
])) : createCommentVNode("", true)
|
|
@@ -242,7 +244,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
242
244
|
], 512)
|
|
243
245
|
]),
|
|
244
246
|
_: 1
|
|
245
|
-
}, 8, ["visible"]);
|
|
247
|
+
}, 8, ["visible", "overlay"]);
|
|
246
248
|
}
|
|
247
249
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
248
250
|
export { index as default };
|
|
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
|
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
17
|
/*!
|
|
18
|
-
* @nutui/nutui v3.1.
|
|
18
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
19
19
|
* (c) 2021 @jdf2e.
|
|
20
20
|
* Released under the MIT License.
|
|
21
21
|
*/
|
|
@@ -18,13 +18,13 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { ref, reactive, computed, onMounted, watch, toRefs, openBlock, createElementBlock, normalizeStyle, createElementVNode, Fragment, renderList, toDisplayString, toRaw, resolveComponent, normalizeClass, createVNode, withCtx } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { u as useTouch } from "./
|
|
27
|
+
import { u as useTouch } from "./index2.js";
|
|
28
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
29
|
import Popup, { popupProps } from "./Popup.js";
|
|
30
30
|
import "./OverLay.js";
|
|
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { ref, reactive, toRefs, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, normalizeStyle, renderList, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
25
|
+
import { ref, reactive, toRefs, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, withModifiers, normalizeClass, createElementVNode, renderSlot, Fragment, normalizeStyle, renderList, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
27
|
import Popup, { popupProps } from "./Popup.js";
|
|
28
28
|
import Button from "./Button.js";
|
|
@@ -129,22 +129,16 @@ const _sfc_main = create({
|
|
|
129
129
|
emit("update", val);
|
|
130
130
|
emit("update:visible", val);
|
|
131
131
|
};
|
|
132
|
-
const openPopover = (
|
|
133
|
-
event.stopPropagation();
|
|
134
|
-
event.preventDefault();
|
|
132
|
+
const openPopover = () => {
|
|
135
133
|
update(!props.visible);
|
|
136
134
|
emit("open");
|
|
137
135
|
};
|
|
138
|
-
const closePopover = (
|
|
139
|
-
event.stopPropagation();
|
|
140
|
-
event.preventDefault();
|
|
136
|
+
const closePopover = () => {
|
|
141
137
|
emit("close");
|
|
142
138
|
emit("update:visible", false);
|
|
143
139
|
};
|
|
144
|
-
const chooseItem = (
|
|
145
|
-
|
|
146
|
-
event.preventDefault();
|
|
147
|
-
emit("choose");
|
|
140
|
+
const chooseItem = (item, index2) => {
|
|
141
|
+
emit("choose", item, index2);
|
|
148
142
|
};
|
|
149
143
|
return {
|
|
150
144
|
classes,
|
|
@@ -167,7 +161,7 @@ const _hoisted_3 = { class: "title-name" };
|
|
|
167
161
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
168
162
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
169
163
|
return openBlock(), createElementBlock("view", {
|
|
170
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.openPopover && _ctx.openPopover(...args)),
|
|
164
|
+
onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.openPopover && _ctx.openPopover(...args), ["stop"])),
|
|
171
165
|
class: normalizeClass(_ctx.classes)
|
|
172
166
|
}, [
|
|
173
167
|
createElementVNode("div", _hoisted_1, [
|
|
@@ -176,7 +170,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
176
170
|
_ctx.showPopup ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
177
171
|
createElementVNode("view", {
|
|
178
172
|
class: "more-background",
|
|
179
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.closePopover && _ctx.closePopover(...args))
|
|
173
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.closePopover && _ctx.closePopover(...args), ["stop"]))
|
|
180
174
|
}),
|
|
181
175
|
createElementVNode("view", {
|
|
182
176
|
class: normalizeClass(_ctx.popoverContent),
|
|
@@ -187,11 +181,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
187
181
|
style: normalizeStyle(_ctx.getArrowStyle)
|
|
188
182
|
}, null, 6),
|
|
189
183
|
renderSlot(_ctx.$slots, "content"),
|
|
190
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item) => {
|
|
184
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
|
|
191
185
|
return openBlock(), createElementBlock("view", {
|
|
192
|
-
key:
|
|
186
|
+
key: index2,
|
|
193
187
|
class: normalizeClass({ "title-item": true, disabled: item.disabled }),
|
|
194
|
-
onClick: ($event) => _ctx.chooseItem(
|
|
188
|
+
onClick: withModifiers(($event) => _ctx.chooseItem(item, index2), ["stop"])
|
|
195
189
|
}, [
|
|
196
190
|
item.icon ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
197
191
|
createVNode(_component_nut_icon, {
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|