@varlet/ui 1.27.0 → 1.27.3
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/es/bottom-navigation/BottomNavigation.js +1 -1
- package/es/bottom-navigation/bottomNavigation.css +1 -1
- package/es/bottom-navigation/bottomNavigation.less +5 -0
- package/es/bottom-navigation/props.js +4 -0
- package/es/style.css +1 -1
- package/es/tabs/Tabs.js +1 -1
- package/es/tabs/props.js +4 -0
- package/es/tabs/tabs.css +1 -1
- package/es/tabs/tabs.less +6 -0
- package/es/uploader/Uploader.js +14 -3
- package/es/uploader/uploader.css +1 -1
- package/es/uploader/uploader.less +6 -9
- package/es/varlet.esm.js +23 -5
- package/highlight/attributes.json +8 -0
- package/highlight/tags.json +2 -0
- package/highlight/web-types.json +19 -1
- package/lib/bottom-navigation/BottomNavigation.js +1 -1
- package/lib/bottom-navigation/bottomNavigation.css +1 -1
- package/lib/bottom-navigation/bottomNavigation.less +5 -0
- package/lib/bottom-navigation/props.js +4 -0
- package/lib/snackbar/style/index.js +1 -1
- package/lib/snackbar/style/less.js +1 -1
- package/lib/style.css +1 -1
- package/lib/tabs/Tabs.js +1 -1
- package/lib/tabs/props.js +4 -0
- package/lib/tabs/tabs.css +1 -1
- package/lib/tabs/tabs.less +6 -0
- package/lib/uploader/Uploader.js +14 -3
- package/lib/uploader/uploader.css +1 -1
- package/lib/uploader/uploader.less +6 -9
- package/package.json +4 -4
- package/types/bottomNavigation.d.ts +2 -1
- package/types/tabs.d.ts +1 -0
- package/types/uploader.d.ts +11 -4
- package/umd/varlet.js +4 -4
package/es/tabs/Tabs.js
CHANGED
|
@@ -19,7 +19,7 @@ export function render(_ctx, _cache) {
|
|
|
19
19
|
"offset-top": _ctx.sticky ? _ctx.offsetTop : null
|
|
20
20
|
}, {
|
|
21
21
|
default: _withCtx(() => [_createElementVNode("div", _mergeProps({
|
|
22
|
-
class: _ctx.classes(_ctx.n(), 'var--box', _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, 'var-elevation--4'], [_ctx.fixedBottom, _ctx.n('--fixed-bottom')]),
|
|
22
|
+
class: _ctx.classes(_ctx.n(), 'var--box', _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, 'var-elevation--4'], [_ctx.fixedBottom, _ctx.n('--fixed-bottom')], [_ctx.safeArea, _ctx.n('--safe-area')]),
|
|
23
23
|
style: {
|
|
24
24
|
background: _ctx.color
|
|
25
25
|
}
|
package/es/tabs/props.js
CHANGED
package/es/tabs/tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { position: absolute; z-index: 10; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}
|
|
1
|
+
:root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { position: absolute; z-index: 10; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}.var-tabs--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box !important;}
|
package/es/tabs/tabs.less
CHANGED
package/es/uploader/Uploader.js
CHANGED
|
@@ -83,8 +83,12 @@ export function render(_ctx, _cache) {
|
|
|
83
83
|
/* KEYED_FRAGMENT */
|
|
84
84
|
)), !_ctx.maxlength || _ctx.modelValue.length < _ctx.maxlength ? _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
85
85
|
key: 0,
|
|
86
|
-
class: _normalizeClass(_ctx.classes(
|
|
86
|
+
class: _normalizeClass(_ctx.classes([!_ctx.$slots.default, _ctx.n('action') + " var-elevation--2"], [_ctx.disabled || _ctx.formDisabled, _ctx.n('--disabled')])),
|
|
87
|
+
onClick: _cache[1] || (_cache[1] = function () {
|
|
88
|
+
return _ctx.triggerAction && _ctx.triggerAction(...arguments);
|
|
89
|
+
})
|
|
87
90
|
}, [_createElementVNode("input", {
|
|
91
|
+
ref: "input",
|
|
88
92
|
class: _normalizeClass(_ctx.n('action-input')),
|
|
89
93
|
type: "file",
|
|
90
94
|
multiple: _ctx.multiple,
|
|
@@ -118,8 +122,8 @@ export function render(_ctx, _cache) {
|
|
|
118
122
|
"var-uploader-cover": "",
|
|
119
123
|
position: "center",
|
|
120
124
|
show: _ctx.showPreview,
|
|
121
|
-
"onUpdate:show": _cache[
|
|
122
|
-
onClosed: _cache[
|
|
125
|
+
"onUpdate:show": _cache[2] || (_cache[2] = $event => _ctx.showPreview = $event),
|
|
126
|
+
onClosed: _cache[3] || (_cache[3] = $event => _ctx.currentPreview = null)
|
|
123
127
|
}, {
|
|
124
128
|
default: _withCtx(() => {
|
|
125
129
|
var _ctx$currentPreview, _ctx$currentPreview2;
|
|
@@ -161,6 +165,7 @@ export default defineComponent({
|
|
|
161
165
|
props,
|
|
162
166
|
|
|
163
167
|
setup(props) {
|
|
168
|
+
var input = ref(null);
|
|
164
169
|
var showPreview = ref(false);
|
|
165
170
|
var currentPreview = ref(null);
|
|
166
171
|
var maxlengthText = computed(() => {
|
|
@@ -196,6 +201,10 @@ export default defineComponent({
|
|
|
196
201
|
return modelValue;
|
|
197
202
|
});
|
|
198
203
|
|
|
204
|
+
var triggerAction = () => {
|
|
205
|
+
input.value.click();
|
|
206
|
+
};
|
|
207
|
+
|
|
199
208
|
var preview = varFile => {
|
|
200
209
|
var {
|
|
201
210
|
disabled,
|
|
@@ -414,6 +423,7 @@ export default defineComponent({
|
|
|
414
423
|
return {
|
|
415
424
|
n,
|
|
416
425
|
classes,
|
|
426
|
+
input,
|
|
417
427
|
files,
|
|
418
428
|
showPreview,
|
|
419
429
|
currentPreview,
|
|
@@ -424,6 +434,7 @@ export default defineComponent({
|
|
|
424
434
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
425
435
|
formReadonly: form == null ? void 0 : form.readonly,
|
|
426
436
|
preview,
|
|
437
|
+
triggerAction,
|
|
427
438
|
handleChange,
|
|
428
439
|
handleRemove,
|
|
429
440
|
getSuccess,
|
package/es/uploader/uploader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --uploader-action-background: #f7f8fa; --uploader-action-icon-color: #888; --uploader-action-icon-size: 24px; --uploader-action-margin: 0 10px 10px 0; --uploader-file-size: 80px; --uploader-file-margin: 0 10px 10px 0; --uploader-file-name-background: #f7f8fa; --uploader-file-name-color: #888; --uploader-file-name-font-size: 12px; --uploader-file-name-padding: 10px; --uploader-file-text-align: center; --uploader-file-close-background: rgba(0, 0, 0, 0.3); --uploader-file-close-size: 24px; --uploader-file-close-icon-font-size: 14px; --uploader-file-close-icon-color: #fff; --uploader-file-cover-fit: cover; --uploader-file-cover-background: #f7f8fa; --uploader-preview-video-width: 100vw; --uploader-preview-video-height: 100vw; --uploader-file-indicator-height: 4px; --uploader-file-indicator-normal-color: var(--color-disabled); --uploader-file-indicator-success-color: var(--color-success); --uploader-file-indicator-error-color: var(--color-danger); --uploader-disabled-color: var(--color-disabled); --uploader-disabled-text-color: var(--color-text-disabled); --uploader-loading-background: linear-gradient(90deg, hsla(0, 0%, 100%, 0), hsla(0, 0%, 100%, 0.3), hsla(0, 0%, 100%, 0));}@keyframes var-uploader-loading-animation { from { transform: translateX(-100%); } to { transform: translateX(100%); }}.var-uploader { width: 100%;}.var-uploader__file-list { width: 100%; display: flex; flex-wrap: wrap;}.var-uploader__file { position: relative; width: var(--uploader-file-size); height: var(--uploader-file-size); margin: var(--uploader-file-margin); overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-uploader__file-name { position: absolute; width: 100%; height: 100%; line-height: calc(var(--uploader-file-size) - var(--uploader-file-name-padding) * 2); font-size: var(--uploader-file-name-font-size); z-index: 0; background: var(--uploader-file-name-background); padding: var(--uploader-file-name-padding); color: var(--uploader-file-name-color); text-align: var(--uploader-file-text-align); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; user-select: none; transition: background-color 0.25s;}.var-uploader__file-cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; background: var(--uploader-file-cover-background); object-fit: var(--uploader-file-cover-fit); pointer-events: none; transition: background-color 0.25s;}.var-uploader__file-close { position: absolute; top: 0; right: 0; z-index: 2; border-top: var(--uploader-file-close-size) solid var(--uploader-file-close-background); border-left: var(--uploader-file-close-size) solid transparent;}.var-uploader__file-close-icon[var-uploader-cover] { position: absolute; top: calc(-1 * var(--uploader-file-close-size)); right: 0; font-size: var(--uploader-file-close-icon-font-size); color: var(--uploader-file-close-icon-color);}.var-uploader__file-indicator { position: absolute; left: 0; bottom: 0; z-index: 2; width: 100%; height: var(--uploader-file-indicator-height); transition: all 0.25s; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--uploader-file-indicator-normal-color);}.var-uploader__action { position: relative; display: flex; justify-content: center; align-items: center; color: var(--uploader-action-icon-color); width: var(--uploader-file-size); height: var(--uploader-file-size); background: var(--uploader-action-background); margin: var(--uploader-action-margin); transition: background-color 0.25s;}.var-uploader__action-icon[var-uploader-cover] { font-size: var(--uploader-action-icon-size);}.var-uploader__action-input {
|
|
1
|
+
:root { --uploader-action-background: #f7f8fa; --uploader-action-icon-color: #888; --uploader-action-icon-size: 24px; --uploader-action-margin: 0 10px 10px 0; --uploader-file-size: 80px; --uploader-file-margin: 0 10px 10px 0; --uploader-file-name-background: #f7f8fa; --uploader-file-name-color: #888; --uploader-file-name-font-size: 12px; --uploader-file-name-padding: 10px; --uploader-file-text-align: center; --uploader-file-close-background: rgba(0, 0, 0, 0.3); --uploader-file-close-size: 24px; --uploader-file-close-icon-font-size: 14px; --uploader-file-close-icon-color: #fff; --uploader-file-cover-fit: cover; --uploader-file-cover-background: #f7f8fa; --uploader-preview-video-width: 100vw; --uploader-preview-video-height: 100vw; --uploader-file-indicator-height: 4px; --uploader-file-indicator-normal-color: var(--color-disabled); --uploader-file-indicator-success-color: var(--color-success); --uploader-file-indicator-error-color: var(--color-danger); --uploader-disabled-color: var(--color-disabled); --uploader-disabled-text-color: var(--color-text-disabled); --uploader-loading-background: linear-gradient(90deg, hsla(0, 0%, 100%, 0), hsla(0, 0%, 100%, 0.3), hsla(0, 0%, 100%, 0));}@keyframes var-uploader-loading-animation { from { transform: translateX(-100%); } to { transform: translateX(100%); }}.var-uploader { width: 100%;}.var-uploader__file-list { width: 100%; display: flex; flex-wrap: wrap;}.var-uploader__file { position: relative; width: var(--uploader-file-size); height: var(--uploader-file-size); margin: var(--uploader-file-margin); overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-uploader__file-name { position: absolute; width: 100%; height: 100%; line-height: calc(var(--uploader-file-size) - var(--uploader-file-name-padding) * 2); font-size: var(--uploader-file-name-font-size); z-index: 0; background: var(--uploader-file-name-background); padding: var(--uploader-file-name-padding); color: var(--uploader-file-name-color); text-align: var(--uploader-file-text-align); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; user-select: none; transition: background-color 0.25s;}.var-uploader__file-cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; background: var(--uploader-file-cover-background); object-fit: var(--uploader-file-cover-fit); pointer-events: none; transition: background-color 0.25s;}.var-uploader__file-close { position: absolute; top: 0; right: 0; z-index: 2; border-top: var(--uploader-file-close-size) solid var(--uploader-file-close-background); border-left: var(--uploader-file-close-size) solid transparent;}.var-uploader__file-close-icon[var-uploader-cover] { position: absolute; top: calc(-1 * var(--uploader-file-close-size)); right: 0; font-size: var(--uploader-file-close-icon-font-size); color: var(--uploader-file-close-icon-color);}.var-uploader__file-indicator { position: absolute; left: 0; bottom: 0; z-index: 2; width: 100%; height: var(--uploader-file-indicator-height); transition: all 0.25s; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--uploader-file-indicator-normal-color);}.var-uploader__action { position: relative; display: flex; justify-content: center; align-items: center; color: var(--uploader-action-icon-color); width: var(--uploader-file-size); height: var(--uploader-file-size); background: var(--uploader-action-background); margin: var(--uploader-action-margin); transition: background-color 0.25s; cursor: pointer;}.var-uploader__action-icon[var-uploader-cover] { font-size: var(--uploader-action-icon-size);}.var-uploader__action-input { display: block; width: 0; height: 0; visibility: hidden;}.var-uploader__preview[var-uploader-cover] { background: #000; box-shadow: none;}.var-uploader__preview-video { width: var(--uploader-preview-video-width); height: var(--uploader-preview-video-height);}.var-uploader--loading::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; animation: var-uploader-loading-animation 0.6s infinite; background: var(--uploader-loading-background); transition: background-color 0.25s;}.var-uploader--success { background: var(--uploader-file-indicator-success-color);}.var-uploader--error { background: var(--uploader-file-indicator-error-color);}.var-uploader--disabled { background: var(--uploader-disabled-color); color: var(--uploader-disabled-text-color); cursor: not-allowed;}
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
background: var(--uploader-action-background);
|
|
162
162
|
margin: var(--uploader-action-margin);
|
|
163
163
|
transition: background-color 0.25s;
|
|
164
|
+
cursor: pointer;
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
&__action-icon[var-uploader-cover] {
|
|
@@ -168,15 +169,10 @@
|
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
&__action-input {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
top: 0;
|
|
176
|
-
left: 0;
|
|
177
|
-
opacity: 0;
|
|
178
|
-
cursor: pointer;
|
|
179
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
172
|
+
display: block;
|
|
173
|
+
width: 0;
|
|
174
|
+
height: 0;
|
|
175
|
+
visibility: hidden;
|
|
180
176
|
}
|
|
181
177
|
|
|
182
178
|
&__preview[var-uploader-cover] {
|
|
@@ -215,5 +211,6 @@
|
|
|
215
211
|
&--disabled {
|
|
216
212
|
background: var(--uploader-disabled-color);
|
|
217
213
|
color: var(--uploader-disabled-text-color);
|
|
214
|
+
cursor: not-allowed;
|
|
218
215
|
}
|
|
219
216
|
}
|
package/es/varlet.esm.js
CHANGED
|
@@ -2158,6 +2158,10 @@ var props$M = {
|
|
|
2158
2158
|
type: Boolean,
|
|
2159
2159
|
default: false
|
|
2160
2160
|
},
|
|
2161
|
+
safeArea: {
|
|
2162
|
+
type: Boolean,
|
|
2163
|
+
default: false
|
|
2164
|
+
},
|
|
2161
2165
|
zIndex: {
|
|
2162
2166
|
type: [Number, String],
|
|
2163
2167
|
default: 1
|
|
@@ -2230,7 +2234,7 @@ var defaultFabProps = {
|
|
|
2230
2234
|
function render$S(_ctx, _cache) {
|
|
2231
2235
|
var _component_var_button = resolveComponent("var-button");
|
|
2232
2236
|
return openBlock(), createElementBlock("div", {
|
|
2233
|
-
class: normalizeClass(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n("--fixed")], [_ctx.border, _ctx.n("--border")])),
|
|
2237
|
+
class: normalizeClass(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n("--fixed")], [_ctx.border, _ctx.n("--border")], [_ctx.safeArea, _ctx.n("--safe-area")])),
|
|
2234
2238
|
ref: "bottomNavigationDom",
|
|
2235
2239
|
style: normalizeStyle("z-index:" + _ctx.zIndex)
|
|
2236
2240
|
}, [renderSlot(_ctx.$slots, "default"), _ctx.$slots.fab ? (openBlock(), createBlock(_component_var_button, mergeProps({
|
|
@@ -15543,6 +15547,10 @@ var props$3 = {
|
|
|
15543
15547
|
type: Boolean,
|
|
15544
15548
|
default: false
|
|
15545
15549
|
},
|
|
15550
|
+
safeArea: {
|
|
15551
|
+
type: Boolean,
|
|
15552
|
+
default: false
|
|
15553
|
+
},
|
|
15546
15554
|
offsetTop: pickProps(props$s, "offsetTop"),
|
|
15547
15555
|
onClick: {
|
|
15548
15556
|
type: Function
|
|
@@ -15592,7 +15600,7 @@ function render$4(_ctx, _cache) {
|
|
|
15592
15600
|
"offset-top": _ctx.sticky ? _ctx.offsetTop : null
|
|
15593
15601
|
}, {
|
|
15594
15602
|
default: withCtx(() => [createElementVNode("div", mergeProps({
|
|
15595
|
-
class: _ctx.classes(_ctx.n(), "var--box", _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, "var-elevation--4"], [_ctx.fixedBottom, _ctx.n("--fixed-bottom")]),
|
|
15603
|
+
class: _ctx.classes(_ctx.n(), "var--box", _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, "var-elevation--4"], [_ctx.fixedBottom, _ctx.n("--fixed-bottom")], [_ctx.safeArea, _ctx.n("--safe-area")]),
|
|
15596
15604
|
style: {
|
|
15597
15605
|
background: _ctx.color
|
|
15598
15606
|
}
|
|
@@ -16827,8 +16835,12 @@ function render(_ctx, _cache) {
|
|
|
16827
16835
|
}]]);
|
|
16828
16836
|
}), 128)), !_ctx.maxlength || _ctx.modelValue.length < _ctx.maxlength ? withDirectives((openBlock(), createElementBlock("div", {
|
|
16829
16837
|
key: 0,
|
|
16830
|
-
class: normalizeClass(_ctx.classes(
|
|
16838
|
+
class: normalizeClass(_ctx.classes([!_ctx.$slots.default, _ctx.n("action") + " var-elevation--2"], [_ctx.disabled || _ctx.formDisabled, _ctx.n("--disabled")])),
|
|
16839
|
+
onClick: _cache[1] || (_cache[1] = function() {
|
|
16840
|
+
return _ctx.triggerAction && _ctx.triggerAction(...arguments);
|
|
16841
|
+
})
|
|
16831
16842
|
}, [createElementVNode("input", {
|
|
16843
|
+
ref: "input",
|
|
16832
16844
|
class: normalizeClass(_ctx.n("action-input")),
|
|
16833
16845
|
type: "file",
|
|
16834
16846
|
multiple: _ctx.multiple,
|
|
@@ -16852,8 +16864,8 @@ function render(_ctx, _cache) {
|
|
|
16852
16864
|
"var-uploader-cover": "",
|
|
16853
16865
|
position: "center",
|
|
16854
16866
|
show: _ctx.showPreview,
|
|
16855
|
-
"onUpdate:show": _cache[
|
|
16856
|
-
onClosed: _cache[
|
|
16867
|
+
"onUpdate:show": _cache[2] || (_cache[2] = ($event) => _ctx.showPreview = $event),
|
|
16868
|
+
onClosed: _cache[3] || (_cache[3] = ($event) => _ctx.currentPreview = null)
|
|
16857
16869
|
}, {
|
|
16858
16870
|
default: withCtx(() => {
|
|
16859
16871
|
var _ctx$currentPreview, _ctx$currentPreview2;
|
|
@@ -16885,6 +16897,7 @@ var Uploader = defineComponent({
|
|
|
16885
16897
|
},
|
|
16886
16898
|
props,
|
|
16887
16899
|
setup(props2) {
|
|
16900
|
+
var input2 = ref(null);
|
|
16888
16901
|
var showPreview = ref(false);
|
|
16889
16902
|
var currentPreview = ref(null);
|
|
16890
16903
|
var maxlengthText = computed(() => {
|
|
@@ -16916,6 +16929,9 @@ var Uploader = defineComponent({
|
|
|
16916
16929
|
}
|
|
16917
16930
|
return modelValue;
|
|
16918
16931
|
});
|
|
16932
|
+
var triggerAction = () => {
|
|
16933
|
+
input2.value.click();
|
|
16934
|
+
};
|
|
16919
16935
|
var preview = (varFile) => {
|
|
16920
16936
|
var {
|
|
16921
16937
|
disabled,
|
|
@@ -17096,6 +17112,7 @@ var Uploader = defineComponent({
|
|
|
17096
17112
|
return {
|
|
17097
17113
|
n,
|
|
17098
17114
|
classes,
|
|
17115
|
+
input: input2,
|
|
17099
17116
|
files,
|
|
17100
17117
|
showPreview,
|
|
17101
17118
|
currentPreview,
|
|
@@ -17106,6 +17123,7 @@ var Uploader = defineComponent({
|
|
|
17106
17123
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
17107
17124
|
formReadonly: form == null ? void 0 : form.readonly,
|
|
17108
17125
|
preview,
|
|
17126
|
+
triggerAction,
|
|
17109
17127
|
handleChange,
|
|
17110
17128
|
handleRemove,
|
|
17111
17129
|
getSuccess,
|
|
@@ -119,6 +119,10 @@
|
|
|
119
119
|
"type": "boolean",
|
|
120
120
|
"description": "是否显示外边框 默认值:false"
|
|
121
121
|
},
|
|
122
|
+
"var-bottom-navigation/safe-area": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"description": "是否开启底部安全区适配 默认值:false"
|
|
125
|
+
},
|
|
122
126
|
"var-bottom-navigation/z-index": {
|
|
123
127
|
"type": "number | string",
|
|
124
128
|
"description": "元素 z-index 默认值:1"
|
|
@@ -1699,6 +1703,10 @@
|
|
|
1699
1703
|
"type": "boolean",
|
|
1700
1704
|
"description": "是否启用粘性布局 默认值:false"
|
|
1701
1705
|
},
|
|
1706
|
+
"var-tabs/safe-area": {
|
|
1707
|
+
"type": "boolean",
|
|
1708
|
+
"description": "是否开启底部安全区适配 默认值:false"
|
|
1709
|
+
},
|
|
1702
1710
|
"var-tabs/offset-top": {
|
|
1703
1711
|
"type": "string | number",
|
|
1704
1712
|
"description": "吸顶距离 默认值:0"
|
package/highlight/tags.json
CHANGED
package/highlight/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.27.2",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -369,6 +369,15 @@
|
|
|
369
369
|
"kind": "expression"
|
|
370
370
|
}
|
|
371
371
|
},
|
|
372
|
+
{
|
|
373
|
+
"name": "safe-area",
|
|
374
|
+
"description": "是否开启底部安全区适配",
|
|
375
|
+
"default": "false",
|
|
376
|
+
"value": {
|
|
377
|
+
"type": "boolean",
|
|
378
|
+
"kind": "expression"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
372
381
|
{
|
|
373
382
|
"name": "z-index",
|
|
374
383
|
"description": "元素 z-index",
|
|
@@ -5059,6 +5068,15 @@
|
|
|
5059
5068
|
"kind": "expression"
|
|
5060
5069
|
}
|
|
5061
5070
|
},
|
|
5071
|
+
{
|
|
5072
|
+
"name": "safe-area",
|
|
5073
|
+
"description": "是否开启底部安全区适配",
|
|
5074
|
+
"default": "false",
|
|
5075
|
+
"value": {
|
|
5076
|
+
"type": "boolean",
|
|
5077
|
+
"kind": "expression"
|
|
5078
|
+
}
|
|
5079
|
+
},
|
|
5062
5080
|
{
|
|
5063
5081
|
"name": "offset-top",
|
|
5064
5082
|
"description": "吸顶距离",
|
|
@@ -38,7 +38,7 @@ function render(_ctx, _cache) {
|
|
|
38
38
|
var _component_var_button = (0, _vue.resolveComponent)("var-button");
|
|
39
39
|
|
|
40
40
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
41
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n('--fixed')], [_ctx.border, _ctx.n('--border')])),
|
|
41
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n('--fixed')], [_ctx.border, _ctx.n('--border')], [_ctx.safeArea, _ctx.n('--safe-area')])),
|
|
42
42
|
ref: "bottomNavigationDom",
|
|
43
43
|
style: (0, _vue.normalizeStyle)("z-index:" + _ctx.zIndex)
|
|
44
44
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default"), _ctx.$slots.fab ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_button, (0, _vue.mergeProps)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --bottom-navigation-height: 50px; --bottom-navigation-z-index: 1; --bottom-navigation-background-color: #fff; --bottom-navigation-border-color: #e3e3e3; --bottom-navigation-fab-offset: 4px;}.var-bottom-navigation { width: 100%; height: var(--bottom-navigation-height); display: flex; position: relative; background-color: var(--bottom-navigation-background-color); transition: background-color 250ms, border-color 250ms; -webkit-tap-highlight-color: transparent;}.var-bottom-navigation--fixed { position: fixed; left: 0; bottom: 0;}.var-bottom-navigation--border { border-top: 1px solid var(--bottom-navigation-border-color);}.var-bottom-navigation__fab[var-bottom-navigation__fab] { width: var(--bottom-navigation-height); height: var(--bottom-navigation-height); position: absolute; z-index: 2; transform: translateY(-50%); overflow: hidden; transition: right 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.var-bottom-navigation--fab-center { right: calc(50% - var(--bottom-navigation-height) / 2);}.var-bottom-navigation--fab-right { right: var(--bottom-navigation-fab-offset);}
|
|
1
|
+
:root { --bottom-navigation-height: 50px; --bottom-navigation-z-index: 1; --bottom-navigation-background-color: #fff; --bottom-navigation-border-color: #e3e3e3; --bottom-navigation-fab-offset: 4px;}.var-bottom-navigation { width: 100%; height: var(--bottom-navigation-height); display: flex; position: relative; background-color: var(--bottom-navigation-background-color); transition: background-color 250ms, border-color 250ms; -webkit-tap-highlight-color: transparent;}.var-bottom-navigation--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);}.var-bottom-navigation--fixed { position: fixed; left: 0; bottom: 0;}.var-bottom-navigation--border { border-top: 1px solid var(--bottom-navigation-border-color);}.var-bottom-navigation__fab[var-bottom-navigation__fab] { width: var(--bottom-navigation-height); height: var(--bottom-navigation-height); position: absolute; z-index: 2; transform: translateY(-50%); overflow: hidden; transition: right 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.var-bottom-navigation--fab-center { right: calc(50% - var(--bottom-navigation-height) / 2);}.var-bottom-navigation--fab-right { right: var(--bottom-navigation-fab-offset);}
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
transition: background-color 250ms, border-color 250ms;
|
|
22
22
|
-webkit-tap-highlight-color: transparent;
|
|
23
23
|
|
|
24
|
+
&--safe-area {
|
|
25
|
+
padding-bottom: constant(safe-area-inset-bottom); // iOS < 11.2
|
|
26
|
+
padding-bottom: env(safe-area-inset-bottom); // iOS >= 11.2
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
&--fixed {
|
|
25
30
|
position: fixed;
|
|
26
31
|
left: 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require('../../styles/common.css')
|
|
2
|
+
require('../SnackbarSfc.css')
|
|
2
3
|
require('../../styles/elevation.css')
|
|
3
4
|
require('../../loading/loading.css')
|
|
4
5
|
require('../../button/button.css')
|
|
5
6
|
require('../../icon/icon.css')
|
|
6
7
|
require('../snackbar.css')
|
|
7
8
|
require('../coreSfc.css')
|
|
8
|
-
require('../SnackbarSfc.css')
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require('../../styles/common.less')
|
|
2
|
+
require('../SnackbarSfc.less')
|
|
2
3
|
require('../../styles/elevation.less')
|
|
3
4
|
require('../../loading/loading.less')
|
|
4
5
|
require('../../button/button.less')
|
|
5
6
|
require('../../icon/icon.less')
|
|
6
7
|
require('../snackbar.less')
|
|
7
8
|
require('../coreSfc.less')
|
|
8
|
-
require('../SnackbarSfc.less')
|