@nutui/nutui 3.1.11-beta.0 → 3.1.12
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 +44 -0
- package/dist/nutui.d.ts +5 -2
- package/dist/nutui.es.js +4243 -3673
- package/dist/nutui.umd.js +4252 -3679
- 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/Card.js +105 -0
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +10 -4
- 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 +2 -2
- package/dist/packages/_es/Dialog.js +10 -23
- 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/Form.js +138 -0
- package/dist/packages/_es/FormItem.js +110 -0
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +148 -32
- 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 +9 -7
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +2 -2
- package/dist/packages/_es/Popover.js +11 -17
- 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 +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +4 -32
- package/dist/packages/_es/Rate.js +19 -5
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Sku.js +2 -37
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Swipe.js +2 -2
- package/dist/packages/_es/Swiper.js +11 -11
- package/dist/packages/_es/SwiperItem.js +3 -3
- package/dist/packages/_es/Switch.js +28 -8
- 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 +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 +1 -1
- package/dist/packages/_es/Toast.js +18 -8
- package/dist/packages/_es/Uploader.js +30 -22
- package/dist/packages/_es/Video.js +3 -3
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +7 -58
- package/dist/packages/_es/index2.js +58 -7
- package/dist/packages/_es/index3.js +36 -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/_es/util.js +47 -0
- package/dist/packages/button/index.scss +6 -0
- package/dist/packages/card/index.scss +97 -0
- package/dist/packages/cellgroup/index.scss +9 -0
- package/dist/packages/checkbox/index.scss +1 -1
- package/dist/packages/dialog/index.scss +17 -0
- package/dist/packages/drag/index.scss +4 -0
- package/dist/packages/fixednav/index.scss +6 -1
- package/dist/packages/form/index.scss +2 -0
- package/dist/packages/formitem/index.scss +63 -0
- package/dist/packages/icon/index.scss +2 -1
- package/dist/packages/menu/index.scss +32 -60
- package/dist/packages/menuitem/index.scss +36 -99
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/popover/index.scss +2 -2
- package/dist/packages/rate/index.scss +1 -0
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/textarea/index.scss +1 -0
- package/dist/packages/timedetail/index.scss +1 -2
- package/dist/packages/timeselect/index.scss +3 -0
- package/dist/packages/toast/index.scss +6 -0
- package/dist/packages/uploader/index.scss +1 -0
- package/dist/style.css +1 -1
- package/dist/styles/font/config.json +2 -1
- package/dist/styles/font/demo_index.html +26 -3
- package/dist/styles/font/iconfont.css +7 -3
- package/dist/styles/font/iconfont.js +31 -32
- package/dist/styles/font/iconfont.json +7 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +39 -36
- package/dist/styles/variables.scss +29 -2
- package/package.json +3 -2
- 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 Sat Nov 27 2021 11:30:43 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 Sat Nov 27 2021 11:30:43 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 Sat Nov 27 2021 11:30:43 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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -36,10 +36,15 @@ const _sfc_main = create({
|
|
|
36
36
|
randomKeys: {
|
|
37
37
|
type: Boolean,
|
|
38
38
|
default: false
|
|
39
|
+
},
|
|
40
|
+
overlay: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
emits: ["input", "delete", "close", "update:value"],
|
|
42
46
|
setup(props, { emit }) {
|
|
47
|
+
console.log(props.overlay);
|
|
43
48
|
const clickKeyIndex = ref(void 0);
|
|
44
49
|
const show = ref(props.visible);
|
|
45
50
|
const root = ref();
|
|
@@ -171,6 +176,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
176
|
visible: _ctx.show,
|
|
172
177
|
"onUpdate:visible": _cache[6] || (_cache[6] = ($event) => _ctx.show = $event),
|
|
173
178
|
position: "bottom",
|
|
179
|
+
overlay: _ctx.overlay,
|
|
174
180
|
onClickOverlay: _cache[7] || (_cache[7] = ($event) => _ctx.closeBoard()),
|
|
175
181
|
"overlay-class": "nut-numberkeyboard-overlay"
|
|
176
182
|
}, {
|
|
@@ -230,11 +236,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
230
236
|
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.closeBoard())
|
|
231
237
|
}, [
|
|
232
238
|
createElementVNode("div", {
|
|
233
|
-
class: normalizeClass([
|
|
234
|
-
"key",
|
|
235
|
-
"finish",
|
|
236
|
-
{ activeFinsh: _ctx.clickKeyIndex == "finish" }
|
|
237
|
-
])
|
|
239
|
+
class: normalizeClass(["key", "finish", { activeFinsh: _ctx.clickKeyIndex == "finish" }])
|
|
238
240
|
}, " \u5B8C\u6210 ", 2)
|
|
239
241
|
])) : createCommentVNode("", true)
|
|
240
242
|
])) : createCommentVNode("", true)
|
|
@@ -242,7 +244,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
242
244
|
], 512)
|
|
243
245
|
]),
|
|
244
246
|
_: 1
|
|
245
|
-
}, 8, ["visible"]);
|
|
247
|
+
}, 8, ["visible", "overlay"]);
|
|
246
248
|
}
|
|
247
249
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
248
250
|
export { index as default };
|
|
@@ -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 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
19
19
|
* (c) 2021 @jdf2e.
|
|
20
20
|
* Released under the MIT License.
|
|
21
21
|
*/
|
|
@@ -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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { ref, reactive, computed, onMounted, watch, toRefs, openBlock, createElementBlock, normalizeStyle, createElementVNode, Fragment, renderList, toDisplayString, toRaw, resolveComponent, normalizeClass, createVNode, withCtx } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { u as useTouch } from "./
|
|
27
|
+
import { u as useTouch } from "./index2.js";
|
|
28
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
29
|
import Popup, { popupProps } from "./Popup.js";
|
|
30
30
|
import "./OverLay.js";
|
|
@@ -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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { ref, reactive, toRefs, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, normalizeStyle, renderList, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
25
|
+
import { ref, reactive, toRefs, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, withModifiers, normalizeClass, createElementVNode, renderSlot, Fragment, normalizeStyle, renderList, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
27
|
import Popup, { popupProps } from "./Popup.js";
|
|
28
28
|
import Button from "./Button.js";
|
|
@@ -129,22 +129,16 @@ const _sfc_main = create({
|
|
|
129
129
|
emit("update", val);
|
|
130
130
|
emit("update:visible", val);
|
|
131
131
|
};
|
|
132
|
-
const openPopover = (
|
|
133
|
-
event.stopPropagation();
|
|
134
|
-
event.preventDefault();
|
|
132
|
+
const openPopover = () => {
|
|
135
133
|
update(!props.visible);
|
|
136
134
|
emit("open");
|
|
137
135
|
};
|
|
138
|
-
const closePopover = (
|
|
139
|
-
event.stopPropagation();
|
|
140
|
-
event.preventDefault();
|
|
136
|
+
const closePopover = () => {
|
|
141
137
|
emit("close");
|
|
142
138
|
emit("update:visible", false);
|
|
143
139
|
};
|
|
144
|
-
const chooseItem = (
|
|
145
|
-
|
|
146
|
-
event.preventDefault();
|
|
147
|
-
emit("choose");
|
|
140
|
+
const chooseItem = (item, index2) => {
|
|
141
|
+
emit("choose", item, index2);
|
|
148
142
|
};
|
|
149
143
|
return {
|
|
150
144
|
classes,
|
|
@@ -167,7 +161,7 @@ const _hoisted_3 = { class: "title-name" };
|
|
|
167
161
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
168
162
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
169
163
|
return openBlock(), createElementBlock("view", {
|
|
170
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.openPopover && _ctx.openPopover(...args)),
|
|
164
|
+
onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.openPopover && _ctx.openPopover(...args), ["stop"])),
|
|
171
165
|
class: normalizeClass(_ctx.classes)
|
|
172
166
|
}, [
|
|
173
167
|
createElementVNode("div", _hoisted_1, [
|
|
@@ -176,7 +170,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
176
170
|
_ctx.showPopup ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
177
171
|
createElementVNode("view", {
|
|
178
172
|
class: "more-background",
|
|
179
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.closePopover && _ctx.closePopover(...args))
|
|
173
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.closePopover && _ctx.closePopover(...args), ["stop"]))
|
|
180
174
|
}),
|
|
181
175
|
createElementVNode("view", {
|
|
182
176
|
class: normalizeClass(_ctx.popoverContent),
|
|
@@ -187,11 +181,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
187
181
|
style: normalizeStyle(_ctx.getArrowStyle)
|
|
188
182
|
}, null, 6),
|
|
189
183
|
renderSlot(_ctx.$slots, "content"),
|
|
190
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item) => {
|
|
184
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
|
|
191
185
|
return openBlock(), createElementBlock("view", {
|
|
192
|
-
key:
|
|
186
|
+
key: index2,
|
|
193
187
|
class: normalizeClass({ "title-item": true, disabled: item.disabled }),
|
|
194
|
-
onClick: ($event) => _ctx.chooseItem(
|
|
188
|
+
onClick: withModifiers(($event) => _ctx.chooseItem(item, index2), ["stop"])
|
|
195
189
|
}, [
|
|
196
190
|
item.icon ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
197
191
|
createVNode(_component_nut_icon, {
|
|
@@ -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 Sat Nov 27 2021 11:30:43 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 };
|
|
@@ -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 Sat Nov 27 2021 11:30:43 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
|
-
import { u as useTouch } from "./
|
|
27
|
+
import { u as useTouch } from "./index2.js";
|
|
28
|
+
import { u as useRect } from "./index3.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: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -53,6 +53,14 @@ const _sfc_main = create({
|
|
|
53
53
|
spacing: {
|
|
54
54
|
type: [String, Number],
|
|
55
55
|
default: 14
|
|
56
|
+
},
|
|
57
|
+
classPrefix: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "nut-icon"
|
|
60
|
+
},
|
|
61
|
+
fontClassName: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "nutui-iconfont"
|
|
56
64
|
}
|
|
57
65
|
},
|
|
58
66
|
emits: ["update:modelValue", "change"],
|
|
@@ -105,22 +113,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
105
113
|
createVNode(_component_nut_icon, {
|
|
106
114
|
size: _ctx.iconSize,
|
|
107
115
|
class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
|
|
116
|
+
"font-class-name": _ctx.fontClassName,
|
|
117
|
+
"class-prefix": _ctx.classPrefix,
|
|
108
118
|
color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
|
|
109
119
|
name: n <= _ctx.modelValue ? _ctx.checkedIcon : _ctx.uncheckedIcon
|
|
110
|
-
}, null, 8, ["size", "class", "color", "name"]),
|
|
120
|
+
}, null, 8, ["size", "class", "font-class-name", "class-prefix", "color", "name"]),
|
|
111
121
|
_ctx.allowHalf && _ctx.modelValue + 1 > n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
112
122
|
key: 0,
|
|
113
123
|
class: "nut-rate-item__icon nut-rate-item__icon--half",
|
|
114
|
-
|
|
124
|
+
"font-class-name": _ctx.fontClassName,
|
|
125
|
+
"class-prefix": _ctx.classPrefix,
|
|
126
|
+
color: n <= _ctx.modelValue + 1 ? _ctx.activeColor : _ctx.voidColor,
|
|
115
127
|
size: _ctx.iconSize,
|
|
116
128
|
name: _ctx.checkedIcon
|
|
117
|
-
}, null, 8, ["color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
129
|
+
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
118
130
|
key: 1,
|
|
119
131
|
class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half",
|
|
132
|
+
"font-class-name": _ctx.fontClassName,
|
|
133
|
+
"class-prefix": _ctx.classPrefix,
|
|
120
134
|
color: _ctx.voidColor,
|
|
121
135
|
size: _ctx.iconSize,
|
|
122
136
|
name: _ctx.uncheckedIcon
|
|
123
|
-
}, null, 8, ["color", "size", "name"])) : createCommentVNode("", true)
|
|
137
|
+
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : createCommentVNode("", true)
|
|
124
138
|
], 12, _hoisted_1);
|
|
125
139
|
}), 128))
|
|
126
140
|
], 2);
|
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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|