@nutui/nutui 3.1.10-beta.3 → 3.1.12-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 +43 -0
- package/dist/nutui.d.ts +2 -1
- package/dist/nutui.es.js +1642 -926
- package/dist/nutui.umd.js +1648 -931
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +1 -1
- package/dist/packages/_es/Dialog.js +3 -12
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +3 -2
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +1 -1
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/Menu.js +83 -167
- package/dist/packages/_es/MenuItem.js +154 -15
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +1 -1
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +52 -13
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/Radio.js +18 -5
- package/dist/packages/_es/RadioGroup.js +6 -2
- package/dist/packages/_es/Range.js +3 -31
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +52 -49
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Sku.js +533 -0
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +2 -2
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Tabs.js +2 -2
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +3 -3
- package/dist/packages/_es/Uploader.js +159 -73
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +31 -8
- package/dist/packages/_es/index3.js +13 -0
- package/dist/packages/_es/plugin-vue_export-helper.js +4 -3
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/button/index.scss +3 -0
- package/dist/packages/menu/index.scss +32 -60
- package/dist/packages/menuitem/index.scss +36 -99
- package/dist/packages/progress/index.scss +2 -0
- package/dist/packages/radio/index.scss +32 -4
- package/dist/packages/radiogroup/index.scss +20 -0
- package/dist/packages/searchbar/index.scss +25 -29
- package/dist/packages/sku/index.scss +147 -0
- package/dist/packages/uploader/index.scss +95 -8
- package/dist/style.css +1 -1
- package/dist/styles/mixins/index.scss +0 -4
- package/dist/styles/themes/default.scss +31 -30
- package/dist/styles/variables.scss +40 -3
- package/package.json +2 -1
- package/dist/packages/_es/style.css +0 -160
|
@@ -1,29 +1,168 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { getCurrentInstance, openBlock, createElementBlock, renderSlot } from "vue";
|
|
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 _sfc_main$1 from "./Icon.js";
|
|
9
|
+
import Popup from "./Popup.js";
|
|
8
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
import "./pxCheck.js";
|
|
12
|
+
import "./OverLay.js";
|
|
13
|
+
const { componentName, create } = createComponent("menu-item");
|
|
11
14
|
const _sfc_main = create({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
props: {
|
|
16
|
+
title: String,
|
|
17
|
+
options: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: []
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
modelValue: null,
|
|
26
|
+
cols: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 1
|
|
29
|
+
},
|
|
30
|
+
titleIcon: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "down-arrow"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
components: {
|
|
36
|
+
[_sfc_main$1.name]: _sfc_main$1,
|
|
37
|
+
[Popup.name]: Popup
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:modelValue", "change"],
|
|
40
|
+
setup(props, { emit, slots }) {
|
|
41
|
+
const state = reactive({
|
|
42
|
+
showPopup: false,
|
|
43
|
+
transition: true,
|
|
44
|
+
showWrapper: false,
|
|
45
|
+
isShowPlaceholderElement: false
|
|
46
|
+
});
|
|
47
|
+
const useParent = () => {
|
|
48
|
+
const parent2 = inject("menuParent", null);
|
|
49
|
+
if (parent2) {
|
|
50
|
+
const instance = getCurrentInstance();
|
|
51
|
+
const { link } = parent2;
|
|
52
|
+
link(instance);
|
|
53
|
+
return {
|
|
54
|
+
parent: parent2
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const { parent } = useParent();
|
|
59
|
+
const classes = computed(() => {
|
|
60
|
+
const prefixCls = componentName;
|
|
61
|
+
return {
|
|
62
|
+
[prefixCls]: true
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
const toggle = (show = !state.showPopup, options = {}) => {
|
|
66
|
+
if (show === state.showPopup) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
state.showPopup = show;
|
|
70
|
+
state.isShowPlaceholderElement = show;
|
|
71
|
+
if (show) {
|
|
72
|
+
state.showWrapper = true;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const renderTitle = () => {
|
|
76
|
+
var _a;
|
|
77
|
+
if (props.title) {
|
|
78
|
+
return props.title;
|
|
79
|
+
}
|
|
80
|
+
const match = (_a = props.options) == null ? void 0 : _a.find((option) => option.value === props.modelValue);
|
|
81
|
+
return match ? match.text : "";
|
|
82
|
+
};
|
|
83
|
+
const onClick = (option) => {
|
|
84
|
+
state.showPopup = false;
|
|
85
|
+
state.isShowPlaceholderElement = false;
|
|
86
|
+
if (option.value !== props.modelValue) {
|
|
87
|
+
emit("update:modelValue", option.value);
|
|
88
|
+
emit("change", option.value);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const handleClose = () => {
|
|
92
|
+
state.showWrapper = false;
|
|
93
|
+
state.isShowPlaceholderElement = false;
|
|
94
|
+
};
|
|
95
|
+
const handleClickOutside = () => {
|
|
96
|
+
state.showPopup = false;
|
|
97
|
+
};
|
|
98
|
+
return {
|
|
99
|
+
classes,
|
|
100
|
+
renderTitle,
|
|
101
|
+
state,
|
|
102
|
+
parent,
|
|
103
|
+
toggle,
|
|
104
|
+
onClick,
|
|
105
|
+
handleClose,
|
|
106
|
+
handleClickOutside
|
|
19
107
|
};
|
|
20
|
-
return {};
|
|
21
108
|
}
|
|
22
109
|
});
|
|
110
|
+
const _hoisted_1 = { class: "nut-menu-item__content" };
|
|
111
|
+
const _hoisted_2 = ["onClick"];
|
|
23
112
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
24
|
-
|
|
25
|
-
|
|
113
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
114
|
+
const _component_nut_popup = resolveComponent("nut-popup");
|
|
115
|
+
return withDirectives((openBlock(), createElementBlock("view", {
|
|
116
|
+
class: normalizeClass(_ctx.classes)
|
|
117
|
+
}, [
|
|
118
|
+
withDirectives(createElementVNode("div", {
|
|
119
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClickOutside && _ctx.handleClickOutside(...args)),
|
|
120
|
+
class: "placeholder-element",
|
|
121
|
+
style: normalizeStyle({ height: _ctx.parent.offset.value + "px" })
|
|
122
|
+
}, null, 4), [
|
|
123
|
+
[vShow, _ctx.state.isShowPlaceholderElement]
|
|
124
|
+
]),
|
|
125
|
+
createVNode(_component_nut_popup, mergeProps({
|
|
126
|
+
style: { top: _ctx.parent.offset.value + "px" },
|
|
127
|
+
overlayStyle: { top: _ctx.parent.offset.value + "px" }
|
|
128
|
+
}, _ctx.$attrs, {
|
|
129
|
+
visible: _ctx.state.showPopup,
|
|
130
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.state.showPopup = $event),
|
|
131
|
+
position: "top",
|
|
132
|
+
duration: _ctx.parent.props.duration,
|
|
133
|
+
"pop-class": "nut-menu__pop",
|
|
134
|
+
overlayClass: "nut-menu__overlay",
|
|
135
|
+
overlay: _ctx.parent.props.overlay,
|
|
136
|
+
onClosed: _ctx.handleClose,
|
|
137
|
+
isWrapTeleport: false
|
|
138
|
+
}), {
|
|
139
|
+
default: withCtx(() => [
|
|
140
|
+
createElementVNode("view", _hoisted_1, [
|
|
141
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index2) => {
|
|
142
|
+
return openBlock(), createElementBlock("view", {
|
|
143
|
+
key: index2,
|
|
144
|
+
class: normalizeClass(["nut-menu-item__option", { active: option.value === _ctx.modelValue }]),
|
|
145
|
+
style: normalizeStyle({ "flex-basis": 100 / _ctx.cols + "%" }),
|
|
146
|
+
onClick: ($event) => _ctx.onClick(option)
|
|
147
|
+
}, [
|
|
148
|
+
option.value === _ctx.modelValue ? (openBlock(), createBlock(_component_nut_icon, {
|
|
149
|
+
key: 0,
|
|
150
|
+
name: "Check",
|
|
151
|
+
color: _ctx.parent.props.activeColor
|
|
152
|
+
}, null, 8, ["color"])) : createCommentVNode("", true),
|
|
153
|
+
createElementVNode("view", {
|
|
154
|
+
style: normalizeStyle({ color: option.value === _ctx.modelValue ? _ctx.parent.props.activeColor : "" })
|
|
155
|
+
}, toDisplayString(option.text), 5)
|
|
156
|
+
], 14, _hoisted_2);
|
|
157
|
+
}), 128)),
|
|
158
|
+
renderSlot(_ctx.$slots, "default")
|
|
159
|
+
])
|
|
160
|
+
]),
|
|
161
|
+
_: 3
|
|
162
|
+
}, 16, ["style", "overlayStyle", "visible", "duration", "overlay", "onClosed"])
|
|
163
|
+
], 2)), [
|
|
164
|
+
[vShow, _ctx.state.showWrapper]
|
|
26
165
|
]);
|
|
27
166
|
}
|
|
28
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]
|
|
167
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
29
168
|
export { index as default };
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -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.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -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.12-beta.0 Mon Nov 22 2021 20:58:07 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.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -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.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -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.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -87,6 +87,10 @@ const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
|
87
87
|
round: {
|
|
88
88
|
type: Boolean,
|
|
89
89
|
default: false
|
|
90
|
+
},
|
|
91
|
+
isWrapTeleport: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: true
|
|
90
94
|
}
|
|
91
95
|
});
|
|
92
96
|
const _sfc_main = create({
|
|
@@ -95,16 +99,7 @@ const _sfc_main = create({
|
|
|
95
99
|
[_sfc_main$1.name]: _sfc_main$1
|
|
96
100
|
},
|
|
97
101
|
props: __spreadValues({}, popupProps),
|
|
98
|
-
emits: [
|
|
99
|
-
"click",
|
|
100
|
-
"click-close-icon",
|
|
101
|
-
"open",
|
|
102
|
-
"close",
|
|
103
|
-
"opend",
|
|
104
|
-
"closed",
|
|
105
|
-
"update:visible",
|
|
106
|
-
"click-overlay"
|
|
107
|
-
],
|
|
102
|
+
emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
|
|
108
103
|
setup(props, { emit }) {
|
|
109
104
|
const state = reactive({
|
|
110
105
|
zIndex: props.zIndex ? props.zIndex : _zIndex,
|
|
@@ -219,10 +214,14 @@ const _sfc_main = create({
|
|
|
219
214
|
});
|
|
220
215
|
}
|
|
221
216
|
});
|
|
217
|
+
const _hoisted_1 = { key: 1 };
|
|
222
218
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
223
219
|
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
224
220
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
225
|
-
return openBlock(), createBlock(Teleport, {
|
|
221
|
+
return _ctx.isWrapTeleport ? (openBlock(), createBlock(Teleport, {
|
|
222
|
+
key: 0,
|
|
223
|
+
to: _ctx.teleport
|
|
224
|
+
}, [
|
|
226
225
|
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
227
226
|
key: 0,
|
|
228
227
|
visible: _ctx.visible,
|
|
@@ -262,7 +261,47 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
262
261
|
]),
|
|
263
262
|
_: 3
|
|
264
263
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
265
|
-
], 8, ["to"])
|
|
264
|
+
], 8, ["to"])) : (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
265
|
+
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
266
|
+
key: 0,
|
|
267
|
+
visible: _ctx.visible,
|
|
268
|
+
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
269
|
+
class: normalizeClass(_ctx.overlayClass),
|
|
270
|
+
style: normalizeStyle(_ctx.overlayStyle),
|
|
271
|
+
"z-index": _ctx.zIndex,
|
|
272
|
+
"lock-scroll": _ctx.lockScroll,
|
|
273
|
+
duration: _ctx.duration,
|
|
274
|
+
onClick: _ctx.onClickOverlay
|
|
275
|
+
}, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
|
|
276
|
+
createVNode(Transition, {
|
|
277
|
+
name: _ctx.transitionName,
|
|
278
|
+
onAfterEnter: _ctx.onOpened,
|
|
279
|
+
onAfterLeave: _ctx.onClosed
|
|
280
|
+
}, {
|
|
281
|
+
default: withCtx(() => [
|
|
282
|
+
withDirectives(createElementVNode("view", {
|
|
283
|
+
class: normalizeClass(_ctx.classes),
|
|
284
|
+
style: normalizeStyle(_ctx.popStyle),
|
|
285
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
286
|
+
}, [
|
|
287
|
+
_ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
|
|
288
|
+
_ctx.closeable ? (openBlock(), createElementBlock("view", {
|
|
289
|
+
key: 1,
|
|
290
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
|
|
291
|
+
class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
|
|
292
|
+
}, [
|
|
293
|
+
createVNode(_component_nut_icon, {
|
|
294
|
+
name: _ctx.closeIcon,
|
|
295
|
+
size: "12px"
|
|
296
|
+
}, null, 8, ["name"])
|
|
297
|
+
], 2)) : createCommentVNode("", true)
|
|
298
|
+
], 6), [
|
|
299
|
+
[vShow, _ctx.visible]
|
|
300
|
+
])
|
|
301
|
+
]),
|
|
302
|
+
_: 3
|
|
303
|
+
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
304
|
+
]));
|
|
266
305
|
}
|
|
267
306
|
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
268
307
|
export { Popup as default, popupProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -14,8 +14,12 @@ const _sfc_main = create({
|
|
|
14
14
|
type: Boolean,
|
|
15
15
|
default: false
|
|
16
16
|
},
|
|
17
|
-
|
|
17
|
+
shape: {
|
|
18
18
|
type: String,
|
|
19
|
+
default: "round"
|
|
20
|
+
},
|
|
21
|
+
label: {
|
|
22
|
+
type: [String, Number],
|
|
19
23
|
default: ""
|
|
20
24
|
},
|
|
21
25
|
iconName: {
|
|
@@ -34,7 +38,7 @@ const _sfc_main = create({
|
|
|
34
38
|
setup(props, { emit, slots }) {
|
|
35
39
|
let parent = inject("parent");
|
|
36
40
|
const isCurValue = computed(() => {
|
|
37
|
-
return parent.label.value
|
|
41
|
+
return parent.label.value == props.label;
|
|
38
42
|
});
|
|
39
43
|
const color = computed(() => {
|
|
40
44
|
return !props.disabled ? isCurValue.value ? "nut-radio__icon" : "nut-radio__icon--unchecked" : "nut-radio__icon--disable";
|
|
@@ -56,16 +60,25 @@ const _sfc_main = create({
|
|
|
56
60
|
class: `${componentName}__label ${props.disabled ? `${componentName}__label--disabled` : ""}`
|
|
57
61
|
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
58
62
|
};
|
|
63
|
+
const renderButton = () => {
|
|
64
|
+
var _a;
|
|
65
|
+
return h("view", {
|
|
66
|
+
class: `${componentName}__button ${isCurValue.value && `${componentName}__button--active`} ${props.disabled ? `${componentName}__button--disabled` : ""}`
|
|
67
|
+
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
68
|
+
};
|
|
59
69
|
const handleClick = () => {
|
|
60
70
|
if (isCurValue.value || props.disabled)
|
|
61
71
|
return;
|
|
62
72
|
parent.updateValue(props.label);
|
|
63
73
|
};
|
|
74
|
+
let reverseState = position.value === "left";
|
|
64
75
|
return () => {
|
|
65
76
|
return h("view", {
|
|
66
|
-
class: `${componentName} ${
|
|
77
|
+
class: `${componentName} ${componentName}--${props.shape} ${reverseState ? `${componentName}--reverse` : ""}`,
|
|
67
78
|
onClick: handleClick
|
|
68
|
-
}, [
|
|
79
|
+
}, [
|
|
80
|
+
props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]
|
|
81
|
+
]);
|
|
69
82
|
};
|
|
70
83
|
}
|
|
71
84
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -12,6 +12,10 @@ const _sfc_main = create({
|
|
|
12
12
|
type: [Number, String, Boolean],
|
|
13
13
|
default: ""
|
|
14
14
|
},
|
|
15
|
+
direction: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "vertical"
|
|
18
|
+
},
|
|
15
19
|
textPosition: {
|
|
16
20
|
type: String,
|
|
17
21
|
default: "right"
|
|
@@ -29,7 +33,7 @@ const _sfc_main = create({
|
|
|
29
33
|
return () => {
|
|
30
34
|
var _a;
|
|
31
35
|
return h("view", {
|
|
32
|
-
class: `${componentName}`
|
|
36
|
+
class: `${componentName} ${componentName}--${props.direction}`
|
|
33
37
|
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
34
38
|
};
|
|
35
39
|
}
|
|
@@ -18,43 +18,15 @@ 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.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import {
|
|
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
27
|
import { u as useTouch } from "./index.js";
|
|
28
|
+
import { u as useRect } from "./index2.js";
|
|
28
29
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
|
-
function isWindow(val) {
|
|
30
|
-
return val === window;
|
|
31
|
-
}
|
|
32
|
-
const useRect = (elementRef) => {
|
|
33
|
-
const element = unref(elementRef);
|
|
34
|
-
if (isWindow(element)) {
|
|
35
|
-
const width = element.innerWidth;
|
|
36
|
-
const height = element.innerHeight;
|
|
37
|
-
return {
|
|
38
|
-
top: 0,
|
|
39
|
-
left: 0,
|
|
40
|
-
right: width,
|
|
41
|
-
bottom: height,
|
|
42
|
-
width,
|
|
43
|
-
height
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
if (element && element.getBoundingClientRect) {
|
|
47
|
-
return element.getBoundingClientRect();
|
|
48
|
-
}
|
|
49
|
-
return {
|
|
50
|
-
top: 0,
|
|
51
|
-
left: 0,
|
|
52
|
-
right: 0,
|
|
53
|
-
bottom: 0,
|
|
54
|
-
width: 0,
|
|
55
|
-
height: 0
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
30
|
const { componentName, create } = createComponent("range");
|
|
59
31
|
const _sfc_main = create({
|
|
60
32
|
props: {
|
package/dist/packages/_es/Row.js
CHANGED