@varlet/ui 2.16.1 → 2.16.2
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/col/Col.mjs +6 -2
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/row/Row.mjs +8 -7
- package/es/row/props.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/swipe/Swipe.mjs +4 -1
- package/es/varlet.esm.js +109 -102
- package/highlight/web-types.en-US.json +3 -3
- package/highlight/web-types.zh-CN.json +3 -3
- package/lib/varlet.cjs.js +20 -13
- package/package.json +7 -7
- package/types/row.d.ts +1 -1
- package/types/swipe.d.ts +12 -3
- package/umd/varlet.js +4 -4
|
@@ -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": "2.16.
|
|
4
|
+
"version": "2.16.2",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -5027,10 +5027,10 @@
|
|
|
5027
5027
|
"attributes": [
|
|
5028
5028
|
{
|
|
5029
5029
|
"name": "gutter",
|
|
5030
|
-
"description": "Col gutter",
|
|
5030
|
+
"description": "Col gutter, default is horizontal spacing. Can be set to [Vertical, Horizontal](Support length unit)",
|
|
5031
5031
|
"default": "0",
|
|
5032
5032
|
"value": {
|
|
5033
|
-
"type": "string | number",
|
|
5033
|
+
"type": "string | number | [string | number, string | number]",
|
|
5034
5034
|
"kind": "expression"
|
|
5035
5035
|
}
|
|
5036
5036
|
},
|
|
@@ -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": "2.16.
|
|
4
|
+
"version": "2.16.2",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -5349,10 +5349,10 @@
|
|
|
5349
5349
|
"attributes": [
|
|
5350
5350
|
{
|
|
5351
5351
|
"name": "gutter",
|
|
5352
|
-
"description": "
|
|
5352
|
+
"description": "列间距,默认为水平间距。可设置为 [垂直间距, 水平间距] (支持长度单位)",
|
|
5353
5353
|
"default": "0",
|
|
5354
5354
|
"value": {
|
|
5355
|
-
"type": "string | number",
|
|
5355
|
+
"type": "string | number | [string | number, string | number]",
|
|
5356
5356
|
"kind": "expression"
|
|
5357
5357
|
}
|
|
5358
5358
|
},
|
package/lib/varlet.cjs.js
CHANGED
|
@@ -5191,7 +5191,9 @@ function __render__$Z(_ctx, _cache) {
|
|
|
5191
5191
|
justifyContent: _ctx.padStartFlex(_ctx.justify),
|
|
5192
5192
|
alignItems: _ctx.padStartFlex(_ctx.align),
|
|
5193
5193
|
paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
|
|
5194
|
-
paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
|
|
5194
|
+
paddingRight: _ctx.toSizeUnit(_ctx.padding.right),
|
|
5195
|
+
paddingTop: _ctx.toSizeUnit(_ctx.padding.top),
|
|
5196
|
+
paddingBottom: _ctx.toSizeUnit(_ctx.padding.bottom)
|
|
5195
5197
|
}),
|
|
5196
5198
|
onClick: _cache[0] || (_cache[0] = function() {
|
|
5197
5199
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
@@ -5208,7 +5210,9 @@ var __sfc__$_ = vue.defineComponent({
|
|
|
5208
5210
|
setup(props2) {
|
|
5209
5211
|
var padding = vue.ref({
|
|
5210
5212
|
left: 0,
|
|
5211
|
-
right: 0
|
|
5213
|
+
right: 0,
|
|
5214
|
+
top: 0,
|
|
5215
|
+
bottom: 0
|
|
5212
5216
|
});
|
|
5213
5217
|
var span = vue.computed(() => toNumber(props2.span));
|
|
5214
5218
|
var offset2 = vue.computed(() => toNumber(props2.offset));
|
|
@@ -13801,7 +13805,10 @@ function __render__$I(_ctx, _cache) {
|
|
|
13801
13805
|
/* CLASS, STYLE, HYDRATE_EVENTS */
|
|
13802
13806
|
), vue.renderSlot(_ctx.$slots, "indicator", {
|
|
13803
13807
|
index: _ctx.index,
|
|
13804
|
-
length: _ctx.length
|
|
13808
|
+
length: _ctx.length,
|
|
13809
|
+
prev: _ctx.prev,
|
|
13810
|
+
next: _ctx.next,
|
|
13811
|
+
to: _ctx.to
|
|
13805
13812
|
}, () => [_ctx.indicator && _ctx.length ? (vue.openBlock(), vue.createElementBlock(
|
|
13806
13813
|
"div",
|
|
13807
13814
|
{
|
|
@@ -19319,7 +19326,7 @@ withInstall(Result);
|
|
|
19319
19326
|
var _ResultComponent = Result;
|
|
19320
19327
|
var props$h = {
|
|
19321
19328
|
gutter: {
|
|
19322
|
-
type: [String, Number],
|
|
19329
|
+
type: [String, Number, Array],
|
|
19323
19330
|
default: 0
|
|
19324
19331
|
},
|
|
19325
19332
|
justify: {
|
|
@@ -19344,7 +19351,7 @@ function __render__$h(_ctx, _cache) {
|
|
|
19344
19351
|
style: vue.normalizeStyle({
|
|
19345
19352
|
justifyContent: _ctx.padStartFlex(_ctx.justify),
|
|
19346
19353
|
alignItems: _ctx.padStartFlex(_ctx.align),
|
|
19347
|
-
margin: _ctx.average
|
|
19354
|
+
margin: -_ctx.average[0] + "px " + -_ctx.average[1] + "px"
|
|
19348
19355
|
}),
|
|
19349
19356
|
onClick: _cache[0] || (_cache[0] = function() {
|
|
19350
19357
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
@@ -19364,15 +19371,15 @@ var __sfc__$i = vue.defineComponent({
|
|
|
19364
19371
|
bindCols,
|
|
19365
19372
|
length
|
|
19366
19373
|
} = useCols();
|
|
19367
|
-
var average = vue.computed(() =>
|
|
19368
|
-
var gutter = toPxNum(props2.gutter);
|
|
19369
|
-
return gutter / 2;
|
|
19370
|
-
});
|
|
19374
|
+
var average = vue.computed(() => isArray(props2.gutter) ? props2.gutter.map((numeric) => toPxNum(numeric) / 2) : [0, toPxNum(props2.gutter) / 2]);
|
|
19371
19375
|
var computePadding = () => {
|
|
19372
19376
|
cols.forEach((col2) => {
|
|
19377
|
+
var [y, x] = average.value;
|
|
19373
19378
|
col2.setPadding({
|
|
19374
|
-
left:
|
|
19375
|
-
right:
|
|
19379
|
+
left: x,
|
|
19380
|
+
right: x,
|
|
19381
|
+
top: y,
|
|
19382
|
+
bottom: y
|
|
19376
19383
|
});
|
|
19377
19384
|
});
|
|
19378
19385
|
};
|
|
@@ -24449,9 +24456,9 @@ const skeleton = "";
|
|
|
24449
24456
|
const SkeletonSfc = "";
|
|
24450
24457
|
const slider = "";
|
|
24451
24458
|
const SliderSfc = "";
|
|
24459
|
+
const SnackbarSfc = "";
|
|
24452
24460
|
const snackbar = "";
|
|
24453
24461
|
const coreSfc = "";
|
|
24454
|
-
const SnackbarSfc = "";
|
|
24455
24462
|
const space = "";
|
|
24456
24463
|
const step = "";
|
|
24457
24464
|
const StepSfc = "";
|
|
@@ -24478,7 +24485,7 @@ const uploader = "";
|
|
|
24478
24485
|
const UploaderSfc = "";
|
|
24479
24486
|
const watermark = "";
|
|
24480
24487
|
const WatermarkSfc = "";
|
|
24481
|
-
const version = "2.16.
|
|
24488
|
+
const version = "2.16.2";
|
|
24482
24489
|
function install(app) {
|
|
24483
24490
|
ActionSheet.install && app.use(ActionSheet);
|
|
24484
24491
|
AppBar.install && app.use(AppBar);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.2",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@popperjs/core": "^2.11.6",
|
|
47
47
|
"dayjs": "^1.10.4",
|
|
48
48
|
"decimal.js": "^10.2.1",
|
|
49
|
-
"@varlet/
|
|
50
|
-
"@varlet/shared": "2.16.
|
|
51
|
-
"@varlet/
|
|
49
|
+
"@varlet/use": "2.16.2",
|
|
50
|
+
"@varlet/shared": "2.16.2",
|
|
51
|
+
"@varlet/icons": "2.16.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@vue/runtime-core": "3.3.4",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"typescript": "^5.1.5",
|
|
65
65
|
"vue": "3.3.4",
|
|
66
66
|
"vue-router": "4.2.0",
|
|
67
|
-
"@varlet/cli": "2.16.
|
|
68
|
-
"@varlet/touch-emulator": "2.16.
|
|
69
|
-
"@varlet/ui": "2.16.
|
|
67
|
+
"@varlet/cli": "2.16.2",
|
|
68
|
+
"@varlet/touch-emulator": "2.16.2",
|
|
69
|
+
"@varlet/ui": "2.16.2"
|
|
70
70
|
},
|
|
71
71
|
"browserslist": [
|
|
72
72
|
"Chrome >= 54",
|
package/types/row.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type RowJustify = 'flex-start' | 'flex-end' | 'center' | 'space-between'
|
|
|
8
8
|
export type RowAlign = 'flex-start' | 'center' | 'flex-end' | 'start' | 'end'
|
|
9
9
|
|
|
10
10
|
export interface RowProps extends BasicAttributes {
|
|
11
|
-
gutter?: string | number
|
|
11
|
+
gutter?: string | number | [number | string, number | string]
|
|
12
12
|
justify?: RowJustify
|
|
13
13
|
align?: RowAlign
|
|
14
14
|
onClick?: ListenerProp<(e: Event) => void>
|
package/types/swipe.d.ts
CHANGED
|
@@ -19,9 +19,18 @@ export interface SwipeProps extends BasicAttributes {
|
|
|
19
19
|
onChange?: ListenerProp<(index: number) => void>
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
export type SwipePrev = (options?: SwipeToOptions) => void
|
|
23
|
+
|
|
24
|
+
export type SwipeNext = (options?: SwipeToOptions) => void
|
|
25
|
+
|
|
26
|
+
export type SwipeTo = (index: number, options?: SwipeToOptions) => void
|
|
27
|
+
|
|
22
28
|
export interface SwipeIndicatorData {
|
|
23
29
|
index: number
|
|
24
30
|
length: number
|
|
31
|
+
prev: SwipePrev
|
|
32
|
+
next: SwipeNext
|
|
33
|
+
to: SwipeTo
|
|
25
34
|
}
|
|
26
35
|
|
|
27
36
|
export class Swipe extends VarComponent {
|
|
@@ -34,11 +43,11 @@ export class Swipe extends VarComponent {
|
|
|
34
43
|
|
|
35
44
|
resize(): void
|
|
36
45
|
|
|
37
|
-
prev
|
|
46
|
+
prev: SwipePrev
|
|
38
47
|
|
|
39
|
-
next
|
|
48
|
+
next: SwipeNext
|
|
40
49
|
|
|
41
|
-
to
|
|
50
|
+
to: SwipeTo
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
export class _SwipeComponent extends Swipe {}
|