@nutui/nutui 3.1.12-beta.1 → 3.1.14
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 +56 -0
- package/README.md +139 -37
- package/dist/nutui.d.ts +9 -2
- package/dist/nutui.es.js +4830 -2950
- package/dist/nutui.umd.js +4910 -2953
- package/dist/packages/_es/ActionSheet.js +12 -13
- package/dist/packages/_es/Address.js +64 -77
- package/dist/packages/_es/Avatar.js +5 -4
- package/dist/packages/_es/BackTop.js +109 -72
- package/dist/packages/_es/Badge.js +5 -4
- package/dist/packages/_es/Barrage.js +57 -63
- package/dist/packages/_es/Button.js +6 -5
- package/dist/packages/_es/Calendar.js +18 -27
- package/dist/packages/_es/Card.js +8 -7
- package/dist/packages/_es/Cascader.js +547 -0
- package/dist/packages/_es/Cell.js +13 -5
- package/dist/packages/_es/CellGroup.js +14 -7
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +4 -9
- package/dist/packages/_es/CircleProgress.js +46 -142
- package/dist/packages/_es/Col.js +5 -4
- package/dist/packages/_es/Collapse.js +10 -35
- package/dist/packages/_es/CollapseItem.js +35 -80
- package/dist/packages/_es/CountDown.js +7 -10
- package/dist/packages/_es/CountUp.js +33 -34
- package/dist/packages/_es/DatePicker.js +219 -451
- package/dist/packages/_es/Dialog.js +98 -46
- package/dist/packages/_es/Divider.js +6 -5
- package/dist/packages/_es/Drag.js +50 -76
- package/dist/packages/_es/Elevator.js +53 -81
- package/dist/packages/_es/Empty.js +74 -0
- package/dist/packages/_es/FixedNav.js +9 -8
- package/dist/packages/_es/Form.js +23 -9
- package/dist/packages/_es/FormItem.js +5 -4
- package/dist/packages/_es/Grid.js +12 -0
- package/dist/packages/_es/GridItem.js +149 -0
- package/dist/packages/_es/Icon.js +40 -6
- package/dist/packages/_es/ImagePreview.js +158 -44
- package/dist/packages/_es/Indicator.js +66 -0
- package/dist/packages/_es/InfiniteLoading.js +109 -95
- package/dist/packages/_es/Input.js +21 -22
- package/dist/packages/_es/InputNumber.js +18 -24
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +14 -16
- package/dist/packages/_es/MenuItem.js +11 -9
- package/dist/packages/_es/Navbar.js +7 -7
- package/dist/packages/_es/NoticeBar.js +31 -46
- package/dist/packages/_es/Notify.js +166 -30
- package/dist/packages/_es/NumberKeyboard.js +7 -9
- package/dist/packages/_es/OverLay.js +29 -22
- package/dist/packages/_es/Pagination.js +9 -8
- package/dist/packages/_es/Picker.js +447 -61
- package/dist/packages/_es/Popover.js +34 -161
- package/dist/packages/_es/Popup.js +77 -17
- package/dist/packages/_es/Price.js +7 -18
- package/dist/packages/_es/Progress.js +12 -23
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +31 -38
- package/dist/packages/_es/Rate.js +35 -17
- package/dist/packages/_es/Row.js +5 -4
- package/dist/packages/_es/SearchBar.js +5 -7
- package/dist/packages/_es/ShortPassword.js +59 -89
- package/dist/packages/_es/Signature.js +71 -70
- package/dist/packages/_es/Skeleton.js +138 -0
- package/dist/packages/_es/Sku.js +43 -53
- package/dist/packages/_es/Step.js +8 -10
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +28 -43
- package/dist/packages/_es/Swiper.js +418 -17
- package/dist/packages/_es/SwiperItem.js +39 -14
- package/dist/packages/_es/Switch.js +47 -16
- package/dist/packages/_es/TabPane.js +5 -4
- package/dist/packages/_es/Tabbar.js +5 -4
- package/dist/packages/_es/TabbarItem.js +9 -8
- package/dist/packages/_es/Table.js +191 -0
- package/dist/packages/_es/Tabs.js +21 -23
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +12 -16
- package/dist/packages/_es/TimeDetail.js +5 -7
- package/dist/packages/_es/TimePannel.js +5 -7
- package/dist/packages/_es/TimeSelect.js +7 -12
- package/dist/packages/_es/Toast.js +178 -46
- package/dist/packages/_es/Uploader.js +149 -109
- package/dist/packages/_es/Video.js +405 -0
- 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 +58 -43
- package/dist/packages/_es/index3.js +28 -411
- package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/util.js +1 -1
- package/dist/packages/cascader/index.scss +81 -0
- package/dist/packages/cellgroup/index.scss +9 -0
- 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/formitem/index.scss +4 -1
- 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/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/style.es.js +2 -1
- 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 +40 -33
- package/dist/styles/variables.scss +54 -1
- package/package.json +2 -3
- package/dist/packages/_es/commonProps.js +0 -30
- package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +0 -44
- package/dist/packages/_es/use-lock-scroll.js +0 -23
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, normalizeStyle, withDirectives, createVNode, vShow } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
function trimExtraChar(value, char, regExp) {
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
10
|
+
const index2 = value.indexOf(char);
|
|
11
|
+
if (index2 === -1) {
|
|
11
12
|
return value;
|
|
12
13
|
}
|
|
13
|
-
if (char === "-" &&
|
|
14
|
-
return value.slice(0,
|
|
14
|
+
if (char === "-" && index2 !== 0) {
|
|
15
|
+
return value.slice(0, index2);
|
|
15
16
|
}
|
|
16
|
-
return value.slice(0,
|
|
17
|
+
return value.slice(0, index2 + 1) + value.slice(index2).replace(regExp, "");
|
|
17
18
|
}
|
|
18
19
|
function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
19
20
|
if (allowDot) {
|
|
@@ -30,7 +31,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
30
31
|
return value.replace(regExp, "");
|
|
31
32
|
}
|
|
32
33
|
const { componentName, create } = createComponent("input");
|
|
33
|
-
|
|
34
|
+
const _sfc_main = create({
|
|
34
35
|
props: {
|
|
35
36
|
type: {
|
|
36
37
|
type: String,
|
|
@@ -66,7 +67,7 @@ var _sfc_main = create({
|
|
|
66
67
|
},
|
|
67
68
|
maxLength: {
|
|
68
69
|
type: [String, Number],
|
|
69
|
-
default: "
|
|
70
|
+
default: ""
|
|
70
71
|
},
|
|
71
72
|
clearable: {
|
|
72
73
|
type: Boolean,
|
|
@@ -92,15 +93,15 @@ var _sfc_main = create({
|
|
|
92
93
|
const valueChange = (event) => {
|
|
93
94
|
const input = event.target;
|
|
94
95
|
let val = input.value;
|
|
95
|
-
if (props.maxLength && val.length > Number(props.maxLength)) {
|
|
96
|
-
val = val.slice(0, Number(props.maxLength));
|
|
97
|
-
}
|
|
98
96
|
if (props.type === "digit") {
|
|
99
97
|
val = formatNumber(val, true);
|
|
100
98
|
}
|
|
101
99
|
if (props.type === "number") {
|
|
102
100
|
val = formatNumber(val, false);
|
|
103
101
|
}
|
|
102
|
+
if (props.maxLength && val.length > Number(props.maxLength)) {
|
|
103
|
+
val = val.slice(0, Number(props.maxLength));
|
|
104
|
+
}
|
|
104
105
|
emit("update:modelValue", val, event);
|
|
105
106
|
emit("change", val, event);
|
|
106
107
|
};
|
|
@@ -116,6 +117,9 @@ var _sfc_main = create({
|
|
|
116
117
|
}, 0);
|
|
117
118
|
const input = event.target;
|
|
118
119
|
let value = input.value;
|
|
120
|
+
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
121
|
+
value = value.slice(0, Number(props.maxLength));
|
|
122
|
+
}
|
|
119
123
|
emit("blur", value, event);
|
|
120
124
|
};
|
|
121
125
|
const handleClear = (event) => {
|
|
@@ -139,11 +143,7 @@ const _hoisted_2 = {
|
|
|
139
143
|
key: 0,
|
|
140
144
|
class: "label-string"
|
|
141
145
|
};
|
|
142
|
-
const _hoisted_3 =
|
|
143
|
-
key: 0,
|
|
144
|
-
class: "input-text"
|
|
145
|
-
};
|
|
146
|
-
const _hoisted_4 = ["type", "maxlength", "placeholder", "disabled", "readonly", "value"];
|
|
146
|
+
const _hoisted_3 = ["type", "maxlength", "placeholder", "disabled", "readonly", "value"];
|
|
147
147
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
148
148
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
149
149
|
return openBlock(), createElementBlock("view", {
|
|
@@ -152,8 +152,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
152
152
|
createElementVNode("view", _hoisted_1, [
|
|
153
153
|
_ctx.label ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
|
|
154
154
|
]),
|
|
155
|
-
|
|
156
|
-
key: 1,
|
|
155
|
+
createElementVNode("input", {
|
|
157
156
|
class: "input-text",
|
|
158
157
|
style: normalizeStyle(_ctx.styles),
|
|
159
158
|
type: _ctx.type,
|
|
@@ -165,9 +164,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
164
|
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
|
|
166
165
|
onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
|
|
167
166
|
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args))
|
|
168
|
-
}, null, 44,
|
|
167
|
+
}, null, 44, _hoisted_3),
|
|
169
168
|
_ctx.clearable && !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("view", {
|
|
170
|
-
key:
|
|
169
|
+
key: 0,
|
|
171
170
|
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClear && _ctx.handleClear(...args)),
|
|
172
171
|
class: "nut-textinput-clear"
|
|
173
172
|
}, [
|
|
@@ -180,5 +179,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
180
179
|
]) : createCommentVNode("", true)
|
|
181
180
|
], 2);
|
|
182
181
|
}
|
|
183
|
-
_sfc_main
|
|
184
|
-
export {
|
|
182
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
183
|
+
export { index as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode,
|
|
6
|
+
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, createElementVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { componentName, create } = createComponent("inputnumber");
|
|
10
|
-
|
|
11
|
+
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
12
13
|
modelValue: {
|
|
13
14
|
type: [Number, String],
|
|
@@ -60,7 +61,7 @@ var _sfc_main = create({
|
|
|
60
61
|
};
|
|
61
62
|
const change = (event) => {
|
|
62
63
|
const input = event.target;
|
|
63
|
-
emit("update:modelValue", input.
|
|
64
|
+
emit("update:modelValue", input.valueAsNumber, event);
|
|
64
65
|
};
|
|
65
66
|
const emitChange = (value, event) => {
|
|
66
67
|
let output_value = fixedDecimalPlaces(value);
|
|
@@ -91,13 +92,20 @@ var _sfc_main = create({
|
|
|
91
92
|
emit("overlimit", event, "add");
|
|
92
93
|
}
|
|
93
94
|
};
|
|
95
|
+
const focus = (event) => {
|
|
96
|
+
if (props.disabled)
|
|
97
|
+
return;
|
|
98
|
+
if (props.readonly)
|
|
99
|
+
return;
|
|
100
|
+
emit("focus", event);
|
|
101
|
+
};
|
|
94
102
|
const blur = (event) => {
|
|
95
103
|
if (props.disabled)
|
|
96
104
|
return;
|
|
97
105
|
if (props.readonly)
|
|
98
106
|
return;
|
|
99
107
|
const input = event.target;
|
|
100
|
-
let value =
|
|
108
|
+
let value = input.valueAsNumber;
|
|
101
109
|
if (value < Number(props.min)) {
|
|
102
110
|
value = Number(props.min);
|
|
103
111
|
} else if (value > Number(props.max)) {
|
|
@@ -106,15 +114,6 @@ var _sfc_main = create({
|
|
|
106
114
|
emitChange(value, event);
|
|
107
115
|
emit("blur", event);
|
|
108
116
|
};
|
|
109
|
-
const focus = (event) => {
|
|
110
|
-
if (props.disabled)
|
|
111
|
-
return;
|
|
112
|
-
if (props.readonly) {
|
|
113
|
-
blur(event);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
emit("focus", event);
|
|
117
|
-
};
|
|
118
117
|
return {
|
|
119
118
|
classes,
|
|
120
119
|
change,
|
|
@@ -128,11 +127,7 @@ var _sfc_main = create({
|
|
|
128
127
|
};
|
|
129
128
|
}
|
|
130
129
|
});
|
|
131
|
-
const _hoisted_1 =
|
|
132
|
-
key: 0,
|
|
133
|
-
class: "nut-inputnumber__text--readonly"
|
|
134
|
-
};
|
|
135
|
-
const _hoisted_2 = ["min", "max", "disabled", "readonly", "value"];
|
|
130
|
+
const _hoisted_1 = ["min", "max", "disabled", "readonly", "value"];
|
|
136
131
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
137
132
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
138
133
|
return openBlock(), createElementBlock("view", {
|
|
@@ -145,8 +140,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
145
140
|
size: _ctx.buttonSize,
|
|
146
141
|
onClick: _ctx.reduce
|
|
147
142
|
}, null, 8, ["class", "size", "onClick"]),
|
|
148
|
-
|
|
149
|
-
key: 1,
|
|
143
|
+
createElementVNode("input", {
|
|
150
144
|
type: "number",
|
|
151
145
|
min: _ctx.min,
|
|
152
146
|
max: _ctx.max,
|
|
@@ -157,7 +151,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
157
151
|
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
|
|
158
152
|
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
159
153
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
|
|
160
|
-
}, null, 44,
|
|
154
|
+
}, null, 44, _hoisted_1),
|
|
161
155
|
createVNode(_component_nut_icon, {
|
|
162
156
|
name: "plus",
|
|
163
157
|
class: normalizeClass(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.addAllow() }]),
|
|
@@ -166,5 +160,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
166
160
|
}, null, 8, ["class", "size", "onClick"])
|
|
167
161
|
], 6);
|
|
168
162
|
}
|
|
169
|
-
_sfc_main
|
|
170
|
-
export {
|
|
163
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
164
|
+
export { index as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
7
|
import "vue";
|
|
8
8
|
const { create } = createComponent("layout");
|
|
9
|
-
|
|
9
|
+
const _sfc_main = create({});
|
|
10
10
|
export { _sfc_main as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
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
|
|
8
|
+
import { u as useRect } from "./index3.js";
|
|
9
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { componentName, create } = createComponent("menu");
|
|
10
|
-
|
|
11
|
+
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
12
13
|
activeColor: {
|
|
13
14
|
type: String,
|
|
@@ -19,7 +20,7 @@ var _sfc_main = create({
|
|
|
19
20
|
},
|
|
20
21
|
duration: {
|
|
21
22
|
type: [Number, String],
|
|
22
|
-
default: 0
|
|
23
|
+
default: 0
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
setup(props, { emit, slots }) {
|
|
@@ -56,17 +57,14 @@ var _sfc_main = create({
|
|
|
56
57
|
});
|
|
57
58
|
const updateOffset = () => {
|
|
58
59
|
if (barRef.value) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
offset.value = rect.bottom;
|
|
62
|
-
}).exec();
|
|
63
|
-
}, 100);
|
|
60
|
+
const rect = useRect(barRef);
|
|
61
|
+
offset.value = rect.bottom;
|
|
64
62
|
}
|
|
65
63
|
};
|
|
66
64
|
linkChildren({ props, offset });
|
|
67
65
|
const toggleItem = (active) => {
|
|
68
|
-
children.forEach((item,
|
|
69
|
-
if (
|
|
66
|
+
children.forEach((item, index2) => {
|
|
67
|
+
if (index2 === active) {
|
|
70
68
|
updateOffset();
|
|
71
69
|
item.toggle();
|
|
72
70
|
} else if (item.state.showPopup) {
|
|
@@ -94,11 +92,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
94
92
|
class: normalizeClass(["nut-menu__bar", { opened: _ctx.opened }]),
|
|
95
93
|
ref: "barRef"
|
|
96
94
|
}, [
|
|
97
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.children, (item,
|
|
95
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.children, (item, index2) => {
|
|
98
96
|
return openBlock(), createElementBlock("view", {
|
|
99
|
-
key:
|
|
97
|
+
key: index2,
|
|
100
98
|
class: normalizeClass(["nut-menu__item", { disabled: item.disabled }]),
|
|
101
|
-
onClick: ($event) => !item.disabled && _ctx.toggleItem(
|
|
99
|
+
onClick: ($event) => !item.disabled && _ctx.toggleItem(index2),
|
|
102
100
|
style: normalizeStyle({ color: item.state.showPopup ? _ctx.activeColor : "" })
|
|
103
101
|
}, [
|
|
104
102
|
createElementVNode("view", {
|
|
@@ -117,5 +115,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
117
115
|
renderSlot(_ctx.$slots, "default")
|
|
118
116
|
], 2);
|
|
119
117
|
}
|
|
120
|
-
_sfc_main
|
|
121
|
-
export {
|
|
118
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
119
|
+
export { index as default };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, computed, inject, getCurrentInstance, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import
|
|
9
|
-
import "./
|
|
8
|
+
import _sfc_main$1 from "./Icon.js";
|
|
9
|
+
import Popup from "./Popup.js";
|
|
10
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
11
|
import "./pxCheck.js";
|
|
12
|
+
import "./OverLay.js";
|
|
11
13
|
const { componentName, create } = createComponent("menu-item");
|
|
12
|
-
|
|
14
|
+
const _sfc_main = create({
|
|
13
15
|
props: {
|
|
14
16
|
title: String,
|
|
15
17
|
options: {
|
|
@@ -32,7 +34,7 @@ var _sfc_main = create({
|
|
|
32
34
|
},
|
|
33
35
|
components: {
|
|
34
36
|
[_sfc_main$1.name]: _sfc_main$1,
|
|
35
|
-
[
|
|
37
|
+
[Popup.name]: Popup
|
|
36
38
|
},
|
|
37
39
|
emits: ["update:modelValue", "change"],
|
|
38
40
|
setup(props, { emit, slots }) {
|
|
@@ -136,9 +138,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
136
138
|
}), {
|
|
137
139
|
default: withCtx(() => [
|
|
138
140
|
createElementVNode("view", _hoisted_1, [
|
|
139
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option,
|
|
141
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index2) => {
|
|
140
142
|
return openBlock(), createElementBlock("view", {
|
|
141
|
-
key:
|
|
143
|
+
key: index2,
|
|
142
144
|
class: normalizeClass(["nut-menu-item__option", { active: option.value === _ctx.modelValue }]),
|
|
143
145
|
style: normalizeStyle({ "flex-basis": 100 / _ctx.cols + "%" }),
|
|
144
146
|
onClick: ($event) => _ctx.onClick(option)
|
|
@@ -162,5 +164,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
162
164
|
[vShow, _ctx.state.showWrapper]
|
|
163
165
|
]);
|
|
164
166
|
}
|
|
165
|
-
_sfc_main
|
|
166
|
-
export {
|
|
167
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
168
|
+
export { index as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, normalizeStyle, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { componentName, create } = createComponent("navbar");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
leftShow: { type: Boolean, default: true },
|
|
12
13
|
title: { type: String, default: "" },
|
|
@@ -108,7 +109,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
108
109
|
}, [
|
|
109
110
|
_ctx.title ? (openBlock(), createElementBlock("view", {
|
|
110
111
|
key: 0,
|
|
111
|
-
class: "text__title",
|
|
112
112
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleCenter && _ctx.handleCenter(...args))
|
|
113
113
|
}, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
114
114
|
_ctx.titIcon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
@@ -118,11 +118,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
118
|
onClick: _ctx.handleCenterIcon
|
|
119
119
|
}, null, 8, ["name", "onClick"])) : createCommentVNode("", true),
|
|
120
120
|
createElementVNode("view", _hoisted_2, [
|
|
121
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabs, (item,
|
|
121
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabs, (item, index2) => {
|
|
122
122
|
return openBlock(), createElementBlock("view", {
|
|
123
123
|
class: normalizeClass([
|
|
124
124
|
"tab-title-box",
|
|
125
|
-
{ "nut-tab-active": _ctx.activeIndex == item.id || _ctx.activeIndex ==
|
|
125
|
+
{ "nut-tab-active": _ctx.activeIndex == item.id || _ctx.activeIndex == index2 }
|
|
126
126
|
]),
|
|
127
127
|
onClick: ($event) => _ctx.switchTitle(item.id, item.name),
|
|
128
128
|
key: item.id
|
|
@@ -156,5 +156,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
156
156
|
], 2)) : createCommentVNode("", true)
|
|
157
157
|
], 2);
|
|
158
158
|
}
|
|
159
|
-
_sfc_main
|
|
160
|
-
export {
|
|
159
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
160
|
+
export { index as default };
|
|
@@ -17,19 +17,16 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
20
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
25
22
|
* (c) 2021 @jdf2e.
|
|
26
23
|
* Released under the MIT License.
|
|
27
24
|
*/
|
|
28
25
|
import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, createBlock, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, withModifiers, createVNode, vShow, Fragment, renderList } from "vue";
|
|
29
26
|
import { c as createComponent } from "./component.js";
|
|
30
|
-
import
|
|
27
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
31
28
|
const { componentName, create } = createComponent("noticebar");
|
|
32
|
-
|
|
29
|
+
const _sfc_main = create({
|
|
33
30
|
props: {
|
|
34
31
|
direction: {
|
|
35
32
|
type: String,
|
|
@@ -68,11 +65,11 @@ var _sfc_main = create({
|
|
|
68
65
|
leftIcon: { type: String, default: "" },
|
|
69
66
|
color: {
|
|
70
67
|
type: String,
|
|
71
|
-
default: "
|
|
68
|
+
default: ""
|
|
72
69
|
},
|
|
73
70
|
background: {
|
|
74
71
|
type: String,
|
|
75
|
-
default: "
|
|
72
|
+
default: ""
|
|
76
73
|
},
|
|
77
74
|
delay: {
|
|
78
75
|
type: [String, Number],
|
|
@@ -125,10 +122,9 @@ var _sfc_main = create({
|
|
|
125
122
|
}
|
|
126
123
|
});
|
|
127
124
|
const barStyle = computed(() => {
|
|
128
|
-
let style = {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
};
|
|
125
|
+
let style = {};
|
|
126
|
+
props.color && (style.color = props.color);
|
|
127
|
+
props.background && (style.background = props.background);
|
|
132
128
|
if (props.direction == "vertical") {
|
|
133
129
|
style.height = `${props.height}px`;
|
|
134
130
|
}
|
|
@@ -156,8 +152,9 @@ var _sfc_main = create({
|
|
|
156
152
|
};
|
|
157
153
|
} else {
|
|
158
154
|
if (state.animate) {
|
|
155
|
+
let a = ~~(props.height / props.speed / 4);
|
|
159
156
|
styles = {
|
|
160
|
-
transition: `all ${~~(props.height / props.speed
|
|
157
|
+
transition: `all ${a == 0 ? ~~(props.height / props.speed) : a}s`,
|
|
161
158
|
"margin-top": `-${props.height}px`
|
|
162
159
|
};
|
|
163
160
|
}
|
|
@@ -178,25 +175,17 @@ var _sfc_main = create({
|
|
|
178
175
|
if (!wrap.value || !content.value) {
|
|
179
176
|
return;
|
|
180
177
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
state.offsetWidth = offsetWidth;
|
|
193
|
-
state.duration = offsetWidth / props.speed;
|
|
194
|
-
state.animationClass = "play";
|
|
195
|
-
} else {
|
|
196
|
-
state.animationClass = "";
|
|
197
|
-
}
|
|
198
|
-
}).exec();
|
|
199
|
-
}, 100);
|
|
178
|
+
const wrapWidth = wrap.value.getBoundingClientRect().width;
|
|
179
|
+
const offsetWidth = content.value.getBoundingClientRect().width;
|
|
180
|
+
if (props.scrollable && offsetWidth > wrapWidth) {
|
|
181
|
+
state.wrapWidth = wrapWidth;
|
|
182
|
+
state.offsetWidth = offsetWidth;
|
|
183
|
+
state.duration = offsetWidth / props.speed;
|
|
184
|
+
state.animationClass = "play";
|
|
185
|
+
} else {
|
|
186
|
+
state.animationClass = "";
|
|
187
|
+
}
|
|
188
|
+
});
|
|
200
189
|
};
|
|
201
190
|
const handleClick = (event) => {
|
|
202
191
|
emit("click", event);
|
|
@@ -214,7 +203,7 @@ var _sfc_main = create({
|
|
|
214
203
|
};
|
|
215
204
|
const startRollEasy = () => {
|
|
216
205
|
showhorseLamp();
|
|
217
|
-
state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4
|
|
206
|
+
state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4 * 1e3) + props.standTime);
|
|
218
207
|
};
|
|
219
208
|
const showhorseLamp = () => {
|
|
220
209
|
state.animate = true;
|
|
@@ -222,7 +211,7 @@ var _sfc_main = create({
|
|
|
222
211
|
state.scrollList.push(state.scrollList[0]);
|
|
223
212
|
state.scrollList.shift();
|
|
224
213
|
state.animate = false;
|
|
225
|
-
}, ~~(props.height / props.speed / 4
|
|
214
|
+
}, ~~(props.height / props.speed / 4 * 1e3));
|
|
226
215
|
};
|
|
227
216
|
const startRoll = () => {
|
|
228
217
|
state.timer = setInterval(() => {
|
|
@@ -326,16 +315,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
326
315
|
createElementVNode("view", _hoisted_1, [
|
|
327
316
|
createElementVNode("view", {
|
|
328
317
|
ref: "content",
|
|
329
|
-
class: normalizeClass(["content", [
|
|
330
|
-
_ctx.animationClass,
|
|
331
|
-
{ "nut-ellipsis": !_ctx.scrollable && !_ctx.wrapable }
|
|
332
|
-
]]),
|
|
318
|
+
class: normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis": !_ctx.scrollable && !_ctx.wrapable }]]),
|
|
333
319
|
style: normalizeStyle(_ctx.contentStyle),
|
|
334
320
|
onAnimationend: _cache[0] || (_cache[0] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args)),
|
|
335
321
|
onWebkitAnimationEnd: _cache[1] || (_cache[1] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args))
|
|
336
322
|
}, [
|
|
337
323
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
338
|
-
createTextVNode(toDisplayString(_ctx.text), 1)
|
|
324
|
+
createTextVNode("1" + toDisplayString(_ctx.text), 1)
|
|
339
325
|
])
|
|
340
326
|
], 38)
|
|
341
327
|
], 512),
|
|
@@ -346,7 +332,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
346
332
|
}, [
|
|
347
333
|
createVNode(_component_nut_icon, {
|
|
348
334
|
name: "close",
|
|
349
|
-
size: "11",
|
|
350
335
|
color: _ctx.color
|
|
351
336
|
}, null, 8, ["color"])
|
|
352
337
|
])) : createCommentVNode("", true)
|
|
@@ -363,9 +348,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
363
348
|
class: "horseLamp_list",
|
|
364
349
|
style: normalizeStyle(_ctx.horseLampStyle)
|
|
365
350
|
}, [
|
|
366
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item,
|
|
351
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
|
|
367
352
|
return openBlock(), createBlock(_component_ScrollItem, {
|
|
368
|
-
key:
|
|
353
|
+
key: index2,
|
|
369
354
|
style: normalizeStyle({ height: _ctx.height + "px", "line-height": _ctx.height + "px" }),
|
|
370
355
|
item
|
|
371
356
|
}, null, 8, ["style", "item"]);
|
|
@@ -375,10 +360,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
375
360
|
class: "horseLamp_list",
|
|
376
361
|
style: normalizeStyle(_ctx.horseLampStyle)
|
|
377
362
|
}, [
|
|
378
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item,
|
|
363
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
|
|
379
364
|
return openBlock(), createElementBlock("li", {
|
|
380
365
|
class: "horseLamp_list_item",
|
|
381
|
-
key:
|
|
366
|
+
key: index2,
|
|
382
367
|
style: normalizeStyle({ height: _ctx.height }),
|
|
383
368
|
onClick: ($event) => _ctx.go(item)
|
|
384
369
|
}, toDisplayString(item), 13, _hoisted_2);
|
|
@@ -398,5 +383,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
398
383
|
], 4)) : createCommentVNode("", true)
|
|
399
384
|
], 2);
|
|
400
385
|
}
|
|
401
|
-
_sfc_main
|
|
402
|
-
export {
|
|
386
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
387
|
+
export { index as default };
|