@varlet/ui 3.3.10 → 3.3.11
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/action-sheet/style/index.mjs +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/picker/Picker.mjs +10 -6
- package/es/picker/props.mjs +1 -0
- package/es/snackbar/style/index.mjs +1 -1
- package/es/varlet.esm.js +3446 -3443
- package/highlight/web-types.en-US.json +11 -2
- package/highlight/web-types.zh-CN.json +10 -1
- package/lib/varlet.cjs.js +11 -6
- package/package.json +7 -7
- package/types/picker.d.ts +2 -0
- package/umd/varlet.js +6 -6
|
@@ -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": "3.3.
|
|
4
|
+
"version": "3.3.11",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -5112,13 +5112,22 @@
|
|
|
5112
5112
|
},
|
|
5113
5113
|
{
|
|
5114
5114
|
"name": "option-count",
|
|
5115
|
-
"description": "Number of visible
|
|
5115
|
+
"description": "Number of visible columns",
|
|
5116
5116
|
"default": "6",
|
|
5117
5117
|
"value": {
|
|
5118
5118
|
"type": "string | number",
|
|
5119
5119
|
"kind": "expression"
|
|
5120
5120
|
}
|
|
5121
5121
|
},
|
|
5122
|
+
{
|
|
5123
|
+
"name": "columns-count",
|
|
5124
|
+
"description": "Number of visible columns",
|
|
5125
|
+
"default": "-",
|
|
5126
|
+
"value": {
|
|
5127
|
+
"type": "string | number",
|
|
5128
|
+
"kind": "expression"
|
|
5129
|
+
}
|
|
5130
|
+
},
|
|
5122
5131
|
{
|
|
5123
5132
|
"name": "confirm-button-text",
|
|
5124
5133
|
"description": "Confirm button text",
|
|
@@ -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": "3.3.
|
|
4
|
+
"version": "3.3.11",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -5278,6 +5278,15 @@
|
|
|
5278
5278
|
"kind": "expression"
|
|
5279
5279
|
}
|
|
5280
5280
|
},
|
|
5281
|
+
{
|
|
5282
|
+
"name": "columns-count",
|
|
5283
|
+
"description": "最大显示列数",
|
|
5284
|
+
"default": "-",
|
|
5285
|
+
"value": {
|
|
5286
|
+
"type": "string | number",
|
|
5287
|
+
"kind": "expression"
|
|
5288
|
+
}
|
|
5289
|
+
},
|
|
5281
5290
|
{
|
|
5282
5291
|
"name": "confirm-button-text",
|
|
5283
5292
|
"description": "确认按钮文字",
|
package/lib/varlet.cjs.js
CHANGED
|
@@ -19092,6 +19092,7 @@ const props$o = __spreadValues$7({
|
|
|
19092
19092
|
type: [Number, String],
|
|
19093
19093
|
default: 6
|
|
19094
19094
|
},
|
|
19095
|
+
columnsCount: [String, Number],
|
|
19095
19096
|
confirmButtonText: String,
|
|
19096
19097
|
cancelButtonText: String,
|
|
19097
19098
|
confirmButtonTextColor: String,
|
|
@@ -19336,6 +19337,7 @@ const __sfc__$v = vue.defineComponent({
|
|
|
19336
19337
|
setup(props2) {
|
|
19337
19338
|
const modelValue = useVModel(props2, "modelValue");
|
|
19338
19339
|
const scrollColumns = vue.ref([]);
|
|
19340
|
+
const visibleColumnsCount = vue.computed(() => toNumber(props2.columnsCount));
|
|
19339
19341
|
const optionHeight = vue.computed(() => toPxNum(props2.optionHeight));
|
|
19340
19342
|
const optionCount = vue.computed(() => toPxNum(props2.optionCount));
|
|
19341
19343
|
const center = vue.computed(() => optionCount.value * optionHeight.value / 2 - optionHeight.value / 2);
|
|
@@ -19362,7 +19364,8 @@ const __sfc__$v = vue.defineComponent({
|
|
|
19362
19364
|
prevIndexes = [...indexes];
|
|
19363
19365
|
}
|
|
19364
19366
|
function normalizeNormalMode(columns) {
|
|
19365
|
-
|
|
19367
|
+
const visibleColumns = props2.columnsCount != null ? columns.slice(0, visibleColumnsCount.value) : columns;
|
|
19368
|
+
return visibleColumns.map((column, idx) => {
|
|
19366
19369
|
const scrollColumn = {
|
|
19367
19370
|
id: sid$1++,
|
|
19368
19371
|
prevY: 0,
|
|
@@ -19388,9 +19391,9 @@ const __sfc__$v = vue.defineComponent({
|
|
|
19388
19391
|
createChildren(scrollColumns2, column);
|
|
19389
19392
|
return scrollColumns2;
|
|
19390
19393
|
}
|
|
19391
|
-
function createChildren(scrollColumns2, children, syncModelValue = true) {
|
|
19394
|
+
function createChildren(scrollColumns2, children, syncModelValue = true, depth = 1) {
|
|
19392
19395
|
var _a;
|
|
19393
|
-
if (children.length) {
|
|
19396
|
+
if (children.length && (props2.columnsCount == null || depth <= visibleColumnsCount.value)) {
|
|
19394
19397
|
const scrollColumn = {
|
|
19395
19398
|
id: sid$1++,
|
|
19396
19399
|
prevY: 0,
|
|
@@ -19414,7 +19417,8 @@ const __sfc__$v = vue.defineComponent({
|
|
|
19414
19417
|
createChildren(
|
|
19415
19418
|
scrollColumns2,
|
|
19416
19419
|
(_a = scrollColumn.column[scrollColumn.index][getOptionKey("children")]) != null ? _a : [],
|
|
19417
|
-
syncModelValue
|
|
19420
|
+
syncModelValue,
|
|
19421
|
+
depth + 1
|
|
19418
19422
|
);
|
|
19419
19423
|
}
|
|
19420
19424
|
}
|
|
@@ -19424,7 +19428,8 @@ const __sfc__$v = vue.defineComponent({
|
|
|
19424
19428
|
createChildren(
|
|
19425
19429
|
scrollColumns.value,
|
|
19426
19430
|
(_a = scrollColumn.column[scrollColumn.index][getOptionKey("children")]) != null ? _a : [],
|
|
19427
|
-
false
|
|
19431
|
+
false,
|
|
19432
|
+
scrollColumns.value.length + 1
|
|
19428
19433
|
);
|
|
19429
19434
|
}
|
|
19430
19435
|
function initScrollColumns() {
|
|
@@ -29114,7 +29119,7 @@ withInstall(stdin_default$1);
|
|
|
29114
29119
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
29115
29120
|
const _WatermarkComponent = stdin_default$1;
|
|
29116
29121
|
var stdin_default = stdin_default$1;
|
|
29117
|
-
const version = "3.3.
|
|
29122
|
+
const version = "3.3.11";
|
|
29118
29123
|
function install(app) {
|
|
29119
29124
|
stdin_default$5G.install && app.use(stdin_default$5G);
|
|
29120
29125
|
stdin_default$5E.install && app.use(stdin_default$5E);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.11",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/icons": "3.3.
|
|
52
|
-
"@varlet/shared": "3.3.
|
|
53
|
-
"@varlet/use": "3.3.
|
|
51
|
+
"@varlet/icons": "3.3.11",
|
|
52
|
+
"@varlet/shared": "3.3.11",
|
|
53
|
+
"@varlet/use": "3.3.11"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.21",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"typescript": "^5.1.5",
|
|
65
65
|
"vue": "3.4.21",
|
|
66
66
|
"vue-router": "4.2.0",
|
|
67
|
-
"@varlet/
|
|
68
|
-
"@varlet/
|
|
69
|
-
"@varlet/touch-emulator": "3.3.
|
|
67
|
+
"@varlet/ui": "3.3.11",
|
|
68
|
+
"@varlet/cli": "3.3.11",
|
|
69
|
+
"@varlet/touch-emulator": "3.3.11"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"dev": "varlet-cli dev",
|
package/types/picker.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface PickerProps {
|
|
|
24
24
|
cascade?: boolean
|
|
25
25
|
optionHeight?: string | number
|
|
26
26
|
optionCount?: string | number
|
|
27
|
+
columnsCount?: string | number
|
|
27
28
|
confirmButtonText?: string
|
|
28
29
|
cancelButtonText?: string
|
|
29
30
|
confirmButtonTextColor?: string
|
|
@@ -70,6 +71,7 @@ export interface PickerOptions {
|
|
|
70
71
|
cascade?: boolean
|
|
71
72
|
optionHeight?: number | string
|
|
72
73
|
optionCount?: number | string
|
|
74
|
+
columnsCount?: number | string
|
|
73
75
|
confirmButtonText?: string
|
|
74
76
|
cancelButtonText?: string
|
|
75
77
|
confirmButtonTextColor?: string
|