@nutui/nutui 3.1.16 → 3.1.18-beta.0
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 +37 -0
- package/README.md +1 -1
- package/dist/nutui.d.ts +3 -1
- package/dist/nutui.es.js +1860 -773
- package/dist/nutui.umd.js +1871 -778
- package/dist/packages/_es/ActionSheet.js +8 -3
- package/dist/packages/_es/Address.js +60 -7
- package/dist/packages/_es/Audio.js +289 -0
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/BackTop.js +3 -3
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +13 -4
- package/dist/packages/_es/Calendar.js +428 -209
- package/dist/packages/_es/Card.js +1 -2
- package/dist/packages/_es/Cascader.js +2 -2
- package/dist/packages/_es/Cell.js +2 -2
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +2 -2
- 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 +4 -2
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +1 -2
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Elevator.js +10 -5
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +2 -2
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +8 -5
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +7 -2
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/Menu.js +1 -1
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +18 -59
- package/dist/packages/_es/NoticeBar.js +38 -23
- package/dist/packages/_es/Notify.js +2 -2
- package/dist/packages/_es/NumberKeyboard.js +1 -2
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +2 -1
- package/dist/packages/_es/Popover.js +4 -1
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +24 -11
- package/dist/packages/_es/Radio.js +2 -2
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +2 -2
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +12 -4
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +8 -6
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +143 -0
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +2 -2
- package/dist/packages/_es/Swiper.js +2 -2
- package/dist/packages/_es/SwiperItem.js +3 -8
- package/dist/packages/_es/Switch.js +2 -2
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +7 -3
- package/dist/packages/_es/Table.js +2 -2
- package/dist/packages/_es/Tabs.js +1 -1
- 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 +7 -2
- package/dist/packages/_es/Toast.js +15 -8
- package/dist/packages/_es/Uploader.js +1 -1
- package/dist/packages/_es/Video.js +1 -55
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +5 -7
- package/dist/packages/_es/index2.js +7 -58
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +64 -0
- 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 +1 -1
- package/dist/packages/actionsheet/index.scss +7 -6
- package/dist/packages/address/index.scss +8 -0
- package/dist/packages/audio/index.scss +66 -0
- package/dist/packages/audiooperate/index.scss +13 -0
- package/dist/packages/button/index.scss +5 -5
- package/dist/packages/calendar/index.scss +47 -41
- package/dist/packages/calendaritem/index.scss +57 -42
- package/dist/packages/cell/index.scss +3 -3
- package/dist/packages/cellgroup/index.scss +1 -1
- package/dist/packages/elevator/index.scss +3 -0
- package/dist/packages/infiniteloading/index.scss +1 -1
- package/dist/packages/input/index.scss +4 -2
- package/dist/packages/navbar/index.scss +2 -0
- package/dist/packages/noticebar/index.scss +11 -5
- package/dist/packages/notify/index.scss +1 -0
- package/dist/packages/progress/index.scss +21 -17
- package/dist/packages/range/index.scss +8 -8
- package/dist/packages/row/index.scss +3 -0
- package/dist/packages/sticky/index.scss +5 -0
- package/dist/packages/swiper/index.scss +4 -4
- package/dist/packages/switch/index.scss +8 -8
- package/dist/packages/tabbar/index.scss +7 -4
- package/dist/packages/tabbaritem/index.scss +4 -3
- package/dist/packages/tabs/index.scss +1 -0
- package/dist/packages/toast/index.scss +8 -7
- package/dist/style.css +1 -1
- package/dist/styles/font/config.json +6 -1
- package/dist/styles/font/demo_index.html +118 -3
- package/dist/styles/font/iconfont.css +23 -3
- package/dist/styles/font/iconfont.js +25 -24
- package/dist/styles/font/iconfont.json +35 -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 +46 -43
- package/dist/styles/variables.scss +123 -42
- package/package.json +12 -13
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, createBlock, createCommentVNode, createElementVNode,
|
|
25
|
+
import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, renderSlot, createBlock, createCommentVNode, createElementVNode, createTextVNode, toDisplayString, withModifiers, createVNode, vShow, Fragment, renderList } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
27
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
28
|
const { componentName, create } = createComponent("noticebar");
|
|
@@ -63,6 +63,7 @@ const _sfc_main = create({
|
|
|
63
63
|
default: false
|
|
64
64
|
},
|
|
65
65
|
leftIcon: { type: String, default: "" },
|
|
66
|
+
rightIcon: { type: String, default: "" },
|
|
66
67
|
color: {
|
|
67
68
|
type: String,
|
|
68
69
|
default: ""
|
|
@@ -77,7 +78,7 @@ const _sfc_main = create({
|
|
|
77
78
|
},
|
|
78
79
|
scrollable: {
|
|
79
80
|
type: Boolean,
|
|
80
|
-
default:
|
|
81
|
+
default: null
|
|
81
82
|
},
|
|
82
83
|
speed: {
|
|
83
84
|
type: Number,
|
|
@@ -87,12 +88,12 @@ const _sfc_main = create({
|
|
|
87
88
|
components: {
|
|
88
89
|
ScrollItem: function(props) {
|
|
89
90
|
props.item.props.style = props.style;
|
|
91
|
+
props.item.key = props.key;
|
|
90
92
|
return h(props.item);
|
|
91
93
|
}
|
|
92
94
|
},
|
|
93
95
|
emits: ["click", "close"],
|
|
94
96
|
setup(props, { emit, slots }) {
|
|
95
|
-
console.log("componentName", componentName);
|
|
96
97
|
const wrap = ref(null);
|
|
97
98
|
const content = ref(null);
|
|
98
99
|
const state = reactive({
|
|
@@ -106,7 +107,8 @@ const _sfc_main = create({
|
|
|
106
107
|
scrollList: [],
|
|
107
108
|
distance: 0,
|
|
108
109
|
timer: null,
|
|
109
|
-
keepAlive: false
|
|
110
|
+
keepAlive: false,
|
|
111
|
+
isCanScroll: null
|
|
110
112
|
});
|
|
111
113
|
const classes = computed(() => {
|
|
112
114
|
const prefixCls = componentName;
|
|
@@ -114,6 +116,13 @@ const _sfc_main = create({
|
|
|
114
116
|
[prefixCls]: true
|
|
115
117
|
};
|
|
116
118
|
});
|
|
119
|
+
const isEllipsis = computed(() => {
|
|
120
|
+
if (state.isCanScroll == null) {
|
|
121
|
+
return false;
|
|
122
|
+
} else {
|
|
123
|
+
return !state.isCanScroll && !props.wrapable;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
117
126
|
const iconShow = computed(() => {
|
|
118
127
|
if (props.leftIcon == "close") {
|
|
119
128
|
return false;
|
|
@@ -132,9 +141,9 @@ const _sfc_main = create({
|
|
|
132
141
|
});
|
|
133
142
|
const contentStyle = computed(() => {
|
|
134
143
|
return {
|
|
135
|
-
paddingLeft: state.firstRound ? 0 : state.wrapWidth + "px",
|
|
136
144
|
animationDelay: (state.firstRound ? props.delay : 0) + "s",
|
|
137
|
-
animationDuration: state.duration + "s"
|
|
145
|
+
animationDuration: state.duration + "s",
|
|
146
|
+
transform: `translateX(${state.firstRound ? 0 : state.wrapWidth + "px"})`
|
|
138
147
|
};
|
|
139
148
|
});
|
|
140
149
|
const iconBg = computed(() => {
|
|
@@ -177,7 +186,8 @@ const _sfc_main = create({
|
|
|
177
186
|
}
|
|
178
187
|
const wrapWidth = wrap.value.getBoundingClientRect().width;
|
|
179
188
|
const offsetWidth = content.value.getBoundingClientRect().width;
|
|
180
|
-
|
|
189
|
+
state.isCanScroll = props.scrollable == null ? offsetWidth > wrapWidth : props.scrollable;
|
|
190
|
+
if (state.isCanScroll) {
|
|
181
191
|
state.wrapWidth = wrapWidth;
|
|
182
192
|
state.offsetWidth = offsetWidth;
|
|
183
193
|
state.duration = offsetWidth / props.speed;
|
|
@@ -191,7 +201,9 @@ const _sfc_main = create({
|
|
|
191
201
|
emit("click", event);
|
|
192
202
|
};
|
|
193
203
|
const onClickIcon = (event) => {
|
|
194
|
-
|
|
204
|
+
if (props.closeMode) {
|
|
205
|
+
state.showNoticeBar = !props.closeMode;
|
|
206
|
+
}
|
|
195
207
|
emit("close", event);
|
|
196
208
|
};
|
|
197
209
|
const onAnimationEnd = () => {
|
|
@@ -238,14 +250,12 @@ const _sfc_main = create({
|
|
|
238
250
|
emit("close", state.scrollList[0]);
|
|
239
251
|
};
|
|
240
252
|
onMounted(() => {
|
|
241
|
-
console.log(props.direction);
|
|
242
253
|
if (props.direction == "vertical") {
|
|
243
254
|
if (slots.default) {
|
|
244
255
|
state.scrollList = [].concat(slots.default()[0].children);
|
|
245
256
|
} else {
|
|
246
257
|
state.scrollList = [].concat(props.list);
|
|
247
258
|
}
|
|
248
|
-
console.log(state.scrollList);
|
|
249
259
|
setTimeout(() => {
|
|
250
260
|
props.complexAm ? startRoll() : startRollEasy();
|
|
251
261
|
}, props.standTime);
|
|
@@ -266,6 +276,7 @@ const _sfc_main = create({
|
|
|
266
276
|
clearInterval(state.timer);
|
|
267
277
|
});
|
|
268
278
|
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(state)), {
|
|
279
|
+
isEllipsis,
|
|
269
280
|
classes,
|
|
270
281
|
iconShow,
|
|
271
282
|
barStyle,
|
|
@@ -305,17 +316,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
305
316
|
class: "left-icon",
|
|
306
317
|
style: normalizeStyle({ "background-image": `url(${_ctx.iconBg})` })
|
|
307
318
|
}, [
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
319
|
+
renderSlot(_ctx.$slots, "left-icon", {}, () => [
|
|
320
|
+
!_ctx.iconBg ? (openBlock(), createBlock(_component_nut_icon, {
|
|
321
|
+
key: 0,
|
|
322
|
+
name: "notice",
|
|
323
|
+
size: "16",
|
|
324
|
+
color: _ctx.color
|
|
325
|
+
}, null, 8, ["color"])) : createCommentVNode("", true)
|
|
326
|
+
])
|
|
314
327
|
], 4)) : createCommentVNode("", true),
|
|
315
328
|
createElementVNode("view", _hoisted_1, [
|
|
316
329
|
createElementVNode("view", {
|
|
317
330
|
ref: "content",
|
|
318
|
-
class: normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis":
|
|
331
|
+
class: normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis": _ctx.isEllipsis }]]),
|
|
319
332
|
style: normalizeStyle(_ctx.contentStyle),
|
|
320
333
|
onAnimationend: _cache[0] || (_cache[0] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args)),
|
|
321
334
|
onWebkitAnimationEnd: _cache[1] || (_cache[1] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args))
|
|
@@ -325,15 +338,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
325
338
|
])
|
|
326
339
|
], 38)
|
|
327
340
|
], 512),
|
|
328
|
-
_ctx.closeMode ? (openBlock(), createElementBlock("view", {
|
|
341
|
+
_ctx.closeMode || _ctx.rightIcon ? (openBlock(), createElementBlock("view", {
|
|
329
342
|
key: 1,
|
|
330
343
|
class: "right-icon",
|
|
331
344
|
onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.onClickIcon && _ctx.onClickIcon(...args), ["stop"]))
|
|
332
345
|
}, [
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
346
|
+
renderSlot(_ctx.$slots, "right-icon", {}, () => [
|
|
347
|
+
createVNode(_component_nut_icon, {
|
|
348
|
+
name: _ctx.rightIcon ? _ctx.rightIcon : "close",
|
|
349
|
+
color: _ctx.color
|
|
350
|
+
}, null, 8, ["name", "color"])
|
|
351
|
+
])
|
|
337
352
|
])) : createCommentVNode("", true)
|
|
338
353
|
], 6)), [
|
|
339
354
|
[vShow, _ctx.showNoticeBar]
|
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -107,7 +107,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
107
|
}, {
|
|
108
108
|
default: withCtx(() => [
|
|
109
109
|
withDirectives(createElementVNode("view", {
|
|
110
|
-
class: normalizeClass(["popup-top", "nut-notify", `nut-notify--${_ctx.type}`,
|
|
110
|
+
class: normalizeClass(["popup-top", "nut-notify", `nut-notify--${_ctx.type}`, [_ctx.className]]),
|
|
111
111
|
style: normalizeStyle({ color: _ctx.color, background: _ctx.background }),
|
|
112
112
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickCover && _ctx.clickCover(...args))
|
|
113
113
|
}, [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -44,7 +44,6 @@ const _sfc_main = create({
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["input", "delete", "close", "update:value"],
|
|
46
46
|
setup(props, { emit }) {
|
|
47
|
-
console.log(props.overlay);
|
|
48
47
|
const clickKeyIndex = ref(void 0);
|
|
49
48
|
const show = ref(props.visible);
|
|
50
49
|
const root = ref();
|
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
19
19
|
* (c) 2021 @jdf2e.
|
|
20
20
|
* Released under the MIT License.
|
|
21
21
|
*/
|
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -303,6 +303,7 @@ const _sfc_main = create({
|
|
|
303
303
|
return "text";
|
|
304
304
|
});
|
|
305
305
|
const columnList = computed(() => {
|
|
306
|
+
console.log("\u521D\u59CB\u5316", dataType.value);
|
|
306
307
|
if (dataType.value === "text") {
|
|
307
308
|
return [{ values: state.formattedColumns, defaultIndex: state.defaultIndex }];
|
|
308
309
|
} else if (dataType.value === "multipleColumns") {
|
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -138,6 +138,9 @@ const _sfc_main = create({
|
|
|
138
138
|
emit("update:visible", false);
|
|
139
139
|
};
|
|
140
140
|
const chooseItem = (item, index2) => {
|
|
141
|
+
if (item.disabled) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
141
144
|
emit("choose", item, index2);
|
|
142
145
|
};
|
|
143
146
|
return {
|
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -49,11 +49,16 @@ const _sfc_main = create({
|
|
|
49
49
|
iconColor: {
|
|
50
50
|
type: String,
|
|
51
51
|
default: "#439422"
|
|
52
|
+
},
|
|
53
|
+
isShowPercentage: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: true
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
setup(props, { emit }) {
|
|
55
59
|
const height = ref(props.strokeWidth + "px");
|
|
56
60
|
const progressOuter = ref();
|
|
61
|
+
const insideText = ref();
|
|
57
62
|
const left = ref();
|
|
58
63
|
const bgStyle = computed(() => {
|
|
59
64
|
return {
|
|
@@ -66,19 +71,29 @@ const _sfc_main = create({
|
|
|
66
71
|
color: props.textColor || ""
|
|
67
72
|
};
|
|
68
73
|
});
|
|
74
|
+
const slideLeft = (values) => {
|
|
75
|
+
if (props.textInside) {
|
|
76
|
+
let offsetWidth = progressOuter.value.offsetWidth;
|
|
77
|
+
let percentageWidth = progressOuter.value.offsetWidth * Number(values) * 0.01;
|
|
78
|
+
let insideTextWidth = insideText.value.offsetWidth;
|
|
79
|
+
left.value = percentageWidth - 5 + "px";
|
|
80
|
+
if (offsetWidth == percentageWidth) {
|
|
81
|
+
left.value = percentageWidth - insideTextWidth + "px";
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
69
85
|
watch(() => props.percentage, (values) => {
|
|
70
|
-
|
|
71
|
-
console.log("values", values);
|
|
72
|
-
left.value = progressOuter.value.offsetWidth * Number(values) * 0.01 - 5 + "px";
|
|
86
|
+
slideLeft(values);
|
|
73
87
|
});
|
|
74
88
|
onMounted(() => {
|
|
75
|
-
|
|
89
|
+
slideLeft(props.percentage);
|
|
76
90
|
});
|
|
77
91
|
return {
|
|
78
92
|
height,
|
|
79
93
|
bgStyle,
|
|
80
94
|
textStyle,
|
|
81
95
|
progressOuter,
|
|
96
|
+
insideText,
|
|
82
97
|
left
|
|
83
98
|
};
|
|
84
99
|
}
|
|
@@ -88,10 +103,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
88
103
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
89
104
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
90
105
|
createElementVNode("div", {
|
|
91
|
-
class: normalizeClass(["nut-progress-outer", [
|
|
92
|
-
_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "",
|
|
93
|
-
_ctx.size ? "nut-progress-" + _ctx.size : ""
|
|
94
|
-
]]),
|
|
106
|
+
class: normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
|
|
95
107
|
ref: "progressOuter",
|
|
96
108
|
style: normalizeStyle({ height: _ctx.height })
|
|
97
109
|
}, [
|
|
@@ -102,11 +114,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
102
114
|
_ctx.showText && _ctx.textInside ? (openBlock(), createElementBlock("div", {
|
|
103
115
|
key: 0,
|
|
104
116
|
class: "nut-progress-text nut-progress-insidetext",
|
|
117
|
+
ref: "insideText",
|
|
105
118
|
style: normalizeStyle({ lineHeight: _ctx.height, left: _ctx.left })
|
|
106
119
|
}, [
|
|
107
120
|
createElementVNode("span", {
|
|
108
121
|
style: normalizeStyle(_ctx.textStyle)
|
|
109
|
-
}, toDisplayString(_ctx.percentage) + "%", 5)
|
|
122
|
+
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
|
|
110
123
|
], 4)) : createCommentVNode("", true)
|
|
111
124
|
], 6)
|
|
112
125
|
], 6),
|
|
@@ -118,7 +131,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
131
|
_ctx.status == "active" || _ctx.status == "" ? (openBlock(), createElementBlock("span", {
|
|
119
132
|
key: 0,
|
|
120
133
|
style: normalizeStyle(_ctx.textStyle)
|
|
121
|
-
}, toDisplayString(_ctx.percentage) + "%", 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
134
|
+
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
122
135
|
key: 1,
|
|
123
136
|
size: "16px",
|
|
124
137
|
name: _ctx.iconName,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -36,7 +36,7 @@ const _sfc_main = create({
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
setup(props, { emit, slots }) {
|
|
39
|
-
let parent = inject("parent");
|
|
39
|
+
let parent = inject("parent", null);
|
|
40
40
|
const isCurValue = computed(() => {
|
|
41
41
|
return parent.label.value == props.label;
|
|
42
42
|
});
|
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { ref, computed, toRefs, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, normalizeClass, withModifiers, Fragment, renderList, renderSlot } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { u as useTouch } from "./
|
|
27
|
+
import { u as useTouch } from "./index4.js";
|
|
28
28
|
import { u as useRect } from "./index3.js";
|
|
29
29
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
30
|
const { componentName, create } = createComponent("range");
|
package/dist/packages/_es/Row.js
CHANGED
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -44,6 +44,10 @@ const _sfc_main = create({
|
|
|
44
44
|
length: {
|
|
45
45
|
type: [String, Number],
|
|
46
46
|
default: 6
|
|
47
|
+
},
|
|
48
|
+
isWrapTeleport: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true
|
|
47
51
|
}
|
|
48
52
|
},
|
|
49
53
|
emits: ["update:modelValue", "update:visible", "complete", "change", "ok", "tips", "close", "cancel"],
|
|
@@ -63,7 +67,10 @@ const _sfc_main = create({
|
|
|
63
67
|
});
|
|
64
68
|
watch(() => props.modelValue, (value) => {
|
|
65
69
|
realInput.value = value;
|
|
66
|
-
|
|
70
|
+
emit("update:modelValue", value);
|
|
71
|
+
}, {
|
|
72
|
+
deep: true,
|
|
73
|
+
immediate: true
|
|
67
74
|
});
|
|
68
75
|
function changeValue(e) {
|
|
69
76
|
const input = e.target;
|
|
@@ -157,7 +164,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
157
164
|
closeable: true,
|
|
158
165
|
onClickCloseIcon: _ctx.closeIcon,
|
|
159
166
|
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
160
|
-
onClickOverlay: _ctx.close
|
|
167
|
+
onClickOverlay: _ctx.close,
|
|
168
|
+
isWrapTeleport: _ctx.isWrapTeleport
|
|
161
169
|
}, {
|
|
162
170
|
default: withCtx(() => [
|
|
163
171
|
createElementVNode("view", _hoisted_1, toDisplayString(_ctx.title), 1),
|
|
@@ -214,7 +222,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
214
222
|
])) : createCommentVNode("", true)
|
|
215
223
|
]),
|
|
216
224
|
_: 1
|
|
217
|
-
}, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay"])
|
|
225
|
+
}, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay", "isWrapTeleport"])
|
|
218
226
|
]);
|
|
219
227
|
}
|
|
220
228
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 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
|
-
import { toRefs, computed, onMounted, resolveComponent, openBlock, createElementBlock, renderSlot, createElementVNode, createBlock, normalizeClass, normalizeStyle,
|
|
7
|
+
import { toRefs, computed, onMounted, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, Fragment, renderList } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
const component = {
|
|
10
10
|
props: {
|
|
@@ -66,7 +66,7 @@ const component = {
|
|
|
66
66
|
};
|
|
67
67
|
});
|
|
68
68
|
const getStyle = () => {
|
|
69
|
-
if (avatarSize
|
|
69
|
+
if (avatarSize.value) {
|
|
70
70
|
return {
|
|
71
71
|
width: avatarSize.value,
|
|
72
72
|
height: avatarSize.value
|
|
@@ -78,7 +78,6 @@ const component = {
|
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
onMounted(() => {
|
|
81
|
-
console.log("row", props.row);
|
|
82
81
|
});
|
|
83
82
|
return {
|
|
84
83
|
avatarShape,
|
|
@@ -95,7 +94,10 @@ const _hoisted_2 = {
|
|
|
95
94
|
key: 1,
|
|
96
95
|
class: "skeleton"
|
|
97
96
|
};
|
|
98
|
-
const _hoisted_3 =
|
|
97
|
+
const _hoisted_3 = {
|
|
98
|
+
key: 0,
|
|
99
|
+
class: "skeleton-animation"
|
|
100
|
+
};
|
|
99
101
|
const _hoisted_4 = { class: "content" };
|
|
100
102
|
const _hoisted_5 = { class: "content-line" };
|
|
101
103
|
const _hoisted_6 = {
|
|
@@ -107,7 +109,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
109
|
return !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
108
110
|
renderSlot(_ctx.$slots, "default")
|
|
109
111
|
])) : (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
110
|
-
_hoisted_3,
|
|
112
|
+
_ctx.animated ? (openBlock(), createElementBlock("view", _hoisted_3)) : createCommentVNode("", true),
|
|
111
113
|
createElementVNode("view", _hoisted_4, [
|
|
112
114
|
_ctx.avatar ? (openBlock(), createBlock(_component_nut_avatar, {
|
|
113
115
|
key: 0,
|
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -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.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|