@nutui/nutui 3.1.22-beta.5 → 3.1.23-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 +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +20412 -4214
- package/dist/nutui.umd.js +20518 -4216
- package/dist/packages/_es/ActionSheet.js +149 -17
- package/dist/packages/_es/Address.js +535 -110
- package/dist/packages/_es/AddressList.js +615 -113
- package/dist/packages/_es/Animate.js +59 -17
- package/dist/packages/_es/Audio.js +257 -53
- package/dist/packages/_es/AudioOperate.js +100 -13
- package/dist/packages/_es/Avatar.js +162 -38
- package/dist/packages/_es/AvatarGroup.js +73 -14
- package/dist/packages/_es/BackTop.js +156 -43
- package/dist/packages/_es/Badge.js +86 -14
- package/dist/packages/_es/Barrage.js +120 -41
- package/dist/packages/_es/Button.js +128 -23
- package/dist/packages/_es/Calendar.js +246 -30
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +107 -10
- package/dist/packages/_es/Cascader.js +496 -147
- package/dist/packages/_es/Category.js +58 -15
- package/dist/packages/_es/CategoryPane.js +111 -11
- package/dist/packages/_es/Cell.js +108 -21
- package/dist/packages/_es/CellGroup.js +44 -9
- package/dist/packages/_es/Checkbox.js +134 -29
- package/dist/packages/_es/CheckboxGroup.js +79 -29
- package/dist/packages/_es/CircleProgress.js +150 -28
- package/dist/packages/_es/Col.js +56 -14
- package/dist/packages/_es/Collapse.js +109 -32
- package/dist/packages/_es/CollapseItem.js +253 -59
- package/dist/packages/_es/Comment.js +434 -64
- package/dist/packages/_es/ConfigProvider.js +20 -8
- package/dist/packages/_es/CountDown.js +238 -56
- package/dist/packages/_es/CountUp.js +539 -140
- package/dist/packages/_es/DatePicker.js +315 -98
- package/dist/packages/_es/Dialog.js +289 -60
- package/dist/packages/_es/Divider.js +65 -13
- package/dist/packages/_es/Drag.js +197 -56
- package/dist/packages/_es/Ecard.js +159 -24
- package/dist/packages/_es/Elevator.js +255 -58
- package/dist/packages/_es/Ellipsis.js +200 -58
- package/dist/packages/_es/Empty.js +71 -12
- package/dist/packages/_es/FixedNav.js +122 -15
- package/dist/packages/_es/Form.js +151 -64
- package/dist/packages/_es/FormItem.js +114 -15
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +144 -33
- package/dist/packages/_es/Icon.js +40 -15
- package/dist/packages/_es/Image.js +137 -26
- package/dist/packages/_es/ImagePreview.js +547 -76
- package/dist/packages/_es/Indicator.js +62 -15
- package/dist/packages/_es/InfiniteLoading.js +249 -57
- package/dist/packages/_es/Input.js +433 -51
- package/dist/packages/_es/InputNumber.js +160 -41
- package/dist/packages/_es/Layout.js +5 -4
- package/dist/packages/_es/List.js +106 -18
- package/dist/packages/_es/Menu.js +168 -44
- package/dist/packages/_es/MenuItem.js +173 -37
- package/dist/packages/_es/Navbar.js +192 -30
- package/dist/packages/_es/NoticeBar.js +380 -74
- package/dist/packages/_es/Notify.js +227 -72
- package/dist/packages/_es/NumberKeyboard.js +272 -41
- package/dist/packages/_es/OldPicker.js +457 -130
- package/dist/packages/_es/OverLay.js +98 -24
- package/dist/packages/_es/Pagination.js +157 -39
- package/dist/packages/_es/Picker.js +454 -129
- package/dist/packages/_es/Popover.js +957 -318
- package/dist/packages/_es/Popup.js +299 -55
- package/dist/packages/_es/Price.js +118 -16
- package/dist/packages/_es/Progress.js +146 -14
- package/dist/packages/_es/PullRefresh.js +339 -84
- package/dist/packages/_es/Radio.js +90 -22
- package/dist/packages/_es/RadioGroup.js +37 -8
- package/dist/packages/_es/Range.js +408 -83
- package/dist/packages/_es/Rate.js +192 -36
- package/dist/packages/_es/Row.js +64 -22
- package/dist/packages/_es/SearchBar.js +238 -37
- package/dist/packages/_es/ShortPassword.js +225 -35
- package/dist/packages/_es/SideNavBar.js +81 -24
- package/dist/packages/_es/SideNavBarItem.js +46 -11
- package/dist/packages/_es/Signature.js +160 -41
- package/dist/packages/_es/Skeleton.js +136 -20
- package/dist/packages/_es/Sku.js +491 -84
- package/dist/packages/_es/Step.js +115 -20
- package/dist/packages/_es/Steps.js +53 -18
- package/dist/packages/_es/Sticky.js +138 -53
- package/dist/packages/_es/SubSideNavBar.js +82 -17
- package/dist/packages/_es/Swipe.js +178 -41
- package/dist/packages/_es/Swiper.js +433 -121
- package/dist/packages/_es/SwiperItem.js +53 -22
- package/dist/packages/_es/Switch.js +116 -21
- package/dist/packages/_es/TabPane.js +39 -12
- package/dist/packages/_es/Tabbar.js +72 -17
- package/dist/packages/_es/TabbarItem.js +151 -29
- package/dist/packages/_es/Table.js +178 -18
- package/dist/packages/_es/Tabs.js +202 -43
- package/dist/packages/_es/Tag.js +97 -20
- package/dist/packages/_es/TextArea.js +160 -42
- package/dist/packages/_es/TimeDetail.js +79 -18
- package/dist/packages/_es/TimePannel.js +48 -14
- package/dist/packages/_es/TimeSelect.js +112 -15
- package/dist/packages/_es/Toast.js +310 -71
- package/dist/packages/_es/Uploader.js +455 -104
- package/dist/packages/_es/Video.js +332 -74
- package/dist/packages/_es/common.js +128 -38
- package/dist/packages/_es/component.js +76 -35
- package/dist/packages/_es/index.js +6 -5
- package/dist/packages/_es/index2.js +30 -9
- package/dist/packages/_es/index3.js +8 -6
- package/dist/packages/_es/index4.js +64 -13
- package/dist/packages/_es/index5.js +780 -164
- package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
- package/dist/packages/_es/pxCheck.js +5 -3
- package/dist/packages/_es/raf.js +15 -8
- package/dist/packages/imagepreview/index.scss +6 -1
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.js +105 -5
- package/dist/packages/locale/lang/id-ID.js +105 -5
- package/dist/packages/locale/lang/index.js +38 -16
- package/dist/packages/locale/lang/zh-CN.js +105 -5
- package/dist/packages/locale/lang/zh-TW.js +105 -5
- package/dist/packages/picker/index.scss +13 -0
- package/dist/smartips/attributes.json +8 -0
- package/dist/smartips/tags.json +3 -1
- package/dist/smartips/web-types.json +19 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +4 -1
- package/dist/styles/variables-jdt.scss +4 -1
- package/dist/styles/variables.scss +1 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- 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 +2 -2
- package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +23 -25
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +4 -4
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- 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 +3 -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/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- 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/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -2
|
@@ -1,48 +1,166 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref
|
|
7
|
-
import { c } from "./component.js";
|
|
8
|
-
import { _ as
|
|
6
|
+
import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const { componentName, create, translate } = createComponent("textarea");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: [String, Number],
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
textAlign: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
limitShow: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
maxLength: {
|
|
26
|
+
type: [String, Number],
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
rows: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: "2"
|
|
32
|
+
},
|
|
33
|
+
placeholder: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
readonly: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
45
|
+
autosize: {
|
|
46
|
+
type: [Boolean, Object],
|
|
47
|
+
default: false
|
|
48
|
+
},
|
|
49
|
+
autofocus: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false
|
|
22
52
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
},
|
|
54
|
+
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
55
|
+
setup(props, { emit }) {
|
|
56
|
+
const textareaRef = ref();
|
|
57
|
+
const classes = computed(() => {
|
|
58
|
+
const prefixCls = componentName;
|
|
59
|
+
return {
|
|
60
|
+
[prefixCls]: true,
|
|
61
|
+
[`${prefixCls}--disabled`]: props.disabled
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
onMounted(() => {
|
|
65
|
+
if (props.modelValue) {
|
|
66
|
+
emitChange(String(props.modelValue));
|
|
67
|
+
}
|
|
68
|
+
if (props.autosize) {
|
|
69
|
+
nextTick(getContentHeight);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const styles = computed(() => {
|
|
73
|
+
return {
|
|
74
|
+
textAlign: props.textAlign
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
const getContentHeight = () => {
|
|
78
|
+
let textarea = textareaRef.value;
|
|
79
|
+
textarea.style.height = "auto";
|
|
80
|
+
let height = textarea.scrollHeight;
|
|
81
|
+
if (typeof props.autosize === "object") {
|
|
82
|
+
const { maxHeight, minHeight } = props.autosize;
|
|
83
|
+
if (maxHeight !== void 0) {
|
|
84
|
+
height = Math.min(height, maxHeight);
|
|
85
|
+
}
|
|
86
|
+
if (minHeight !== void 0) {
|
|
87
|
+
height = Math.max(height, minHeight);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (height) {
|
|
91
|
+
textarea.style.height = height + "px";
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
watch(() => props.modelValue, () => {
|
|
95
|
+
if (props.autosize) {
|
|
96
|
+
nextTick(getContentHeight);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
const emitChange = (value, event) => {
|
|
100
|
+
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
101
|
+
value = value.substring(0, Number(props.maxLength));
|
|
102
|
+
}
|
|
103
|
+
emit("update:modelValue", value, event);
|
|
104
|
+
emit("change", value, event);
|
|
105
|
+
};
|
|
106
|
+
const change = (event) => {
|
|
107
|
+
const input = event.target;
|
|
108
|
+
emitChange(input.value, event);
|
|
109
|
+
};
|
|
110
|
+
const focus = (event) => {
|
|
111
|
+
if (props.disabled)
|
|
112
|
+
return;
|
|
113
|
+
if (props.readonly)
|
|
114
|
+
return;
|
|
115
|
+
emit("focus", event);
|
|
116
|
+
};
|
|
117
|
+
const blur = (event) => {
|
|
118
|
+
if (props.disabled)
|
|
119
|
+
return;
|
|
120
|
+
if (props.readonly)
|
|
121
|
+
return;
|
|
122
|
+
const input = event.target;
|
|
123
|
+
let value = input.value;
|
|
124
|
+
emitChange(value, event);
|
|
125
|
+
emit("blur", { value, event });
|
|
126
|
+
};
|
|
127
|
+
return {
|
|
128
|
+
textareaRef,
|
|
129
|
+
classes,
|
|
130
|
+
styles,
|
|
131
|
+
change,
|
|
132
|
+
focus,
|
|
133
|
+
blur,
|
|
134
|
+
translate
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
|
|
139
|
+
const _hoisted_2 = {
|
|
140
|
+
key: 0,
|
|
141
|
+
class: "nut-textarea__limit"
|
|
142
|
+
};
|
|
143
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
144
|
+
return openBlock(), createElementBlock("view", {
|
|
145
|
+
class: normalizeClass(_ctx.classes)
|
|
146
|
+
}, [
|
|
147
|
+
createElementVNode("textarea", {
|
|
148
|
+
ref: "textareaRef",
|
|
149
|
+
class: "nut-textarea__textarea",
|
|
150
|
+
style: normalizeStyle(_ctx.styles),
|
|
151
|
+
rows: _ctx.rows,
|
|
152
|
+
disabled: _ctx.disabled,
|
|
153
|
+
readonly: _ctx.readonly,
|
|
154
|
+
value: _ctx.modelValue,
|
|
155
|
+
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
|
|
156
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
157
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
|
|
158
|
+
maxlength: _ctx.maxLength,
|
|
159
|
+
placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
|
|
160
|
+
autofocus: _ctx.autofocus
|
|
161
|
+
}, null, 44, _hoisted_1),
|
|
162
|
+
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
163
|
+
], 2);
|
|
164
|
+
}
|
|
165
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
166
|
+
export { index as default };
|
|
@@ -1,23 +1,84 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { inject
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ } from "./plugin-vue_export-helper.js";
|
|
6
|
+
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
const { componentName, create } = createComponent("timedetail");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
name: "timedetail",
|
|
13
|
+
props: {
|
|
14
|
+
times: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
detailKey: {
|
|
21
|
+
type: [Number, String],
|
|
22
|
+
default: 0
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["select"],
|
|
26
|
+
setup: (props, context) => {
|
|
27
|
+
const currentKey = inject("currentKey");
|
|
28
|
+
const currentTime = inject("currentTime");
|
|
29
|
+
const state = reactive({
|
|
30
|
+
currentKey,
|
|
31
|
+
currentTime
|
|
32
|
+
});
|
|
33
|
+
const classes = computed(() => {
|
|
34
|
+
const prefixCls = componentName;
|
|
35
|
+
return {
|
|
36
|
+
[prefixCls]: true
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
const getClass = (item) => {
|
|
40
|
+
let find = state.currentTime.find((item2) => item2.key == state.currentKey);
|
|
41
|
+
if (find) {
|
|
42
|
+
return {
|
|
43
|
+
"nut-timedetail__detail__list__item": true,
|
|
44
|
+
"nut-timedetail__detail__list__item--curr": find.list.filter((value) => value === item).length > 0
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const renderData = computed(() => {
|
|
49
|
+
return props.times.find((time) => time.key == state.currentKey)["list"];
|
|
50
|
+
});
|
|
51
|
+
const handleTime = (time) => {
|
|
52
|
+
context.emit("select", time);
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
classes,
|
|
56
|
+
...toRefs(state),
|
|
57
|
+
getClass,
|
|
58
|
+
renderData,
|
|
59
|
+
handleTime
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const _hoisted_1 = { class: "nut-timedetail__detail nut-timedetail__detail--moring" };
|
|
64
|
+
const _hoisted_2 = { class: "nut-timedetail__detail__list" };
|
|
65
|
+
const _hoisted_3 = ["onClick"];
|
|
66
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
67
|
+
return openBlock(), createElementBlock("view", {
|
|
68
|
+
class: normalizeClass(_ctx.classes)
|
|
69
|
+
}, [
|
|
70
|
+
createElementVNode("view", _hoisted_1, [
|
|
71
|
+
createElementVNode("view", _hoisted_2, [
|
|
72
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.renderData, (item) => {
|
|
73
|
+
return openBlock(), createElementBlock("view", {
|
|
74
|
+
class: normalizeClass(_ctx.getClass(item)),
|
|
75
|
+
key: item,
|
|
76
|
+
onClick: ($event) => _ctx.handleTime(item)
|
|
77
|
+
}, toDisplayString(item), 11, _hoisted_3);
|
|
78
|
+
}), 128))
|
|
79
|
+
])
|
|
80
|
+
])
|
|
81
|
+
], 2);
|
|
82
|
+
}
|
|
83
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
84
|
+
export { index as default };
|
|
@@ -1,19 +1,53 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { inject
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
const { componentName, create } = createComponent("timepannel");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
name: "timepannel",
|
|
13
|
+
props: {
|
|
14
|
+
name: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
pannelKey: {
|
|
19
|
+
type: [Number, String],
|
|
20
|
+
default: 0
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: ["change"],
|
|
24
|
+
setup: (props, context) => {
|
|
25
|
+
const currentKey = inject("currentKey");
|
|
26
|
+
const state = reactive({
|
|
27
|
+
currentKey
|
|
28
|
+
});
|
|
29
|
+
const classes = computed(() => {
|
|
30
|
+
const prefixCls = componentName;
|
|
31
|
+
return {
|
|
32
|
+
[prefixCls]: true,
|
|
33
|
+
"nut-timepannel--curr": state.currentKey == props.pannelKey
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
const handlePannel = (pannelKey) => {
|
|
37
|
+
context.emit("change", pannelKey);
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
...toRefs(state),
|
|
41
|
+
classes,
|
|
42
|
+
handlePannel
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
47
|
+
return openBlock(), createElementBlock("view", {
|
|
48
|
+
class: normalizeClass(_ctx.classes),
|
|
49
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
|
|
50
|
+
}, toDisplayString(_ctx.name), 3);
|
|
51
|
+
}
|
|
52
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
53
|
+
export { index as default };
|
|
@@ -1,20 +1,117 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, renderSlot } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
const { componentName, create, translate } = createComponent("timeselect");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
visible: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
defalut: false
|
|
16
|
+
},
|
|
17
|
+
height: {
|
|
18
|
+
type: [String],
|
|
19
|
+
default: "20%"
|
|
20
|
+
},
|
|
21
|
+
title: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
currentKey: {
|
|
26
|
+
type: [Number, String],
|
|
27
|
+
default: 0
|
|
28
|
+
},
|
|
29
|
+
currentTime: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: () => {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
lockScroll: {
|
|
36
|
+
type: [Boolean],
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
isWrapTeleport: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
emits: ["update:visible", "select"],
|
|
45
|
+
setup: (props, context) => {
|
|
46
|
+
const classes = computed(() => {
|
|
47
|
+
const prefixCls = componentName;
|
|
48
|
+
return {
|
|
49
|
+
[prefixCls]: true
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
const popStyle = computed(() => {
|
|
53
|
+
return {
|
|
54
|
+
width: "100%",
|
|
55
|
+
height: props.height
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
const currentKey = computed(() => props.currentKey);
|
|
59
|
+
const currentTime = computed(() => props.currentTime);
|
|
60
|
+
const close = () => {
|
|
61
|
+
context.emit("update:visible", false);
|
|
62
|
+
context.emit("select", currentTime.value);
|
|
63
|
+
};
|
|
64
|
+
provide("currentKey", currentKey);
|
|
65
|
+
provide("currentTime", currentTime);
|
|
66
|
+
return {
|
|
67
|
+
classes,
|
|
68
|
+
popStyle,
|
|
69
|
+
props,
|
|
70
|
+
close,
|
|
71
|
+
translate
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
const _hoisted_1 = { class: "nut-timeselect__title" };
|
|
76
|
+
const _hoisted_2 = { class: "nut-timeselect__title__fixed" };
|
|
77
|
+
const _hoisted_3 = { key: 0 };
|
|
78
|
+
const _hoisted_4 = { class: "nut-timeselect__content" };
|
|
79
|
+
const _hoisted_5 = { class: "nut-timeselect__content__pannel" };
|
|
80
|
+
const _hoisted_6 = { class: "nut-timeselect__content__detail" };
|
|
81
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
82
|
+
const _component_nut_popup = resolveComponent("nut-popup");
|
|
83
|
+
return openBlock(), createBlock(_component_nut_popup, {
|
|
84
|
+
position: "bottom",
|
|
85
|
+
closeable: "",
|
|
86
|
+
round: "",
|
|
87
|
+
isWrapTeleport: _ctx.isWrapTeleport,
|
|
88
|
+
visible: _ctx.visible,
|
|
89
|
+
style: normalizeStyle(_ctx.popStyle),
|
|
90
|
+
"lock-scroll": _ctx.lockScroll,
|
|
91
|
+
onClickOverlay: _ctx.close,
|
|
92
|
+
onClickCloseIcon: _ctx.close
|
|
93
|
+
}, {
|
|
94
|
+
default: withCtx(() => [
|
|
95
|
+
createElementVNode("view", {
|
|
96
|
+
class: normalizeClass(_ctx.classes)
|
|
97
|
+
}, [
|
|
98
|
+
createElementVNode("view", _hoisted_1, [
|
|
99
|
+
createElementVNode("view", _hoisted_2, [
|
|
100
|
+
!_ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.title || _ctx.translate("pickupTime")), 1)) : renderSlot(_ctx.$slots, "title", { key: 1 })
|
|
101
|
+
])
|
|
102
|
+
]),
|
|
103
|
+
createElementVNode("view", _hoisted_4, [
|
|
104
|
+
createElementVNode("view", _hoisted_5, [
|
|
105
|
+
renderSlot(_ctx.$slots, "pannel")
|
|
106
|
+
]),
|
|
107
|
+
createElementVNode("view", _hoisted_6, [
|
|
108
|
+
renderSlot(_ctx.$slots, "detail")
|
|
109
|
+
])
|
|
110
|
+
])
|
|
111
|
+
], 2)
|
|
112
|
+
]),
|
|
113
|
+
_: 3
|
|
114
|
+
}, 8, ["isWrapTeleport", "visible", "style", "lock-scroll", "onClickOverlay", "onClickCloseIcon"]);
|
|
115
|
+
}
|
|
116
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
117
|
+
export { index as default };
|