@nutui/nutui 4.1.5 → 4.1.6
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 +17 -0
- package/README.md +4 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +4030 -3994
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/Calendar.js +15 -2
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Cell.js +6 -2
- package/dist/packages/_es/ConfigProvider.js +2 -3
- package/dist/packages/_es/Searchbar.js +7 -3
- package/dist/packages/_es/Uploader.js +5 -1
- package/dist/packages/_es/Video.js +25 -1
- package/dist/packages/_es/{index-7fdbc8f1.js → index-aef16dc6.js} +6 -4
- package/dist/packages/searchbar/index.scss +21 -2
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jddkh.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -0
- package/dist/types/__VUE/searchbar/index.vue.d.ts +9 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, ref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createSlots, renderSlot } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
|
-
import { C as CalendarItem, U as Utils } from "./index-
|
|
3
|
+
import { C as CalendarItem, U as Utils } from "./index-aef16dc6.js";
|
|
4
4
|
import { P as Popup } from "./index-3032df15.js";
|
|
5
5
|
import { u as useExpose } from "./index-79c5dc33.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -98,6 +98,9 @@ const _sfc_main = create({
|
|
|
98
98
|
const bottomInfo = computed(() => {
|
|
99
99
|
return slots["bottom-info"];
|
|
100
100
|
});
|
|
101
|
+
const footerInfo = computed(() => {
|
|
102
|
+
return slots["footer-info"];
|
|
103
|
+
});
|
|
101
104
|
const calendarRef = ref(null);
|
|
102
105
|
const scrollToDate = (date) => {
|
|
103
106
|
var _a;
|
|
@@ -138,7 +141,8 @@ const _sfc_main = create({
|
|
|
138
141
|
showTopBtn,
|
|
139
142
|
topInfo,
|
|
140
143
|
dayInfo,
|
|
141
|
-
bottomInfo
|
|
144
|
+
bottomInfo,
|
|
145
|
+
footerInfo
|
|
142
146
|
};
|
|
143
147
|
}
|
|
144
148
|
});
|
|
@@ -213,6 +217,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
213
217
|
})
|
|
214
218
|
]),
|
|
215
219
|
key: "3"
|
|
220
|
+
} : void 0,
|
|
221
|
+
_ctx.footerInfo ? {
|
|
222
|
+
name: "footer-info",
|
|
223
|
+
fn: withCtx((date) => [
|
|
224
|
+
renderSlot(_ctx.$slots, "footer-info", {
|
|
225
|
+
date: date.date
|
|
226
|
+
})
|
|
227
|
+
]),
|
|
228
|
+
key: "4"
|
|
216
229
|
} : void 0
|
|
217
230
|
]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "default-value", "start-date", "end-date", "confirm-text", "start-text", "end-text", "show-today", "show-title", "show-sub-title", "to-date-animation", "first-day-of-week", "onUpdate", "onClose", "onChoose", "onSelect"])
|
|
218
231
|
]),
|
|
@@ -85,11 +85,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
85
85
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
86
86
|
])
|
|
87
87
|
])) : createCommentVNode("", true),
|
|
88
|
-
_ctx.desc ? (openBlock(), createElementBlock("view", {
|
|
88
|
+
_ctx.desc || _ctx.$slots.desc ? (openBlock(), createElementBlock("view", {
|
|
89
89
|
key: 2,
|
|
90
90
|
class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
|
|
91
91
|
style: normalizeStyle({ "text-align": _ctx.descTextAlign })
|
|
92
|
-
},
|
|
92
|
+
}, [
|
|
93
|
+
renderSlot(_ctx.$slots, "desc", {}, () => [
|
|
94
|
+
createTextVNode(toDisplayString(_ctx.desc), 1)
|
|
95
|
+
])
|
|
96
|
+
], 6)) : createCommentVNode("", true),
|
|
93
97
|
renderSlot(_ctx.$slots, "link", {}, () => [
|
|
94
98
|
_ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_Right, {
|
|
95
99
|
key: 0,
|
|
@@ -9,7 +9,6 @@ const component = (tag) => {
|
|
|
9
9
|
tag: { type: String, default: tag }
|
|
10
10
|
},
|
|
11
11
|
setup(props, { slots }) {
|
|
12
|
-
var _a;
|
|
13
12
|
const hexToRgb = (color) => {
|
|
14
13
|
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
|
15
14
|
if (!reg.test(color))
|
|
@@ -45,15 +44,15 @@ const component = (tag) => {
|
|
|
45
44
|
return cssVars;
|
|
46
45
|
};
|
|
47
46
|
const themeStyle = computed(() => mapThemeVarsToCSSVars(props.themeVars));
|
|
48
|
-
const defaultSlots = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
49
47
|
return () => {
|
|
48
|
+
var _a;
|
|
50
49
|
return h(
|
|
51
50
|
props.tag,
|
|
52
51
|
{
|
|
53
52
|
class: `nut-theme-${props.theme}`,
|
|
54
53
|
style: themeStyle.value
|
|
55
54
|
},
|
|
56
|
-
|
|
55
|
+
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
57
56
|
);
|
|
58
57
|
};
|
|
59
58
|
}
|
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode,
|
|
20
|
+
import { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
|
|
21
21
|
import { c as createComponent } from "./component-0fbad28e.js";
|
|
22
22
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
23
23
|
import { CircleClose } from "@nutui/icons-vue";
|
|
@@ -85,6 +85,10 @@ const _sfc_main = create({
|
|
|
85
85
|
inputAlign: {
|
|
86
86
|
type: String,
|
|
87
87
|
default: "left"
|
|
88
|
+
},
|
|
89
|
+
safeAreaInsetBottom: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false
|
|
88
92
|
}
|
|
89
93
|
},
|
|
90
94
|
emits: [
|
|
@@ -209,7 +213,7 @@ const _hoisted_5 = {
|
|
|
209
213
|
};
|
|
210
214
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
211
215
|
return openBlock(), createElementBlock("view", {
|
|
212
|
-
class: "nut-searchbar",
|
|
216
|
+
class: normalizeClass(["nut-searchbar", { "safe-area-inset-bottom": _ctx.safeAreaInsetBottom }]),
|
|
213
217
|
style: normalizeStyle(_ctx.searchbarStyle)
|
|
214
218
|
}, [
|
|
215
219
|
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
|
|
@@ -272,7 +276,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
272
276
|
_ctx.$slots.rightout ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
273
277
|
renderSlot(_ctx.$slots, "rightout")
|
|
274
278
|
])) : createCommentVNode("", true)
|
|
275
|
-
],
|
|
279
|
+
], 6);
|
|
276
280
|
}
|
|
277
281
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
278
282
|
export {
|
|
@@ -168,8 +168,12 @@ const _sfc_main = create({
|
|
|
168
168
|
name: props.name,
|
|
169
169
|
disabled: props.disabled
|
|
170
170
|
};
|
|
171
|
-
if (props.capture)
|
|
171
|
+
if (props.capture) {
|
|
172
172
|
params.capture = "camera";
|
|
173
|
+
if (!params.accept) {
|
|
174
|
+
params.accept = "image/*";
|
|
175
|
+
}
|
|
176
|
+
}
|
|
173
177
|
return h("input", params);
|
|
174
178
|
};
|
|
175
179
|
const clearInput = (el) => {
|
|
@@ -71,7 +71,7 @@ const _sfc_main = create({
|
|
|
71
71
|
},
|
|
72
72
|
components: {},
|
|
73
73
|
emits: ["click", "play", "pause", "playend", "time"],
|
|
74
|
-
setup(props, { emit }) {
|
|
74
|
+
setup(props, { emit, expose }) {
|
|
75
75
|
const state = reactive({
|
|
76
76
|
videoElm: null,
|
|
77
77
|
initial: true,
|
|
@@ -297,6 +297,30 @@ const _sfc_main = create({
|
|
|
297
297
|
document.webkitCancelFullScreen();
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
|
+
const pause = () => {
|
|
301
|
+
state.state.playing = false;
|
|
302
|
+
state.videoElm.pause();
|
|
303
|
+
emit("pause", state.videoElm);
|
|
304
|
+
};
|
|
305
|
+
const stop = () => {
|
|
306
|
+
playEnded();
|
|
307
|
+
state.videoElm.pause();
|
|
308
|
+
};
|
|
309
|
+
const muted = () => {
|
|
310
|
+
state.state.isMuted = true;
|
|
311
|
+
state.videoElm.muted = true;
|
|
312
|
+
};
|
|
313
|
+
const unmuted = () => {
|
|
314
|
+
state.state.isMuted = false;
|
|
315
|
+
state.videoElm.muted = false;
|
|
316
|
+
};
|
|
317
|
+
expose({
|
|
318
|
+
play,
|
|
319
|
+
pause,
|
|
320
|
+
stop,
|
|
321
|
+
muted,
|
|
322
|
+
unmuted
|
|
323
|
+
});
|
|
300
324
|
onMounted(() => {
|
|
301
325
|
init();
|
|
302
326
|
});
|
|
@@ -940,10 +940,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
940
940
|
], 512)
|
|
941
941
|
], 544),
|
|
942
942
|
_ctx.poppable && !_ctx.isAutoBackFill ? (openBlock(), createElementBlock("view", _hoisted_15, [
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
943
|
+
renderSlot(_ctx.$slots, "footer-info", { date: _ctx.chooseData }, () => [
|
|
944
|
+
createElementVNode("view", {
|
|
945
|
+
class: "nut-calendar__confirm",
|
|
946
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.confirm && _ctx.confirm(...args))
|
|
947
|
+
}, toDisplayString(_ctx.confirmText || _ctx.translate("confirm")), 1)
|
|
948
|
+
])
|
|
947
949
|
])) : createCommentVNode("", true)
|
|
948
950
|
], 2);
|
|
949
951
|
}
|
|
@@ -28,6 +28,22 @@
|
|
|
28
28
|
box-sizing: border-box;
|
|
29
29
|
color: $searchbar-input-bar-color;
|
|
30
30
|
|
|
31
|
+
&.safe-area-inset-bottom {
|
|
32
|
+
position: relative;
|
|
33
|
+
margin-bottom: constant(safe-area-inset-bottom);
|
|
34
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
35
|
+
&::after {
|
|
36
|
+
content: '';
|
|
37
|
+
position: absolute;
|
|
38
|
+
left: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: constant(safe-area-inset-bottom);
|
|
42
|
+
height: env(safe-area-inset-bottom);
|
|
43
|
+
background: $searchbar-background;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
31
47
|
&::placeholder {
|
|
32
48
|
color: $searchbar-input-bar-placeholder-color;
|
|
33
49
|
}
|
|
@@ -72,7 +88,6 @@
|
|
|
72
88
|
input {
|
|
73
89
|
width: 100%;
|
|
74
90
|
height: 100%;
|
|
75
|
-
min-width: 214px;
|
|
76
91
|
padding-left: 4px;
|
|
77
92
|
}
|
|
78
93
|
}
|
|
@@ -122,11 +137,15 @@
|
|
|
122
137
|
margin: 0;
|
|
123
138
|
background-color: transparent;
|
|
124
139
|
border-color: transparent;
|
|
125
|
-
border-radius: 16px;
|
|
140
|
+
// border-radius: 16px;
|
|
126
141
|
outline: none;
|
|
127
142
|
font-size: 14px;
|
|
128
143
|
}
|
|
129
144
|
|
|
145
|
+
.nut-searchbar__input-bar_clear {
|
|
146
|
+
max-width: 290px;
|
|
147
|
+
}
|
|
148
|
+
|
|
130
149
|
.nut-searchbar__input-inner-absolute {
|
|
131
150
|
.nut-searchbar__input-bar {
|
|
132
151
|
box-sizing: border-box;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "NutUI",
|
|
5
|
-
"version": "4.1.
|
|
5
|
+
"version": "4.1.6",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -5056,6 +5056,15 @@
|
|
|
5056
5056
|
"type": "string",
|
|
5057
5057
|
"kind": "expression"
|
|
5058
5058
|
}
|
|
5059
|
+
},
|
|
5060
|
+
{
|
|
5061
|
+
"name": "safe-area-inset-bottom",
|
|
5062
|
+
"default": "`false`",
|
|
5063
|
+
"description": "是否开启 iphone 系列全面屏底部安全区适配",
|
|
5064
|
+
"value": {
|
|
5065
|
+
"type": "boolean",
|
|
5066
|
+
"kind": "expression"
|
|
5067
|
+
}
|
|
5059
5068
|
}
|
|
5060
5069
|
]
|
|
5061
5070
|
},
|