@nutui/nutui 3.3.8-beta.1 → 3.3.9-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 +11 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.umd.js +2 -2
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/AvatarGroup.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/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +1 -1
- 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 +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- 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/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.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 +48 -7
- package/dist/packages/_es/Dialog.js +13 -6
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +1 -1
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +3 -2
- package/dist/packages/_es/Input.js +1 -1
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +1 -1
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- 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/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -3
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- 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/Table.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 +1 -1
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +1 -1
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/WaterMark.js +1 -1
- package/dist/packages/_es/common.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 +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +1 -1
- package/dist/packages/_es/interceptor.js +1 -1
- package/dist/packages/_es/mountComponent.js +1 -1
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/props.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- 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/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/avatar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.d.ts +1 -0
- package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
- 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 +4 -4
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +2 -2
- package/dist/types/__VUE/input/index.vue.d.ts +4 -4
- package/dist/types/__VUE/navbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/row/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/signature/index.vue.d.ts +6 -1
- package/dist/types/__VUE/skeleton/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/uploader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/watermark/index.vue.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.3.
|
|
2
|
+
* @nutui/nutui v3.3.9-beta.1 Wed Aug 23 2023 10:54:38 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -98,6 +98,20 @@ const _sfc_main = create({
|
|
|
98
98
|
function getMonthEndDay(year, month) {
|
|
99
99
|
return 32 - new Date(year, month - 1, 32).getDate();
|
|
100
100
|
}
|
|
101
|
+
function getQuarter(v) {
|
|
102
|
+
return Math.ceil((v.getMonth() + 1) / 3);
|
|
103
|
+
}
|
|
104
|
+
function getQuarterValue(v, b) {
|
|
105
|
+
let currentQuarter = getQuarter(v);
|
|
106
|
+
let quarterDiff = Math.ceil(((v.getFullYear() - b.getFullYear()) * 12 + (v.getMonth() - b.getMonth())) / 3);
|
|
107
|
+
let a = currentQuarter - quarterDiff;
|
|
108
|
+
if (a > 4) {
|
|
109
|
+
a = 4;
|
|
110
|
+
} else if (a < 1) {
|
|
111
|
+
a = 1;
|
|
112
|
+
}
|
|
113
|
+
return a;
|
|
114
|
+
}
|
|
101
115
|
const getBoundary = (type, value) => {
|
|
102
116
|
const boundary = props[`${type}Date`];
|
|
103
117
|
const year = boundary.getFullYear();
|
|
@@ -105,11 +119,13 @@ const _sfc_main = create({
|
|
|
105
119
|
let day = 1;
|
|
106
120
|
let hour = 0;
|
|
107
121
|
let minute = 0;
|
|
122
|
+
let quarter = getQuarterValue(value, boundary);
|
|
108
123
|
if (type === "max") {
|
|
109
124
|
month = 12;
|
|
110
125
|
day = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
|
|
111
126
|
hour = 23;
|
|
112
127
|
minute = 59;
|
|
128
|
+
quarter = getQuarterValue(value, boundary);
|
|
113
129
|
}
|
|
114
130
|
const seconds = minute;
|
|
115
131
|
if (value.getFullYear() === year) {
|
|
@@ -130,7 +146,8 @@ const _sfc_main = create({
|
|
|
130
146
|
[`${type}Day`]: day,
|
|
131
147
|
[`${type}Hour`]: hour,
|
|
132
148
|
[`${type}Minute`]: minute,
|
|
133
|
-
[`${type}Seconds`]: seconds
|
|
149
|
+
[`${type}Seconds`]: seconds,
|
|
150
|
+
[`${type}Quarter`]: quarter
|
|
134
151
|
};
|
|
135
152
|
}
|
|
136
153
|
return {
|
|
@@ -139,12 +156,19 @@ const _sfc_main = create({
|
|
|
139
156
|
[`${type}Day`]: day,
|
|
140
157
|
[`${type}Hour`]: hour,
|
|
141
158
|
[`${type}Minute`]: minute,
|
|
142
|
-
[`${type}Seconds`]: seconds
|
|
159
|
+
[`${type}Seconds`]: seconds,
|
|
160
|
+
[`${type}Quarter`]: quarter
|
|
143
161
|
};
|
|
144
162
|
};
|
|
145
163
|
const ranges = computed(() => {
|
|
146
|
-
const { maxYear, maxDay, maxMonth, maxHour, maxMinute, maxSeconds } = getBoundary(
|
|
147
|
-
|
|
164
|
+
const { maxYear, maxDay, maxMonth, maxHour, maxMinute, maxSeconds, maxQuarter } = getBoundary(
|
|
165
|
+
"max",
|
|
166
|
+
state.currentDate
|
|
167
|
+
);
|
|
168
|
+
const { minYear, minDay, minMonth, minHour, minMinute, minSeconds, minQuarter } = getBoundary(
|
|
169
|
+
"min",
|
|
170
|
+
state.currentDate
|
|
171
|
+
);
|
|
148
172
|
let result = [
|
|
149
173
|
{
|
|
150
174
|
type: "year",
|
|
@@ -169,6 +193,10 @@ const _sfc_main = create({
|
|
|
169
193
|
{
|
|
170
194
|
type: "seconds",
|
|
171
195
|
range: [minSeconds, maxSeconds]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: "quarter",
|
|
199
|
+
range: [minQuarter, maxQuarter]
|
|
172
200
|
}
|
|
173
201
|
];
|
|
174
202
|
switch (props.type) {
|
|
@@ -190,6 +218,12 @@ const _sfc_main = create({
|
|
|
190
218
|
case "datehour":
|
|
191
219
|
result = result.slice(0, 4);
|
|
192
220
|
break;
|
|
221
|
+
case "year-quarter":
|
|
222
|
+
result = [result[0], result[result.length - 1]];
|
|
223
|
+
break;
|
|
224
|
+
case "year":
|
|
225
|
+
result = result.slice(0, 1);
|
|
226
|
+
break;
|
|
193
227
|
}
|
|
194
228
|
return result;
|
|
195
229
|
});
|
|
@@ -204,7 +238,7 @@ const _sfc_main = create({
|
|
|
204
238
|
selectedValue,
|
|
205
239
|
selectedOptions
|
|
206
240
|
}) => {
|
|
207
|
-
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(props.type)) {
|
|
241
|
+
if (["date", "datetime", "datehour", "month-day", "year-month", "year-quarter"].includes(props.type)) {
|
|
208
242
|
let formatDate = [];
|
|
209
243
|
selectedValue.forEach((item) => {
|
|
210
244
|
formatDate.push(item);
|
|
@@ -215,11 +249,16 @@ const _sfc_main = create({
|
|
|
215
249
|
if (props.type == "year-month" && formatDate.length < 3) {
|
|
216
250
|
formatDate.push(new Date(state.currentDate || props.minDate || props.maxDate).getDate());
|
|
217
251
|
}
|
|
252
|
+
if (props.type == "year-quarter") {
|
|
253
|
+
let month2 = (Number(formatDate[1]) - 1) * 3 + 1;
|
|
254
|
+
formatDate[1] = month2 < 10 ? "0" + month2 : month2 + "";
|
|
255
|
+
formatDate.push(new Date(state.currentDate || props.minDate || props.maxDate).getDate());
|
|
256
|
+
}
|
|
218
257
|
const year = Number(formatDate[0]);
|
|
219
258
|
const month = Number(formatDate[1]) - 1;
|
|
220
259
|
const day = Math.min(Number(formatDate[2]), getMonthEndDay(Number(formatDate[0]), Number(formatDate[1])));
|
|
221
260
|
let date = null;
|
|
222
|
-
if (props.type === "date" || props.type === "month-day" || props.type === "year-month") {
|
|
261
|
+
if (props.type === "date" || props.type === "month-day" || props.type === "year-month" || props.type === "year-quarter") {
|
|
223
262
|
date = new Date(year, month, day);
|
|
224
263
|
} else if (props.type === "datetime") {
|
|
225
264
|
date = new Date(year, month, day, Number(formatDate[3]), Number(formatDate[4]));
|
|
@@ -272,6 +311,8 @@ const _sfc_main = create({
|
|
|
272
311
|
return state.currentDate.getMinutes();
|
|
273
312
|
} else if (type === "seconds") {
|
|
274
313
|
return state.currentDate.getSeconds();
|
|
314
|
+
} else if (type === "quarter") {
|
|
315
|
+
return getQuarter(state.currentDate);
|
|
275
316
|
}
|
|
276
317
|
return 0;
|
|
277
318
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.3.
|
|
2
|
+
* @nutui/nutui v3.3.9-beta.1 Wed Aug 23 2023 10:54:38 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -23,7 +23,7 @@ const _sfc_main = create({
|
|
|
23
23
|
...popupProps,
|
|
24
24
|
closeOnClickOverlay: {
|
|
25
25
|
type: Boolean,
|
|
26
|
-
default:
|
|
26
|
+
default: true
|
|
27
27
|
},
|
|
28
28
|
title: {
|
|
29
29
|
type: String,
|
|
@@ -126,12 +126,18 @@ const _sfc_main = create({
|
|
|
126
126
|
emit("ok");
|
|
127
127
|
closed("ok");
|
|
128
128
|
};
|
|
129
|
+
const onClickOverlay = () => {
|
|
130
|
+
if (props.closeOnClickOverlay) {
|
|
131
|
+
closed("");
|
|
132
|
+
}
|
|
133
|
+
};
|
|
129
134
|
return {
|
|
130
135
|
closed,
|
|
131
136
|
classes,
|
|
132
137
|
onCancel,
|
|
133
138
|
onOk,
|
|
134
139
|
showPopup,
|
|
140
|
+
onClickOverlay,
|
|
135
141
|
translate
|
|
136
142
|
};
|
|
137
143
|
}
|
|
@@ -148,14 +154,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
148
154
|
teleport: _ctx.teleport,
|
|
149
155
|
visible: _ctx.showPopup,
|
|
150
156
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event),
|
|
151
|
-
"close-on-click-overlay":
|
|
157
|
+
"close-on-click-overlay": false,
|
|
152
158
|
"lock-scroll": _ctx.lockScroll,
|
|
153
159
|
"pop-class": _ctx.popClass,
|
|
154
160
|
style: normalizeStyle(_ctx.popStyle),
|
|
155
161
|
"overlay-class": _ctx.overlayClass,
|
|
156
162
|
"overlay-style": _ctx.overlayStyle,
|
|
157
163
|
round: "",
|
|
158
|
-
onClickOverlay: _ctx.
|
|
164
|
+
onClickOverlay: _ctx.onClickOverlay,
|
|
159
165
|
onClickCloseIcon: _ctx.closed
|
|
160
166
|
}, {
|
|
161
167
|
default: withCtx(() => [
|
|
@@ -211,7 +217,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
211
217
|
], 2)
|
|
212
218
|
]),
|
|
213
219
|
_: 3
|
|
214
|
-
}, 8, ["teleport", "visible", "
|
|
220
|
+
}, 8, ["teleport", "visible", "lock-scroll", "pop-class", "style", "overlay-class", "overlay-style", "onClickOverlay", "onClickCloseIcon"]);
|
|
215
221
|
}
|
|
216
222
|
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
217
223
|
class DialogOptions {
|
|
@@ -245,7 +251,8 @@ class DialogOptions {
|
|
|
245
251
|
this.noCancelBtn = false;
|
|
246
252
|
this.okBtnDisabled = false;
|
|
247
253
|
this.closeOnPopstate = false;
|
|
248
|
-
this.
|
|
254
|
+
this.closeOnClickOverlay = true;
|
|
255
|
+
this.lockScroll = true;
|
|
249
256
|
}
|
|
250
257
|
}
|
|
251
258
|
class DialogFunction {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.3.
|
|
2
|
+
* @nutui/nutui v3.3.9-beta.1 Wed Aug 23 2023 10:54:38 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -132,11 +132,12 @@ const _sfc_main = create({
|
|
|
132
132
|
state.isTouching = false;
|
|
133
133
|
};
|
|
134
134
|
const touchStart = (event) => {
|
|
135
|
+
var _a, _b;
|
|
135
136
|
touch.start(event);
|
|
136
137
|
if (state.beforeScrollTop == 0 && !state.isTouching && props.isOpenRefresh) {
|
|
137
138
|
state.y = event.touches[0].pageY;
|
|
138
139
|
state.isTouching = true;
|
|
139
|
-
const childHeight = state.refreshTop.firstElementChild.offsetHeight;
|
|
140
|
+
const childHeight = (_b = (_a = state.refreshTop) == null ? void 0 : _a.firstElementChild) == null ? void 0 : _b.offsetHeight;
|
|
140
141
|
state.refreshMaxH = Math.floor(childHeight * 1 + 10);
|
|
141
142
|
}
|
|
142
143
|
};
|