@nutui/nutui 3.1.18-beta.0 → 3.1.19-beta.1
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 +41 -0
- package/LICENSE +1 -1
- package/README.md +6 -0
- package/dist/nutui.d.ts +39 -36
- package/dist/nutui.es.js +13149 -11288
- package/dist/nutui.umd.js +13156 -11381
- package/dist/packages/_es/ActionSheet.js +13 -19
- package/dist/packages/_es/Address.js +70 -55
- package/dist/packages/_es/Audio.js +13 -13
- package/dist/packages/_es/AudioOperate.js +125 -0
- package/dist/packages/_es/Avatar.js +4 -4
- package/dist/packages/_es/BackTop.js +69 -108
- package/dist/packages/_es/Badge.js +4 -4
- package/dist/packages/_es/Barrage.js +63 -56
- package/dist/packages/_es/Button.js +3 -3
- package/dist/packages/_es/Calendar.js +30 -702
- package/dist/packages/_es/CalendarItem.js +10 -0
- package/dist/packages/_es/Card.js +7 -6
- package/dist/packages/_es/Cascader.js +8 -8
- package/dist/packages/_es/Cell.js +27 -27
- package/dist/packages/_es/CellGroup.js +2 -2
- package/dist/packages/_es/Checkbox.js +4 -4
- package/dist/packages/_es/CheckboxGroup.js +3 -3
- package/dist/packages/_es/CircleProgress.js +150 -41
- package/dist/packages/_es/Col.js +2 -2
- package/dist/packages/_es/Collapse.js +35 -9
- package/dist/packages/_es/CollapseItem.js +79 -38
- package/dist/packages/_es/CountDown.js +8 -6
- package/dist/packages/_es/CountUp.js +31 -30
- package/dist/packages/_es/DatePicker.js +81 -44
- package/dist/packages/_es/Dialog.js +7 -83
- package/dist/packages/_es/Divider.js +5 -5
- package/dist/packages/_es/Drag.js +93 -55
- package/dist/packages/_es/Elevator.js +75 -50
- package/dist/packages/_es/Empty.js +4 -4
- package/dist/packages/_es/FixedNav.js +6 -6
- package/dist/packages/_es/Form.js +11 -9
- package/dist/packages/_es/FormItem.js +9 -6
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +9 -27
- package/dist/packages/_es/Icon.js +2 -2
- package/dist/packages/_es/ImagePreview.js +14 -83
- package/dist/packages/_es/Indicator.js +4 -4
- package/dist/packages/_es/InfiniteLoading.js +94 -108
- package/dist/packages/_es/Input.js +297 -73
- package/dist/packages/_es/InputNumber.js +24 -17
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/List.js +131 -0
- package/dist/packages/_es/Menu.js +16 -13
- package/dist/packages/_es/MenuItem.js +8 -8
- package/dist/packages/_es/Navbar.js +17 -12
- package/dist/packages/_es/NoticeBar.js +47 -39
- package/dist/packages/_es/Notify.js +28 -163
- package/dist/packages/_es/NumberKeyboard.js +4 -4
- package/dist/packages/_es/OldPicker.js +486 -0
- package/dist/packages/_es/OverLay.js +6 -26
- package/dist/packages/_es/Pagination.js +8 -8
- package/dist/packages/_es/Picker.js +192 -163
- package/dist/packages/_es/Popover.js +155 -30
- package/dist/packages/_es/Popup.js +7 -70
- package/dist/packages/_es/Price.js +18 -6
- package/dist/packages/_es/Progress.js +29 -27
- package/dist/packages/_es/PullRefresh.js +363 -0
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +169 -46
- package/dist/packages/_es/Rate.js +17 -20
- package/dist/packages/_es/Row.js +2 -2
- package/dist/packages/_es/SearchBar.js +9 -7
- package/dist/packages/_es/ShortPassword.js +90 -68
- package/dist/packages/_es/SideNavBar.js +6 -17
- package/dist/packages/_es/SideNavBarItem.js +2 -2
- package/dist/packages/_es/Signature.js +70 -70
- package/dist/packages/_es/Skeleton.js +9 -12
- package/dist/packages/_es/Sku.js +40 -31
- package/dist/packages/_es/Step.js +28 -12
- package/dist/packages/_es/Steps.js +8 -3
- package/dist/packages/_es/Sticky.js +29 -24
- package/dist/packages/_es/SubSideNavBar.js +2 -2
- package/dist/packages/_es/Swipe.js +40 -27
- package/dist/packages/_es/Swiper.js +32 -14
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +4 -4
- package/dist/packages/_es/TabPane.js +2 -2
- package/dist/packages/_es/Tabbar.js +4 -4
- package/dist/packages/_es/TabbarItem.js +28 -23
- package/dist/packages/_es/Table.js +14 -14
- package/dist/packages/_es/Tabs.js +19 -15
- package/dist/packages/_es/Tag.js +14 -8
- package/dist/packages/_es/TextArea.js +49 -15
- package/dist/packages/_es/TimeDetail.js +5 -4
- package/dist/packages/_es/TimePannel.js +4 -4
- package/dist/packages/_es/TimeSelect.js +9 -8
- package/dist/packages/_es/Toast.js +42 -171
- package/dist/packages/_es/Uploader.js +108 -139
- package/dist/packages/_es/Video.js +14 -10
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +2 -2
- package/dist/packages/_es/index.js +45 -7
- package/dist/packages/_es/index.taro.js +719 -0
- package/dist/packages/_es/index2.js +2 -2
- package/dist/packages/_es/index3.js +57 -29
- package/dist/packages/_es/index4.js +414 -57
- package/dist/packages/_es/plugin-vue_export-helper.js +2 -2
- package/dist/packages/_es/pxCheck.js +2 -2
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/_es/util.js +2 -2
- package/dist/packages/badge/index.scss +11 -13
- package/dist/packages/button/index.scss +1 -0
- package/dist/packages/calendar/index.scss +9 -4
- package/dist/packages/calendaritem/index.scss +0 -207
- package/dist/packages/cell/index.scss +6 -6
- package/dist/packages/checkbox/index.scss +4 -3
- package/dist/packages/collapseitem/index.scss +21 -11
- package/dist/packages/countdown/index.scss +3 -1
- package/dist/packages/divider/index.scss +8 -8
- package/dist/packages/elevator/index.scss +36 -36
- package/dist/packages/formitem/index.scss +15 -8
- package/dist/packages/indicator/index.scss +1 -1
- package/dist/packages/input/index.scss +70 -24
- package/dist/packages/inputnumber/index.scss +4 -2
- package/dist/packages/list/index.scss +24 -0
- package/dist/packages/menu/index.scss +3 -3
- package/dist/packages/navbar/index.scss +28 -8
- package/dist/packages/noticebar/index.scss +7 -8
- package/dist/packages/notify/index.scss +9 -0
- package/dist/packages/numberkeyboard/index.scss +22 -21
- package/dist/packages/oldpicker/index.scss +131 -0
- package/dist/packages/picker/index.scss +38 -32
- package/dist/packages/progress/index.scss +6 -5
- package/dist/packages/radio/index.scss +7 -6
- package/dist/packages/range/index.scss +109 -2
- package/dist/packages/searchbar/index.scss +7 -7
- package/dist/packages/sidenavbaritem/index.scss +5 -5
- package/dist/packages/step/index.scss +29 -29
- package/dist/packages/subsidenavbar/index.scss +10 -8
- package/dist/packages/tabbaritem/index.scss +15 -0
- package/dist/packages/timedetail/index.scss +13 -13
- package/dist/packages/timepannel/index.scss +7 -7
- package/dist/packages/timeselect/index.scss +3 -3
- package/dist/packages/uploader/index.scss +6 -6
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +64 -62
- package/dist/styles/themes/jdt.scss +91 -0
- package/dist/styles/variables-jdt.scss +728 -0
- package/dist/styles/variables.scss +250 -44
- package/package.json +2 -1
- package/dist/packages/_es/raf.js +0 -19
- package/dist/styles/themes/jdd.scss +0 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import "vue";
|
|
7
|
+
import "./component.js";
|
|
8
|
+
import "@tarojs/taro";
|
|
9
|
+
export { C as default } from "./index.taro.js";
|
|
10
|
+
import "./plugin-vue_export-helper.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
|
-
import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, renderSlot, createVNode, createBlock, Fragment, withCtx, createTextVNode } from "vue";
|
|
7
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, renderSlot, createVNode, createBlock, createCommentVNode, Fragment, withCtx, createTextVNode } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
const { create } = createComponent("card");
|
|
10
10
|
const _sfc_main = create({
|
|
@@ -75,7 +75,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75
75
|
key: 1,
|
|
76
76
|
class: "nut-card__right__price__origin",
|
|
77
77
|
price: _ctx.vipPrice
|
|
78
|
-
}, null, 8, ["price"]))
|
|
78
|
+
}, null, 8, ["price"])),
|
|
79
|
+
_ctx.isHaveSlot("tag") ? renderSlot(_ctx.$slots, "tag", { key: 2 }) : createCommentVNode("", true)
|
|
79
80
|
]),
|
|
80
81
|
createElementVNode("div", _hoisted_7, [
|
|
81
82
|
_ctx.isHaveSlot("shop-tag") ? renderSlot(_ctx.$slots, "shop-tag", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -100,5 +101,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
101
|
])
|
|
101
102
|
]);
|
|
102
103
|
}
|
|
103
|
-
var
|
|
104
|
-
export {
|
|
104
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
105
|
+
export { index_taro as default };
|
|
@@ -35,8 +35,8 @@ var __publicField = (obj, key, value) => {
|
|
|
35
35
|
return value;
|
|
36
36
|
};
|
|
37
37
|
/*!
|
|
38
|
-
* @nutui/nutui v3.1.
|
|
39
|
-
* (c)
|
|
38
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
39
|
+
* (c) 2022 @jdf2e.
|
|
40
40
|
* Released under the MIT License.
|
|
41
41
|
*/
|
|
42
42
|
import { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
@@ -266,8 +266,8 @@ const _sfc_main$1 = create$1({
|
|
|
266
266
|
}
|
|
267
267
|
if (needToSync.length && currentValue === props.modelValue) {
|
|
268
268
|
const pathNodes = tree.value.getPathNodesByValue(needToSync);
|
|
269
|
-
pathNodes.map((node,
|
|
270
|
-
tabsCursor.value =
|
|
269
|
+
pathNodes.map((node, index) => {
|
|
270
|
+
tabsCursor.value = index;
|
|
271
271
|
methods.handleNode(node, true);
|
|
272
272
|
});
|
|
273
273
|
}
|
|
@@ -400,10 +400,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
400
400
|
"title-scroll": ""
|
|
401
401
|
}, {
|
|
402
402
|
default: withCtx(() => [
|
|
403
|
-
!_ctx.initLoading && _ctx.panes.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.panes, (pane,
|
|
403
|
+
!_ctx.initLoading && _ctx.panes.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.panes, (pane, index) => {
|
|
404
404
|
return openBlock(), createBlock(_component_nut_tabpane, {
|
|
405
405
|
title: _ctx.formatTabTitle(pane),
|
|
406
|
-
key:
|
|
406
|
+
key: index
|
|
407
407
|
}, {
|
|
408
408
|
default: withCtx(() => [
|
|
409
409
|
createElementVNode("view", _hoisted_1$1, [
|
|
@@ -543,5 +543,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
543
543
|
_: 1
|
|
544
544
|
}, 8, ["visible"]);
|
|
545
545
|
}
|
|
546
|
-
var
|
|
547
|
-
export {
|
|
546
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
547
|
+
export { index_taro as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useRouter } from "./index.js";
|
|
9
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
10
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
10
|
const { componentName, create } = createComponent("cell");
|
|
@@ -16,7 +15,7 @@ const _sfc_main = create({
|
|
|
16
15
|
desc: { type: String, default: "" },
|
|
17
16
|
descTextAlign: { type: String, default: "right" },
|
|
18
17
|
isLink: { type: Boolean, default: false },
|
|
19
|
-
to:
|
|
18
|
+
to: { type: String, default: "" },
|
|
20
19
|
replace: { type: Boolean, default: false },
|
|
21
20
|
roundRadius: { type: [String, Number], default: "" },
|
|
22
21
|
url: { type: String, default: "" },
|
|
@@ -31,7 +30,6 @@ const _sfc_main = create({
|
|
|
31
30
|
[`${prefixCls}--clickable`]: props.isLink || props.to
|
|
32
31
|
};
|
|
33
32
|
});
|
|
34
|
-
const router = useRouter();
|
|
35
33
|
const baseStyle = computed(() => {
|
|
36
34
|
return {
|
|
37
35
|
borderRadius: pxCheck(props.roundRadius)
|
|
@@ -39,11 +37,6 @@ const _sfc_main = create({
|
|
|
39
37
|
});
|
|
40
38
|
const handleClick = (event) => {
|
|
41
39
|
emit("click", event);
|
|
42
|
-
if (props.to && router) {
|
|
43
|
-
router[props.replace ? "replace" : "push"](props.to);
|
|
44
|
-
} else if (props.url) {
|
|
45
|
-
props.replace ? location.replace(props.url) : location.href = props.url;
|
|
46
|
-
}
|
|
47
40
|
};
|
|
48
41
|
return {
|
|
49
42
|
handleClick,
|
|
@@ -52,8 +45,16 @@ const _sfc_main = create({
|
|
|
52
45
|
};
|
|
53
46
|
}
|
|
54
47
|
});
|
|
55
|
-
const _hoisted_1 = {
|
|
56
|
-
|
|
48
|
+
const _hoisted_1 = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "nut-cell__icon"
|
|
51
|
+
};
|
|
52
|
+
const _hoisted_2 = {
|
|
53
|
+
key: 1,
|
|
54
|
+
class: "nut-cell__title"
|
|
55
|
+
};
|
|
56
|
+
const _hoisted_3 = { class: "title" };
|
|
57
|
+
const _hoisted_4 = { class: "nut-cell__title-desc" };
|
|
57
58
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
59
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
59
60
|
return openBlock(), createElementBlock("view", {
|
|
@@ -62,34 +63,33 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62
63
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
63
64
|
}, [
|
|
64
65
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
65
|
-
_ctx.
|
|
66
|
-
key: 0,
|
|
67
|
-
class: normalizeClass(["nut-cell__title", { icon: _ctx.icon || _ctx.$slots.icon }])
|
|
68
|
-
}, [
|
|
66
|
+
_ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
69
67
|
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 0 }) : _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
70
68
|
key: 1,
|
|
71
69
|
class: "icon",
|
|
72
70
|
name: _ctx.icon
|
|
73
|
-
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
72
|
+
])) : createCommentVNode("", true),
|
|
73
|
+
_ctx.title || _ctx.subTitle ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
74
|
+
_ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
75
|
+
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1),
|
|
76
|
+
createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
|
|
77
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
78
78
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
79
79
|
], 64))
|
|
80
|
-
]
|
|
80
|
+
])) : createCommentVNode("", true),
|
|
81
81
|
_ctx.desc ? (openBlock(), createElementBlock("view", {
|
|
82
|
-
key:
|
|
82
|
+
key: 2,
|
|
83
83
|
class: "nut-cell__value",
|
|
84
84
|
style: normalizeStyle({ "text-align": _ctx.descTextAlign })
|
|
85
85
|
}, toDisplayString(_ctx.desc), 5)) : createCommentVNode("", true),
|
|
86
|
-
_ctx.$slots.link ? renderSlot(_ctx.$slots, "link", { key:
|
|
87
|
-
key:
|
|
86
|
+
_ctx.$slots.link ? renderSlot(_ctx.$slots, "link", { key: 3 }) : _ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_nut_icon, {
|
|
87
|
+
key: 4,
|
|
88
88
|
class: "nut-cell__link",
|
|
89
89
|
name: "right"
|
|
90
90
|
})) : createCommentVNode("", true)
|
|
91
91
|
])
|
|
92
92
|
], 6);
|
|
93
93
|
}
|
|
94
|
-
var
|
|
95
|
-
export {
|
|
94
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
95
|
+
export { index_taro as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, computed, onMounted, getCurrentInstance, h } from "vue";
|
|
@@ -27,7 +27,7 @@ const _sfc_main = create({
|
|
|
27
27
|
},
|
|
28
28
|
iconSize: {
|
|
29
29
|
type: [String, Number],
|
|
30
|
-
default: "
|
|
30
|
+
default: ""
|
|
31
31
|
},
|
|
32
32
|
iconName: {
|
|
33
33
|
type: String,
|
|
@@ -54,7 +54,7 @@ const _sfc_main = create({
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const pDisabled = computed(() => {
|
|
57
|
-
return hasParent.value ? parent.disabled : props.disabled;
|
|
57
|
+
return hasParent.value ? parent.disabled.value : props.disabled;
|
|
58
58
|
});
|
|
59
59
|
const checked = computed(() => !!props.modelValue);
|
|
60
60
|
const color = computed(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, provide, computed, watch, h } from "vue";
|
|
@@ -43,7 +43,7 @@ const _sfc_main = create({
|
|
|
43
43
|
};
|
|
44
44
|
provide("parent", {
|
|
45
45
|
value: computed(() => props.modelValue),
|
|
46
|
-
disabled: props.disabled,
|
|
46
|
+
disabled: computed(() => props.disabled),
|
|
47
47
|
updateValue,
|
|
48
48
|
relation
|
|
49
49
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import Taro from "@tarojs/taro";
|
|
7
|
+
import { ref, reactive, watch, onMounted, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
7
8
|
import { c as createComponent } from "./component.js";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { componentName, create } = createComponent("circleprogress");
|
|
@@ -28,12 +29,79 @@ const _sfc_main = create({
|
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
setup(props, { emit }) {
|
|
32
|
+
const rotateLeft = ref();
|
|
33
|
+
const rotateRight = ref();
|
|
34
|
+
const InnerWidth = ref(props.strokeInnerWidth);
|
|
35
|
+
const isMobile = ref(false);
|
|
36
|
+
const cricleData = reactive({
|
|
37
|
+
radius: 50,
|
|
38
|
+
strokeOutWidth: 10,
|
|
39
|
+
backColor: "#d9d9d9",
|
|
40
|
+
progressColor: "red"
|
|
41
|
+
});
|
|
42
|
+
const loadPercent = (x, y) => {
|
|
43
|
+
let rotate = x / y * 360;
|
|
44
|
+
let rotateRc = 0;
|
|
45
|
+
let rotateLc = 0;
|
|
46
|
+
if (rotate < 180) {
|
|
47
|
+
rotateRc = rotate + -45;
|
|
48
|
+
} else {
|
|
49
|
+
rotateRc = 135;
|
|
50
|
+
rotateLc = rotate - 180 - 45;
|
|
51
|
+
rotateLeft.value = rotateLc;
|
|
52
|
+
}
|
|
53
|
+
rotateRight.value = rotateRc;
|
|
54
|
+
};
|
|
55
|
+
watch(() => props.progress, (value) => {
|
|
56
|
+
loadPercent(value, 100);
|
|
57
|
+
});
|
|
58
|
+
onMounted(() => {
|
|
59
|
+
if (Taro.getEnv() === "WEB") {
|
|
60
|
+
isMobile.value = true;
|
|
61
|
+
} else {
|
|
62
|
+
isMobile.value = false;
|
|
63
|
+
loadPercent(props.progress, 100);
|
|
64
|
+
Object.assign(cricleData, props.progressOption);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
31
67
|
const classes = computed(() => {
|
|
32
68
|
const prefixCls = componentName;
|
|
33
69
|
return {
|
|
34
70
|
[prefixCls]: true
|
|
35
71
|
};
|
|
36
72
|
});
|
|
73
|
+
const pieStyle = computed(() => {
|
|
74
|
+
return {
|
|
75
|
+
width: (cricleData.radius + cricleData.strokeOutWidth) * 2 + "px",
|
|
76
|
+
height: (cricleData.radius + cricleData.strokeOutWidth) * 2 + "px"
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
const mobileStyle = computed(() => {
|
|
80
|
+
return {
|
|
81
|
+
width: "100%",
|
|
82
|
+
height: "100%"
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
const RightStyle = computed(() => {
|
|
86
|
+
return {
|
|
87
|
+
transform: `rotate(${rotateRight.value + "deg"})`,
|
|
88
|
+
transition: `all 0.3s`,
|
|
89
|
+
borderTop: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
|
|
90
|
+
borderLeft: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
|
|
91
|
+
borderBottom: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`,
|
|
92
|
+
borderRight: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
const LeftStyle = computed(() => {
|
|
96
|
+
return {
|
|
97
|
+
transform: `rotate(${rotateLeft.value + "deg"})`,
|
|
98
|
+
transition: `all 0.3s`,
|
|
99
|
+
borderTop: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
|
|
100
|
+
borderLeft: `${InnerWidth.value + "px"} solid ${cricleData.backColor};`,
|
|
101
|
+
borderBottom: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`,
|
|
102
|
+
borderRight: `${InnerWidth.value + "px"} solid ${cricleData.progressColor};`
|
|
103
|
+
};
|
|
104
|
+
});
|
|
37
105
|
const option = computed(() => {
|
|
38
106
|
let baseOption = {
|
|
39
107
|
radius: 50,
|
|
@@ -57,53 +125,94 @@ const _sfc_main = create({
|
|
|
57
125
|
return `${progressLength},${circleLength}`;
|
|
58
126
|
});
|
|
59
127
|
return {
|
|
128
|
+
isMobile,
|
|
129
|
+
rotateLeft,
|
|
130
|
+
InnerWidth,
|
|
131
|
+
rotateRight,
|
|
60
132
|
classes,
|
|
133
|
+
pieStyle,
|
|
134
|
+
RightStyle,
|
|
135
|
+
LeftStyle,
|
|
61
136
|
option,
|
|
62
|
-
arcLength
|
|
137
|
+
arcLength,
|
|
138
|
+
mobileStyle
|
|
63
139
|
};
|
|
64
140
|
}
|
|
65
141
|
});
|
|
66
|
-
const _hoisted_1 =
|
|
67
|
-
const _hoisted_2 =
|
|
68
|
-
const _hoisted_3 =
|
|
69
|
-
const _hoisted_4 = { class: "nut-
|
|
142
|
+
const _hoisted_1 = { class: "nut-circleprogress__right" };
|
|
143
|
+
const _hoisted_2 = { class: "nut-circleprogress__line nut-circleprogress__r" };
|
|
144
|
+
const _hoisted_3 = { class: "nut-circleprogress__progress" };
|
|
145
|
+
const _hoisted_4 = { class: "nut-circleprogress__left" };
|
|
146
|
+
const _hoisted_5 = { class: "nut-circleprogress__line nut-circleprogress__l" };
|
|
147
|
+
const _hoisted_6 = { key: 1 };
|
|
148
|
+
const _hoisted_7 = ["height", "width"];
|
|
149
|
+
const _hoisted_8 = ["r", "cx", "cy", "stroke", "stroke-width"];
|
|
150
|
+
const _hoisted_9 = ["r", "cx", "cy", "stroke", "stroke-dasharray", "stroke-width", "transform"];
|
|
151
|
+
const _hoisted_10 = { class: "nut-circleprogress__progress" };
|
|
70
152
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
71
153
|
return openBlock(), createElementBlock("div", {
|
|
72
154
|
class: normalizeClass(_ctx.classes),
|
|
73
|
-
style: normalizeStyle(
|
|
155
|
+
style: normalizeStyle(_ctx.pieStyle)
|
|
74
156
|
}, [
|
|
75
|
-
(openBlock(), createElementBlock("
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"x-mlns": "http://www.w3.org/200/svg"
|
|
157
|
+
!_ctx.isMobile ? (openBlock(), createElementBlock("div", {
|
|
158
|
+
key: 0,
|
|
159
|
+
style: normalizeStyle(_ctx.mobileStyle)
|
|
79
160
|
}, [
|
|
80
|
-
createElementVNode("
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
createElementVNode("
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
161
|
+
createElementVNode("div", _hoisted_1, [
|
|
162
|
+
createElementVNode("div", _hoisted_2, [
|
|
163
|
+
createElementVNode("div", {
|
|
164
|
+
class: "nut-circleprogress__line__c",
|
|
165
|
+
style: normalizeStyle(_ctx.RightStyle)
|
|
166
|
+
}, null, 4)
|
|
167
|
+
])
|
|
168
|
+
]),
|
|
169
|
+
createElementVNode("div", _hoisted_3, [
|
|
170
|
+
!_ctx.isAuto ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
171
|
+
createTextVNode(toDisplayString(_ctx.progress) + "%", 1)
|
|
172
|
+
]) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
173
|
+
]),
|
|
174
|
+
createElementVNode("div", _hoisted_4, [
|
|
175
|
+
createElementVNode("div", _hoisted_5, [
|
|
176
|
+
createElementVNode("div", {
|
|
177
|
+
class: "nut-circleprogress__line__c",
|
|
178
|
+
style: normalizeStyle(_ctx.LeftStyle)
|
|
179
|
+
}, null, 4)
|
|
180
|
+
])
|
|
181
|
+
])
|
|
182
|
+
], 4)) : (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
183
|
+
(openBlock(), createElementBlock("svg", {
|
|
184
|
+
height: _ctx.option.size,
|
|
185
|
+
width: _ctx.option.size,
|
|
186
|
+
"x-mlns": "http://www.w3.org/200/svg"
|
|
187
|
+
}, [
|
|
188
|
+
createElementVNode("circle", {
|
|
189
|
+
r: _ctx.option.radius,
|
|
190
|
+
cx: _ctx.option.cx,
|
|
191
|
+
cy: _ctx.option.cy,
|
|
192
|
+
stroke: _ctx.option.backColor,
|
|
193
|
+
"stroke-width": _ctx.option.strokeOutWidth,
|
|
194
|
+
fill: "none"
|
|
195
|
+
}, null, 8, _hoisted_8),
|
|
196
|
+
createElementVNode("circle", {
|
|
197
|
+
r: _ctx.option.radius,
|
|
198
|
+
cx: _ctx.option.cx,
|
|
199
|
+
cy: _ctx.option.cy,
|
|
200
|
+
stroke: _ctx.option.progressColor,
|
|
201
|
+
"stroke-dasharray": _ctx.arcLength,
|
|
202
|
+
"stroke-width": _ctx.strokeInnerWidth,
|
|
203
|
+
fill: "none",
|
|
204
|
+
transform: _ctx.option.startPosition,
|
|
205
|
+
"stroke-linecap": "round",
|
|
206
|
+
style: { "transition": "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s" }
|
|
207
|
+
}, null, 8, _hoisted_9)
|
|
208
|
+
], 8, _hoisted_7)),
|
|
209
|
+
createElementVNode("div", _hoisted_10, [
|
|
210
|
+
!_ctx.isAuto ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
211
|
+
createTextVNode(toDisplayString(_ctx.progress) + "%", 1)
|
|
212
|
+
]) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
213
|
+
])
|
|
214
|
+
]))
|
|
106
215
|
], 6);
|
|
107
216
|
}
|
|
108
|
-
var
|
|
109
|
-
export {
|
|
217
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
218
|
+
export { index_taro as default };
|
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { provide, openBlock, createElementBlock, renderSlot } from "vue";
|
|
@@ -49,20 +49,20 @@ const _sfc_main = create({
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
emits: ["update:active", "change"],
|
|
52
|
-
setup(props, { emit }) {
|
|
52
|
+
setup(props, { emit, slots }) {
|
|
53
53
|
const changeVal = (val) => {
|
|
54
54
|
emit("update:active", val);
|
|
55
55
|
emit("change", val);
|
|
56
56
|
};
|
|
57
57
|
const changeValAry = (name) => {
|
|
58
58
|
const activeItem = props.active instanceof Object ? Object.values(props.active) : props.active;
|
|
59
|
-
let
|
|
59
|
+
let index = -1;
|
|
60
60
|
activeItem.forEach((item, idx) => {
|
|
61
61
|
if (String(item) == String(name)) {
|
|
62
|
-
|
|
62
|
+
index = idx;
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
index > -1 ? activeItem.splice(index, 1) : activeItem.push(name);
|
|
66
66
|
changeVal(activeItem);
|
|
67
67
|
};
|
|
68
68
|
const isExpanded = (name) => {
|
|
@@ -71,12 +71,38 @@ const _sfc_main = create({
|
|
|
71
71
|
return typeof active === "number" || typeof active === "string" ? active == name : false;
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
+
const activeIndex = () => {
|
|
75
|
+
var _a;
|
|
76
|
+
const activeCollapse = props.active;
|
|
77
|
+
const childrenList = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
78
|
+
let act = [];
|
|
79
|
+
childrenList.forEach((item, index) => {
|
|
80
|
+
if (typeof activeCollapse == "number" || typeof activeCollapse == "string") {
|
|
81
|
+
if (item.props.name == activeCollapse) {
|
|
82
|
+
act.push(item.flag);
|
|
83
|
+
return act;
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
let ary = Array.from(activeCollapse);
|
|
87
|
+
if (ary.includes(String(item.props.name)) || ary.includes(Number(item.props.name))) {
|
|
88
|
+
act.push(item.flag);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return act;
|
|
93
|
+
};
|
|
94
|
+
const getParentChildren = () => {
|
|
95
|
+
var _a;
|
|
96
|
+
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
97
|
+
};
|
|
74
98
|
provide("collapseParent", {
|
|
75
99
|
children: [],
|
|
76
100
|
props,
|
|
77
101
|
changeValAry,
|
|
78
102
|
changeVal,
|
|
79
|
-
isExpanded
|
|
103
|
+
isExpanded,
|
|
104
|
+
activeIndex,
|
|
105
|
+
getParentChildren
|
|
80
106
|
});
|
|
81
107
|
}
|
|
82
108
|
});
|
|
@@ -85,5 +111,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
85
111
|
renderSlot(_ctx.$slots, "default")
|
|
86
112
|
]);
|
|
87
113
|
}
|
|
88
|
-
var
|
|
89
|
-
export {
|
|
114
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
115
|
+
export { index_taro as default };
|