@nutui/nutui 3.2.2-beta.1 → 3.2.2
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 +40 -0
- package/README.md +5 -3
- package/dist/nutui.es.js +1767 -1993
- package/dist/nutui.umd.js +1777 -2002
- package/dist/packages/_es/ActionSheet.js +22 -4
- package/dist/packages/_es/Address.js +57 -63
- package/dist/packages/_es/AddressList.js +3 -7
- package/dist/packages/_es/Animate.js +21 -2
- package/dist/packages/_es/Audio.js +25 -11
- package/dist/packages/_es/AudioOperate.js +21 -2
- package/dist/packages/_es/Avatar.js +20 -5
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +2 -2
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +4 -7
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +65 -51
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +17 -31
- package/dist/packages/_es/CheckboxGroup.js +7 -14
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +19 -22
- package/dist/packages/_es/CollapseItem.js +32 -18
- package/dist/packages/_es/Comment.js +9 -13
- package/dist/packages/_es/ConfigProvider.js +4 -8
- package/dist/packages/_es/CountDown.js +46 -40
- package/dist/packages/_es/CountUp.js +40 -39
- package/dist/packages/_es/DatePicker.js +40 -27
- package/dist/packages/_es/Dialog.js +28 -13
- package/dist/packages/_es/Divider.js +24 -7
- package/dist/packages/_es/Drag.js +4 -4
- package/dist/packages/_es/Ecard.js +4 -7
- package/dist/packages/_es/Elevator.js +38 -25
- package/dist/packages/_es/Ellipsis.js +28 -14
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +5 -9
- package/dist/packages/_es/FormItem.js +5 -4
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +11 -15
- package/dist/packages/_es/Image.js +24 -8
- package/dist/packages/_es/ImagePreview.js +34 -22
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +24 -5
- package/dist/packages/_es/Input.js +9 -13
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +156 -0
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +25 -10
- package/dist/packages/_es/Menu.js +7 -13
- package/dist/packages/_es/MenuItem.js +22 -3
- package/dist/packages/_es/Navbar.js +2 -2
- package/dist/packages/_es/NoticeBar.js +28 -17
- package/dist/packages/_es/Notify.js +38 -20
- package/dist/packages/_es/NumberKeyboard.js +5 -12
- package/dist/packages/_es/OldPicker.js +46 -47
- package/dist/packages/_es/OverLay.js +23 -11
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +72 -64
- package/dist/packages/_es/Popover.js +52 -55
- package/dist/packages/_es/Popup.js +40 -35
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +20 -5
- package/dist/packages/_es/Radio.js +15 -27
- package/dist/packages/_es/RadioGroup.js +5 -12
- package/dist/packages/_es/Range.js +33 -20
- package/dist/packages/_es/Rate.js +24 -5
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +44 -11
- package/dist/packages/_es/ShortPassword.js +11 -18
- package/dist/packages/_es/SideNavBar.js +22 -4
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +21 -2
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +32 -24
- package/dist/packages/_es/Step.js +22 -4
- package/dist/packages/_es/Steps.js +4 -8
- package/dist/packages/_es/Sticky.js +12 -23
- package/dist/packages/_es/SubSideNavBar.js +22 -4
- package/dist/packages/_es/Swipe.js +24 -5
- package/dist/packages/_es/Swiper.js +14 -23
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +7 -10
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +4 -7
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +25 -10
- package/dist/packages/_es/Tabs.js +41 -25
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +5 -8
- package/dist/packages/_es/TimeDetail.js +24 -5
- package/dist/packages/_es/TimePannel.js +22 -4
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +47 -28
- package/dist/packages/_es/Uploader.js +27 -18
- package/dist/packages/_es/Video.js +33 -22
- package/dist/packages/_es/WaterMark.js +41 -31
- package/dist/packages/_es/common.js +11 -21
- package/dist/packages/_es/component.js +5 -5
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +31 -23
- 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/address/index.scss +17 -0
- package/dist/packages/invoice/index.scss +33 -0
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/menuitem/index.scss +3 -1
- package/dist/packages/navbar/index.scss +6 -8
- package/dist/packages/picker/index.scss +8 -0
- package/dist/packages/price/index.scss +1 -1
- package/dist/packages/searchbar/index.scss +2 -0
- package/dist/packages/textarea/index.scss +4 -1
- package/dist/packages/toast/index.scss +3 -0
- package/dist/smartips/attributes.json +36 -12
- package/dist/smartips/tags.json +20 -10
- package/dist/smartips/web-types.json +74 -13
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +51 -50
- package/dist/styles/themes/jdb.scss +51 -50
- package/dist/styles/themes/jdt.scss +51 -50
- package/dist/styles/variables-jdb.scss +4 -1
- package/dist/styles/variables-jdt.scss +4 -1
- package/dist/styles/variables.scss +4 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +3 -3
- package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/backtop/index.vue.d.ts +5 -8
- package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +2 -2
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +8 -8
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/formitem/index.vue.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +6 -7
- package/dist/types/__VUE/invoice/index.vue.d.ts +48 -0
- package/dist/types/__VUE/menu/index.vue.d.ts +2 -2
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/notify/index.d.ts +15 -5
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/index.vue.d.ts +5 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/radio/index.vue.d.ts +3 -3
- package/dist/types/__VUE/searchbar/index.vue.d.ts +18 -3
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +5 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.2
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
@@ -38,47 +57,32 @@ function isShadowRoot(node) {
|
|
|
38
57
|
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
39
58
|
}
|
|
40
59
|
var round = Math.round;
|
|
41
|
-
function
|
|
42
|
-
var uaData = navigator.userAgentData;
|
|
43
|
-
if (uaData != null && uaData.brands) {
|
|
44
|
-
return uaData.brands.map(function(item) {
|
|
45
|
-
return item.brand + "/" + item.version;
|
|
46
|
-
}).join(" ");
|
|
47
|
-
}
|
|
48
|
-
return navigator.userAgent;
|
|
49
|
-
}
|
|
50
|
-
function isLayoutViewport() {
|
|
51
|
-
return !/^((?!chrome|android).)*safari/i.test(getUAString());
|
|
52
|
-
}
|
|
53
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
60
|
+
function getBoundingClientRect(element, includeScale) {
|
|
54
61
|
if (includeScale === void 0) {
|
|
55
62
|
includeScale = false;
|
|
56
63
|
}
|
|
57
|
-
|
|
58
|
-
isFixedStrategy = false;
|
|
59
|
-
}
|
|
60
|
-
var clientRect = element.getBoundingClientRect();
|
|
64
|
+
var rect = element.getBoundingClientRect();
|
|
61
65
|
var scaleX = 1;
|
|
62
66
|
var scaleY = 1;
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
if (isHTMLElement(element) && includeScale) {
|
|
68
|
+
var offsetHeight = element.offsetHeight;
|
|
69
|
+
var offsetWidth = element.offsetWidth;
|
|
70
|
+
if (offsetWidth > 0) {
|
|
71
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
72
|
+
}
|
|
73
|
+
if (offsetHeight > 0) {
|
|
74
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
73
77
|
return {
|
|
74
|
-
width,
|
|
75
|
-
height,
|
|
76
|
-
top:
|
|
77
|
-
right:
|
|
78
|
-
bottom:
|
|
79
|
-
left:
|
|
80
|
-
x,
|
|
81
|
-
y
|
|
78
|
+
width: rect.width / scaleX,
|
|
79
|
+
height: rect.height / scaleY,
|
|
80
|
+
top: rect.top / scaleY,
|
|
81
|
+
right: rect.right / scaleX,
|
|
82
|
+
bottom: rect.bottom / scaleY,
|
|
83
|
+
left: rect.left / scaleX,
|
|
84
|
+
x: rect.left / scaleX,
|
|
85
|
+
y: rect.top / scaleY
|
|
82
86
|
};
|
|
83
87
|
}
|
|
84
88
|
function getWindowScroll(node) {
|
|
@@ -132,7 +136,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
132
136
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
133
137
|
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
134
138
|
var documentElement = getDocumentElement(offsetParent);
|
|
135
|
-
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled
|
|
139
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
136
140
|
var scroll = {
|
|
137
141
|
scrollLeft: 0,
|
|
138
142
|
scrollTop: 0
|
|
@@ -214,8 +218,8 @@ function getTrueOffsetParent(element) {
|
|
|
214
218
|
return element.offsetParent;
|
|
215
219
|
}
|
|
216
220
|
function getContainingBlock(element) {
|
|
217
|
-
var isFirefox =
|
|
218
|
-
var isIE =
|
|
221
|
+
var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
|
|
222
|
+
var isIE = navigator.userAgent.indexOf("Trident") !== -1;
|
|
219
223
|
if (isIE && isHTMLElement(element)) {
|
|
220
224
|
var elementCss = getComputedStyle(element);
|
|
221
225
|
if (elementCss.position === "fixed") {
|
|
@@ -802,8 +806,7 @@ const _sfc_main = create({
|
|
|
802
806
|
[Popup.name]: Popup,
|
|
803
807
|
[Button.name]: Button
|
|
804
808
|
},
|
|
805
|
-
props: {
|
|
806
|
-
...popupProps,
|
|
809
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
807
810
|
list: {
|
|
808
811
|
type: Array,
|
|
809
812
|
default: []
|
|
@@ -828,7 +831,7 @@ const _sfc_main = create({
|
|
|
828
831
|
type: Boolean,
|
|
829
832
|
default: true
|
|
830
833
|
}
|
|
831
|
-
},
|
|
834
|
+
}),
|
|
832
835
|
emits: ["update", "update:visible", "close", "choose", "open"],
|
|
833
836
|
setup(props, { emit }) {
|
|
834
837
|
let popper;
|
|
@@ -903,19 +906,13 @@ const _sfc_main = create({
|
|
|
903
906
|
onUnmounted(() => {
|
|
904
907
|
window.removeEventListener("click", clickAway, true);
|
|
905
908
|
});
|
|
906
|
-
watch(
|
|
907
|
-
|
|
908
|
-
(
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
);
|
|
913
|
-
watch(
|
|
914
|
-
() => props.location,
|
|
915
|
-
(value) => {
|
|
916
|
-
uploadLocation();
|
|
917
|
-
}
|
|
918
|
-
);
|
|
909
|
+
watch(() => props.visible, (value) => {
|
|
910
|
+
showPopup.value = value;
|
|
911
|
+
uploadLocation();
|
|
912
|
+
});
|
|
913
|
+
watch(() => props.location, (value) => {
|
|
914
|
+
uploadLocation();
|
|
915
|
+
});
|
|
919
916
|
const update = (val) => {
|
|
920
917
|
emit("update", val);
|
|
921
918
|
emit("update:visible", val);
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.2
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
@@ -29,8 +48,7 @@ const useLockScroll = (isLock) => {
|
|
|
29
48
|
};
|
|
30
49
|
const { componentName, create } = createComponent("popup");
|
|
31
50
|
let _zIndex = 2e3;
|
|
32
|
-
const popupProps = {
|
|
33
|
-
...overlayProps,
|
|
51
|
+
const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
34
52
|
position: {
|
|
35
53
|
type: String,
|
|
36
54
|
default: "center"
|
|
@@ -79,15 +97,13 @@ const popupProps = {
|
|
|
79
97
|
type: Boolean,
|
|
80
98
|
default: false
|
|
81
99
|
}
|
|
82
|
-
};
|
|
100
|
+
});
|
|
83
101
|
const _sfc_main = create({
|
|
84
102
|
components: {
|
|
85
103
|
[overlay.name]: overlay,
|
|
86
104
|
[_sfc_main$1.name]: _sfc_main$1
|
|
87
105
|
},
|
|
88
|
-
props: {
|
|
89
|
-
...popupProps
|
|
90
|
-
},
|
|
106
|
+
props: __spreadValues({}, popupProps),
|
|
91
107
|
emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
|
|
92
108
|
setup(props, { emit }) {
|
|
93
109
|
const popupRef = ref();
|
|
@@ -111,11 +127,10 @@ const _sfc_main = create({
|
|
|
111
127
|
};
|
|
112
128
|
});
|
|
113
129
|
const popStyle = computed(() => {
|
|
114
|
-
return {
|
|
130
|
+
return __spreadValues({
|
|
115
131
|
zIndex: state.zIndex,
|
|
116
|
-
animationDuration: props.duration ? `${props.duration}s` : "initial"
|
|
117
|
-
|
|
118
|
-
};
|
|
132
|
+
animationDuration: props.duration ? `${props.duration}s` : "initial"
|
|
133
|
+
}, props.style);
|
|
119
134
|
});
|
|
120
135
|
const open = () => {
|
|
121
136
|
if (props.zIndex != 2e3) {
|
|
@@ -182,30 +197,20 @@ const _sfc_main = create({
|
|
|
182
197
|
state.keepAlive = true;
|
|
183
198
|
}
|
|
184
199
|
});
|
|
185
|
-
watch(
|
|
186
|
-
()
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
} else {
|
|
191
|
-
close();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
watch(
|
|
196
|
-
() => props.position,
|
|
197
|
-
(value) => {
|
|
198
|
-
value === "center" ? state.transitionName = "popup-fade" : state.transitionName = `popup-slide-${value}`;
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
watch(
|
|
202
|
-
() => props.closeable,
|
|
203
|
-
(value) => {
|
|
204
|
-
state.closed = value;
|
|
200
|
+
watch(() => props.visible, (value) => {
|
|
201
|
+
if (value) {
|
|
202
|
+
open();
|
|
203
|
+
} else {
|
|
204
|
+
close();
|
|
205
205
|
}
|
|
206
|
-
);
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
});
|
|
207
|
+
watch(() => props.position, (value) => {
|
|
208
|
+
value === "center" ? state.transitionName = "popup-fade" : state.transitionName = `popup-slide-${value}`;
|
|
209
|
+
});
|
|
210
|
+
watch(() => props.closeable, (value) => {
|
|
211
|
+
state.closed = value;
|
|
212
|
+
});
|
|
213
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
209
214
|
popStyle,
|
|
210
215
|
classes,
|
|
211
216
|
onClick,
|
|
@@ -214,7 +219,7 @@ const _sfc_main = create({
|
|
|
214
219
|
onOpened,
|
|
215
220
|
onClosed,
|
|
216
221
|
popupRef
|
|
217
|
-
};
|
|
222
|
+
});
|
|
218
223
|
}
|
|
219
224
|
});
|
|
220
225
|
const _hoisted_1 = { key: 1 };
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.2
|
|
18
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
19
|
* (c) 2022 @jdf2e.
|
|
4
20
|
* Released under the MIT License.
|
|
5
21
|
*/
|
|
@@ -303,7 +319,7 @@ const _sfc_main = create({
|
|
|
303
319
|
}
|
|
304
320
|
}
|
|
305
321
|
};
|
|
306
|
-
return {
|
|
322
|
+
return __spreadValues({
|
|
307
323
|
scroller,
|
|
308
324
|
touchStart,
|
|
309
325
|
touchMove,
|
|
@@ -315,9 +331,8 @@ const _sfc_main = create({
|
|
|
315
331
|
reachLeft,
|
|
316
332
|
getBottomStyle,
|
|
317
333
|
refreshTopTem,
|
|
318
|
-
refreshBottomTem
|
|
319
|
-
|
|
320
|
-
};
|
|
334
|
+
refreshBottomTem
|
|
335
|
+
}, toRefs(state));
|
|
321
336
|
}
|
|
322
337
|
});
|
|
323
338
|
const _hoisted_1 = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.2
|
|
2
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -20,7 +20,7 @@ const _sfc_main = create({
|
|
|
20
20
|
default: "round"
|
|
21
21
|
},
|
|
22
22
|
label: {
|
|
23
|
-
type: [String, Number],
|
|
23
|
+
type: [String, Number, Boolean],
|
|
24
24
|
default: ""
|
|
25
25
|
},
|
|
26
26
|
iconName: {
|
|
@@ -47,7 +47,7 @@ const _sfc_main = create({
|
|
|
47
47
|
setup(props, { emit, slots }) {
|
|
48
48
|
let parent = inject("parent", null);
|
|
49
49
|
const isCurValue = computed(() => {
|
|
50
|
-
return parent.label.value
|
|
50
|
+
return parent.label.value === props.label;
|
|
51
51
|
});
|
|
52
52
|
const color = computed(() => {
|
|
53
53
|
return !props.disabled ? isCurValue.value ? "nut-radio__icon" : "nut-radio__icon--unchecked" : "nut-radio__icon--disable";
|
|
@@ -67,23 +67,15 @@ const _sfc_main = create({
|
|
|
67
67
|
};
|
|
68
68
|
const renderLabel = () => {
|
|
69
69
|
var _a;
|
|
70
|
-
return h(
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
class: `${componentName}__label ${props.disabled ? `${componentName}__label--disabled` : ""}`
|
|
74
|
-
},
|
|
75
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
76
|
-
);
|
|
70
|
+
return h("view", {
|
|
71
|
+
class: `${componentName}__label ${props.disabled ? `${componentName}__label--disabled` : ""}`
|
|
72
|
+
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
77
73
|
};
|
|
78
74
|
const renderButton = () => {
|
|
79
75
|
var _a;
|
|
80
|
-
return h(
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
class: `${componentName}__button ${isCurValue.value && `${componentName}__button--active`} ${props.disabled ? `${componentName}__button--disabled` : ""}`
|
|
84
|
-
},
|
|
85
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
86
|
-
);
|
|
76
|
+
return h("view", {
|
|
77
|
+
class: `${componentName}__button ${isCurValue.value && `${componentName}__button--active`} ${props.disabled ? `${componentName}__button--disabled` : ""}`
|
|
78
|
+
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
87
79
|
};
|
|
88
80
|
const handleClick = () => {
|
|
89
81
|
if (isCurValue.value || props.disabled)
|
|
@@ -92,16 +84,12 @@ const _sfc_main = create({
|
|
|
92
84
|
};
|
|
93
85
|
let reverseState = position.value === "left";
|
|
94
86
|
return () => {
|
|
95
|
-
return h(
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
[
|
|
102
|
-
props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]
|
|
103
|
-
]
|
|
104
|
-
);
|
|
87
|
+
return h("view", {
|
|
88
|
+
class: `${componentName} ${componentName}--${props.shape} ${reverseState ? `${componentName}--reverse` : ""}`,
|
|
89
|
+
onClick: handleClick
|
|
90
|
+
}, [
|
|
91
|
+
props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]
|
|
92
|
+
]);
|
|
105
93
|
};
|
|
106
94
|
}
|
|
107
95
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.2
|
|
2
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -30,19 +30,12 @@ const _sfc_main = create({
|
|
|
30
30
|
position: props.textPosition,
|
|
31
31
|
updateValue
|
|
32
32
|
});
|
|
33
|
-
watch(
|
|
34
|
-
() => props.modelValue,
|
|
35
|
-
(value) => emit("change", value)
|
|
36
|
-
);
|
|
33
|
+
watch(() => props.modelValue, (value) => emit("change", value));
|
|
37
34
|
return () => {
|
|
38
35
|
var _a;
|
|
39
|
-
return h(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class: `${componentName} ${componentName}--${props.direction}`
|
|
43
|
-
},
|
|
44
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
45
|
-
);
|
|
36
|
+
return h("view", {
|
|
37
|
+
class: `${componentName} ${componentName}--${props.direction}`
|
|
38
|
+
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
46
39
|
};
|
|
47
40
|
}
|
|
48
41
|
});
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.2
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
@@ -275,7 +294,7 @@ const _sfc_main = create({
|
|
|
275
294
|
const value = typeof idx === "number" ? props.modelValue[idx] : props.modelValue;
|
|
276
295
|
return value;
|
|
277
296
|
};
|
|
278
|
-
return {
|
|
297
|
+
return __spreadProps(__spreadValues({
|
|
279
298
|
root,
|
|
280
299
|
classes,
|
|
281
300
|
wrapperStyle,
|
|
@@ -283,8 +302,8 @@ const _sfc_main = create({
|
|
|
283
302
|
onClick,
|
|
284
303
|
onTouchStart,
|
|
285
304
|
onTouchMove,
|
|
286
|
-
onTouchEnd
|
|
287
|
-
|
|
305
|
+
onTouchEnd
|
|
306
|
+
}, toRefs(props)), {
|
|
288
307
|
barStyle,
|
|
289
308
|
curValue,
|
|
290
309
|
buttonIndex,
|
|
@@ -293,7 +312,7 @@ const _sfc_main = create({
|
|
|
293
312
|
marksStyle,
|
|
294
313
|
marksList,
|
|
295
314
|
tickStyle
|
|
296
|
-
};
|
|
315
|
+
});
|
|
297
316
|
}
|
|
298
317
|
});
|
|
299
318
|
const _hoisted_1 = {
|
|
@@ -361,15 +380,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
361
380
|
"aria-valuenow": _ctx.curValue(index2),
|
|
362
381
|
"aria-valuemax": +_ctx.max,
|
|
363
382
|
"aria-orientation": "horizontal",
|
|
364
|
-
onTouchstart: withModifiers(
|
|
365
|
-
(
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
},
|
|
371
|
-
["stop", "prevent"]
|
|
372
|
-
),
|
|
383
|
+
onTouchstart: withModifiers((e) => {
|
|
384
|
+
if (typeof index2 === "number") {
|
|
385
|
+
_ctx.buttonIndex = index2;
|
|
386
|
+
}
|
|
387
|
+
_ctx.onTouchStart(e);
|
|
388
|
+
}, ["stop", "prevent"]),
|
|
373
389
|
onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args), ["stop", "prevent"])),
|
|
374
390
|
onTouchend: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args), ["stop", "prevent"])),
|
|
375
391
|
onTouchcancel: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args), ["stop", "prevent"])),
|
|
@@ -392,12 +408,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
392
408
|
"aria-valuenow": _ctx.curValue(),
|
|
393
409
|
"aria-valuemax": +_ctx.max,
|
|
394
410
|
"aria-orientation": "horizontal",
|
|
395
|
-
onTouchstart: _cache[4] || (_cache[4] = withModifiers(
|
|
396
|
-
(e)
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
["stop", "prevent"]
|
|
400
|
-
)),
|
|
411
|
+
onTouchstart: _cache[4] || (_cache[4] = withModifiers((e) => {
|
|
412
|
+
_ctx.onTouchStart(e);
|
|
413
|
+
}, ["stop", "prevent"])),
|
|
401
414
|
onTouchmove: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args), ["stop", "prevent"])),
|
|
402
415
|
onTouchend: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args), ["stop", "prevent"])),
|
|
403
416
|
onTouchcancel: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args), ["stop", "prevent"])),
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.2
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
@@ -132,14 +151,14 @@ const useComponent = (touchable = true) => {
|
|
|
132
151
|
}
|
|
133
152
|
};
|
|
134
153
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
135
|
-
return {
|
|
136
|
-
classes
|
|
137
|
-
|
|
154
|
+
return __spreadProps(__spreadValues({
|
|
155
|
+
classes
|
|
156
|
+
}, touchMethods), {
|
|
138
157
|
onClick,
|
|
139
158
|
pxCheck,
|
|
140
159
|
rateRefs,
|
|
141
160
|
refRandomId
|
|
142
|
-
};
|
|
161
|
+
});
|
|
143
162
|
}
|
|
144
163
|
};
|
|
145
164
|
};
|
package/dist/packages/_es/Row.js
CHANGED