kui-vue 6.3.1 → 6.5.0
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/ai/kui-components.json +619 -37
- package/dist/index.js +2 -2
- package/es/index.js +1575 -647
- package/es/locale/de.js +2 -3
- package/es/locale/el.js +2 -3
- package/es/locale/en.js +2 -3
- package/es/locale/fr.js +2 -3
- package/es/locale/it.js +2 -3
- package/es/locale/ja.js +2 -3
- package/es/locale/ko.js +2 -3
- package/es/locale/ru.js +2 -3
- package/es/locale/th.js +2 -3
- package/es/locale/uk.js +2 -3
- package/es/locale/vi.js +2 -3
- package/es/locale/zh-CN.js +2 -3
- package/es/locale/zh-TW.js +2 -3
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +1 -1
- package/lib/locale/el.cjs +1 -1
- package/lib/locale/en.cjs +1 -1
- package/lib/locale/fr.cjs +1 -1
- package/lib/locale/it.cjs +1 -1
- package/lib/locale/ja.cjs +1 -1
- package/lib/locale/ko.cjs +1 -1
- package/lib/locale/ru.cjs +1 -1
- package/lib/locale/th.cjs +1 -1
- package/lib/locale/uk.cjs +1 -1
- package/lib/locale/vi.cjs +1 -1
- package/lib/locale/zh-CN.cjs +1 -1
- package/lib/locale/zh-TW.cjs +1 -1
- package/package.json +22 -22
- package/style/base.css +1 -1
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/motion.css +1 -1
- package/style/theme.css +1 -1
- package/types/color-picker/index.d.cts +5 -0
- package/types/color-picker/index.d.ts +5 -0
- package/types/components.d.cts +3 -0
- package/types/components.d.ts +3 -0
- package/types/global.d.cts +16 -0
- package/types/global.d.ts +16 -0
- package/types/gradient-picker/corners.d.cts +39 -0
- package/types/gradient-picker/corners.d.ts +39 -0
- package/types/gradient-picker/index.d.cts +87 -0
- package/types/gradient-picker/index.d.ts +87 -0
- package/types/gradient-picker/stops.d.cts +39 -0
- package/types/gradient-picker/stops.d.ts +39 -0
- package/types/gradient-picker/types.d.cts +34 -0
- package/types/gradient-picker/types.d.ts +34 -0
- package/types/input-number/drag.d.cts +9 -0
- package/types/input-number/drag.d.ts +9 -0
- package/types/input-number/index.d.cts +13 -0
- package/types/input-number/index.d.ts +13 -0
- package/types/menu/menu-context.d.cts +1 -0
- package/types/menu/menu-context.d.ts +1 -0
- package/types/menu/menu.d.cts +13 -0
- package/types/menu/menu.d.ts +13 -0
- package/types/popconfirm/index.d.cts +3 -0
- package/types/popconfirm/index.d.ts +3 -0
- package/types/poptip/index.d.cts +3 -0
- package/types/poptip/index.d.ts +3 -0
- package/types/popup/index.d.cts +4 -0
- package/types/popup/index.d.ts +4 -0
- package/types/segmented/index.d.cts +2 -2
- package/types/segmented/index.d.ts +2 -2
- package/types/splitter/controller.d.cts +49 -0
- package/types/splitter/controller.d.ts +49 -0
- package/types/splitter/splitter-panel.d.cts +37 -2
- package/types/splitter/splitter-panel.d.ts +37 -2
- package/types/splitter/splitter.d.cts +24 -5
- package/types/splitter/splitter.d.ts +24 -5
- package/types/tooltip/index.d.cts +3 -0
- package/types/tooltip/index.d.ts +3 -0
- package/types/utils/placement.d.cts +2 -1
- package/types/utils/placement.d.ts +2 -1
- package/types/utils/popup-arrow.d.cts +5 -0
- package/types/utils/popup-arrow.d.ts +5 -0
- package/vetur/attributes.json +340 -12
- package/vetur/tags.json +90 -4
- package/vetur/web-types.json +489 -13
package/ai/kui-components.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://k-ui.cn/schema/kui-components.schema.json",
|
|
3
3
|
"library": "kui-vue",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.5.0",
|
|
5
5
|
"homepage": "https://k-ui.cn",
|
|
6
6
|
"components": [
|
|
7
7
|
{
|
|
@@ -190,6 +190,20 @@
|
|
|
190
190
|
"required": false,
|
|
191
191
|
"documented": true
|
|
192
192
|
},
|
|
193
|
+
{
|
|
194
|
+
"name": "arrowPointAtCenter",
|
|
195
|
+
"description": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
196
|
+
"descriptionZh": "让箭头中心指向触发器中心;默认按面板边缘或中心对齐,需有箭头时才生效",
|
|
197
|
+
"descriptionEn": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
198
|
+
"type": "boolean | undefined",
|
|
199
|
+
"boolean": true,
|
|
200
|
+
"enumValues": [
|
|
201
|
+
false,
|
|
202
|
+
true
|
|
203
|
+
],
|
|
204
|
+
"required": false,
|
|
205
|
+
"documented": true
|
|
206
|
+
},
|
|
193
207
|
{
|
|
194
208
|
"name": "offset",
|
|
195
209
|
"description": "Position offset in pixels",
|
|
@@ -567,7 +581,7 @@
|
|
|
567
581
|
{
|
|
568
582
|
"title": "方位与箭头",
|
|
569
583
|
"file": "components/popup/demo/placement.vue",
|
|
570
|
-
"source": "<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Button, Checkbox, Popup, Space } from \"kui-vue\";\nconst arrow = ref(true);\nconst placements = [\n \"top-left\",\n \"top\",\n \"top-right\",\n \"bottom-left\",\n \"bottom\",\n \"bottom-right\",\n \"left-top\",\n \"left\",\n \"left-bottom\",\n \"right-top\",\n \"right\",\n \"right-bottom\",\n] as const;\n</script>\n<template>\n <Space vertical>\n <Checkbox v-model=\"arrow\">Show arrow</Checkbox>\n <div\n style=\"\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n max-width: 420px;\n \"\n >\n <Popup\n v-for=\"placement in placements\"\n :key=\"placement\"\n :placement=\"placement\"\n :arrow=\"arrow\"\n :offset=\"10\"\n >\n <Button>{{ placement }}</Button>\n <template #overlay>{{ placement }}</template>\n </Popup>\n </div>\n </Space>\n</template>"
|
|
584
|
+
"source": "<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Button, Checkbox, Popup, Space } from \"kui-vue\";\nconst arrow = ref(true);\nconst arrowPointAtCenter = ref(false);\nconst placements = [\n \"top-left\",\n \"top\",\n \"top-right\",\n \"bottom-left\",\n \"bottom\",\n \"bottom-right\",\n \"left-top\",\n \"left\",\n \"left-bottom\",\n \"right-top\",\n \"right\",\n \"right-bottom\",\n] as const;\n</script>\n<template>\n <Space vertical>\n <Checkbox v-model=\"arrow\">Show arrow</Checkbox>\n <Checkbox v-model=\"arrowPointAtCenter\">Point arrow at trigger center</Checkbox>\n <div\n style=\"\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n max-width: 420px;\n \"\n >\n <Popup\n v-for=\"placement in placements\"\n :key=\"placement\"\n :placement=\"placement\"\n :arrow=\"arrow\"\n :arrow-point-at-center=\"arrowPointAtCenter\"\n :offset=\"10\"\n >\n <Button>{{ placement }}</Button>\n <template #overlay>{{ placement }}</template>\n </Popup>\n </div>\n </Space>\n</template>"
|
|
571
585
|
},
|
|
572
586
|
{
|
|
573
587
|
"title": "受控开关与实例方法",
|
|
@@ -5264,6 +5278,20 @@
|
|
|
5264
5278
|
"required": false,
|
|
5265
5279
|
"documented": true
|
|
5266
5280
|
},
|
|
5281
|
+
{
|
|
5282
|
+
"name": "arrowPointAtCenter",
|
|
5283
|
+
"description": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
5284
|
+
"descriptionZh": "让箭头中心指向触发器中心;默认按面板边缘或中心对齐,需有箭头时才生效",
|
|
5285
|
+
"descriptionEn": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
5286
|
+
"type": "boolean | undefined",
|
|
5287
|
+
"boolean": true,
|
|
5288
|
+
"enumValues": [
|
|
5289
|
+
false,
|
|
5290
|
+
true
|
|
5291
|
+
],
|
|
5292
|
+
"required": false,
|
|
5293
|
+
"documented": true
|
|
5294
|
+
},
|
|
5267
5295
|
{
|
|
5268
5296
|
"name": "panelOnly",
|
|
5269
5297
|
"description": "Render only the color panel without the trigger input",
|
|
@@ -5495,6 +5523,285 @@
|
|
|
5495
5523
|
}
|
|
5496
5524
|
]
|
|
5497
5525
|
},
|
|
5526
|
+
{
|
|
5527
|
+
"name": "GradientPicker",
|
|
5528
|
+
"behavior": {
|
|
5529
|
+
"rules": []
|
|
5530
|
+
},
|
|
5531
|
+
"models": [
|
|
5532
|
+
{
|
|
5533
|
+
"prop": "modelValue",
|
|
5534
|
+
"event": "update:modelValue",
|
|
5535
|
+
"directive": "v-model"
|
|
5536
|
+
},
|
|
5537
|
+
{
|
|
5538
|
+
"prop": "mode",
|
|
5539
|
+
"event": "update:mode",
|
|
5540
|
+
"directive": "v-model:mode"
|
|
5541
|
+
}
|
|
5542
|
+
],
|
|
5543
|
+
"tags": [
|
|
5544
|
+
"GradientPicker",
|
|
5545
|
+
"KGradientPicker",
|
|
5546
|
+
"k-gradient-picker",
|
|
5547
|
+
"gradient-picker"
|
|
5548
|
+
],
|
|
5549
|
+
"children": [],
|
|
5550
|
+
"documentation": "https://k-ui.cn/components/gradient-picker",
|
|
5551
|
+
"props": [
|
|
5552
|
+
{
|
|
5553
|
+
"name": "type",
|
|
5554
|
+
"description": "Gradient type: `linear` for multi-stop, `corner` for four corners",
|
|
5555
|
+
"descriptionZh": "渐变类型,`linear` 为多色标渐变,`corner` 为四角渐变",
|
|
5556
|
+
"descriptionEn": "Gradient type: `linear` for multi-stop, `corner` for four corners",
|
|
5557
|
+
"type": "GradientType",
|
|
5558
|
+
"boolean": false,
|
|
5559
|
+
"enumValues": [
|
|
5560
|
+
"linear",
|
|
5561
|
+
"corner"
|
|
5562
|
+
],
|
|
5563
|
+
"required": false,
|
|
5564
|
+
"defaultExpression": "\"linear\"",
|
|
5565
|
+
"documented": true
|
|
5566
|
+
},
|
|
5567
|
+
{
|
|
5568
|
+
"name": "arrowPointAtCenter",
|
|
5569
|
+
"description": "Point the color-panel arrow at the stop or corner center; disable to align panel edges",
|
|
5570
|
+
"descriptionZh": "让颜色面板箭头指向色标或角标中心;关闭后按面板边缘对齐",
|
|
5571
|
+
"descriptionEn": "Point the color-panel arrow at the stop or corner center; disable to align panel edges",
|
|
5572
|
+
"type": "boolean",
|
|
5573
|
+
"boolean": true,
|
|
5574
|
+
"enumValues": [
|
|
5575
|
+
false,
|
|
5576
|
+
true
|
|
5577
|
+
],
|
|
5578
|
+
"required": false,
|
|
5579
|
+
"defaultExpression": "true",
|
|
5580
|
+
"documented": true
|
|
5581
|
+
},
|
|
5582
|
+
{
|
|
5583
|
+
"name": "mode",
|
|
5584
|
+
"description": "Presentation of the color panel input: `hex`, `rgb` or `hsl`",
|
|
5585
|
+
"descriptionZh": "颜色面板输入区的展示类型,提供 3 种模式(`hex`、`rgb`、`hsl`)",
|
|
5586
|
+
"descriptionEn": "Presentation of the color panel input: `hex`, `rgb` or `hsl`",
|
|
5587
|
+
"type": "ColorMode",
|
|
5588
|
+
"boolean": false,
|
|
5589
|
+
"enumValues": [
|
|
5590
|
+
"hex",
|
|
5591
|
+
"rgb",
|
|
5592
|
+
"hsl"
|
|
5593
|
+
],
|
|
5594
|
+
"required": false,
|
|
5595
|
+
"defaultExpression": "\"hex\"",
|
|
5596
|
+
"documented": true
|
|
5597
|
+
},
|
|
5598
|
+
{
|
|
5599
|
+
"name": "disabled",
|
|
5600
|
+
"description": "Disabled state",
|
|
5601
|
+
"descriptionZh": "是否失效状态",
|
|
5602
|
+
"descriptionEn": "Disabled state",
|
|
5603
|
+
"type": "boolean | undefined",
|
|
5604
|
+
"boolean": true,
|
|
5605
|
+
"enumValues": [
|
|
5606
|
+
false,
|
|
5607
|
+
true
|
|
5608
|
+
],
|
|
5609
|
+
"required": false,
|
|
5610
|
+
"documented": true
|
|
5611
|
+
},
|
|
5612
|
+
{
|
|
5613
|
+
"name": "modelValue",
|
|
5614
|
+
"description": "Gradient value, supports `v-model` two-way binding",
|
|
5615
|
+
"descriptionZh": "渐变值,可以使用 `v-model` 双向绑定",
|
|
5616
|
+
"descriptionEn": "Gradient value, supports `v-model` two-way binding",
|
|
5617
|
+
"type": "GradientValue | undefined",
|
|
5618
|
+
"boolean": false,
|
|
5619
|
+
"required": false,
|
|
5620
|
+
"documented": true
|
|
5621
|
+
},
|
|
5622
|
+
{
|
|
5623
|
+
"name": "value",
|
|
5624
|
+
"description": "Initial value, read once during initialization; later updates use modelValue, which wins when both are passed",
|
|
5625
|
+
"descriptionZh": "初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。",
|
|
5626
|
+
"descriptionEn": "Initial value, read once during initialization; later updates use modelValue, which wins when both are passed",
|
|
5627
|
+
"type": "GradientValue | undefined",
|
|
5628
|
+
"boolean": false,
|
|
5629
|
+
"required": false,
|
|
5630
|
+
"documented": true
|
|
5631
|
+
},
|
|
5632
|
+
{
|
|
5633
|
+
"name": "readonly",
|
|
5634
|
+
"description": "Read-only; stops cannot be dragged and the color panel cannot open",
|
|
5635
|
+
"descriptionZh": "是否只读,不能拖动色标或打开颜色面板",
|
|
5636
|
+
"descriptionEn": "Read-only; stops cannot be dragged and the color panel cannot open",
|
|
5637
|
+
"type": "boolean | undefined",
|
|
5638
|
+
"boolean": true,
|
|
5639
|
+
"enumValues": [
|
|
5640
|
+
false,
|
|
5641
|
+
true
|
|
5642
|
+
],
|
|
5643
|
+
"required": false,
|
|
5644
|
+
"documented": true
|
|
5645
|
+
},
|
|
5646
|
+
{
|
|
5647
|
+
"name": "size",
|
|
5648
|
+
"description": "Control size, same three tiers as other controls; the bar plus its stops, or the corner block, add up to the height of the matching control",
|
|
5649
|
+
"descriptionZh": "控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致",
|
|
5650
|
+
"descriptionEn": "Control size, same three tiers as other controls; the bar plus its stops, or the corner block, add up to the height of the matching control",
|
|
5651
|
+
"type": "SizeType | undefined",
|
|
5652
|
+
"boolean": false,
|
|
5653
|
+
"enumValues": [
|
|
5654
|
+
"small",
|
|
5655
|
+
"medium",
|
|
5656
|
+
"large"
|
|
5657
|
+
],
|
|
5658
|
+
"required": false,
|
|
5659
|
+
"documented": true
|
|
5660
|
+
},
|
|
5661
|
+
{
|
|
5662
|
+
"name": "alpha",
|
|
5663
|
+
"description": "Show the transparency control in the color panel",
|
|
5664
|
+
"descriptionZh": "颜色面板是否提供透明度调节",
|
|
5665
|
+
"descriptionEn": "Show the transparency control in the color panel",
|
|
5666
|
+
"type": "boolean | undefined",
|
|
5667
|
+
"boolean": true,
|
|
5668
|
+
"enumValues": [
|
|
5669
|
+
false,
|
|
5670
|
+
true
|
|
5671
|
+
],
|
|
5672
|
+
"required": false,
|
|
5673
|
+
"documented": true
|
|
5674
|
+
},
|
|
5675
|
+
{
|
|
5676
|
+
"name": "onUpdate:modelValue",
|
|
5677
|
+
"description": "Requests a new modelValue value (Gradient value, supports `v-model` two-way binding); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
5678
|
+
"descriptionZh": "请求更新 modelValue(渐变值,可以使用 `v-model` 双向绑定),参数为更新后的值。使用 v-model 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
5679
|
+
"descriptionEn": "Requests a new modelValue value (Gradient value, supports `v-model` two-way binding); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
5680
|
+
"type": "(value: GradientValue) => void",
|
|
5681
|
+
"eventName": "update:modelValue",
|
|
5682
|
+
"boolean": false,
|
|
5683
|
+
"documented": false
|
|
5684
|
+
},
|
|
5685
|
+
{
|
|
5686
|
+
"name": "onUpdate:mode",
|
|
5687
|
+
"description": "Requests a new mode value (Presentation of the color panel input: `hex`, `rgb` or `hsl`); the payload is the new value. With v-model:mode, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
5688
|
+
"descriptionZh": "请求更新 mode(颜色面板输入区的展示类型,提供 3 种模式(`hex`、`rgb`、`hsl`)),参数为更新后的值。使用 v-model:mode 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
5689
|
+
"descriptionEn": "Requests a new mode value (Presentation of the color panel input: `hex`, `rgb` or `hsl`); the payload is the new value. With v-model:mode, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
5690
|
+
"type": "(mode: ColorMode) => void",
|
|
5691
|
+
"eventName": "update:mode",
|
|
5692
|
+
"boolean": false,
|
|
5693
|
+
"documented": false
|
|
5694
|
+
},
|
|
5695
|
+
{
|
|
5696
|
+
"name": "onChange",
|
|
5697
|
+
"description": "Called when the gradient changes; the argument is the new value (a stop list for `linear`, four colors for `corner`)",
|
|
5698
|
+
"descriptionZh": "渐变值改变时触发,参数是新的渐变值(线性档为色标数组,四角档为四色数组)",
|
|
5699
|
+
"descriptionEn": "Called when the gradient changes; the argument is the new value (a stop list for `linear`, four colors for `corner`)",
|
|
5700
|
+
"type": "(value: GradientValue) => void",
|
|
5701
|
+
"eventName": "change",
|
|
5702
|
+
"boolean": false,
|
|
5703
|
+
"documented": true
|
|
5704
|
+
}
|
|
5705
|
+
],
|
|
5706
|
+
"events": [
|
|
5707
|
+
{
|
|
5708
|
+
"name": "update:modelValue",
|
|
5709
|
+
"type": "(value: GradientValue) => void",
|
|
5710
|
+
"description": "Requests a new modelValue value (Gradient value, supports `v-model` two-way binding); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
5711
|
+
"descriptionZh": "请求更新 modelValue(渐变值,可以使用 `v-model` 双向绑定),参数为更新后的值。使用 v-model 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
5712
|
+
"descriptionEn": "Requests a new modelValue value (Gradient value, supports `v-model` two-way binding); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed."
|
|
5713
|
+
},
|
|
5714
|
+
{
|
|
5715
|
+
"name": "update:mode",
|
|
5716
|
+
"type": "(mode: ColorMode) => void",
|
|
5717
|
+
"description": "Requests a new mode value (Presentation of the color panel input: `hex`, `rgb` or `hsl`); the payload is the new value. With v-model:mode, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
5718
|
+
"descriptionZh": "请求更新 mode(颜色面板输入区的展示类型,提供 3 种模式(`hex`、`rgb`、`hsl`)),参数为更新后的值。使用 v-model:mode 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
5719
|
+
"descriptionEn": "Requests a new mode value (Presentation of the color panel input: `hex`, `rgb` or `hsl`); the payload is the new value. With v-model:mode, Vue synchronizes the binding automatically; no additional update handler is needed."
|
|
5720
|
+
},
|
|
5721
|
+
{
|
|
5722
|
+
"name": "change",
|
|
5723
|
+
"type": "(value: GradientValue) => void",
|
|
5724
|
+
"description": "Called when the gradient changes; the argument is the new value (a stop list for `linear`, four colors for `corner`)",
|
|
5725
|
+
"descriptionZh": "渐变值改变时触发,参数是新的渐变值(线性档为色标数组,四角档为四色数组)",
|
|
5726
|
+
"descriptionEn": "Called when the gradient changes; the argument is the new value (a stop list for `linear`, four colors for `corner`)"
|
|
5727
|
+
}
|
|
5728
|
+
],
|
|
5729
|
+
"slots": [],
|
|
5730
|
+
"examples": [
|
|
5731
|
+
{
|
|
5732
|
+
"title": "基本用法",
|
|
5733
|
+
"file": "components/gradient-picker/demo/basic.vue",
|
|
5734
|
+
"source": "<template>\n <Space vertical>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"value\" alpha @change=\"onChange\" />\n </div>\n <code>linear: {{ linear }}</code>\n <code>radial: {{ radial }}</code>\n <div class=\"gradient-picker-demo\">\n <GradientPicker :model-value=\"value\" disabled />\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { formatGradient, type GradientStop, type GradientValue } from \"kui-vue\";\n\nconst value = ref<GradientValue>([\n { color: \"#ffd166\", offset: 0 },\n { color: \"#ef476f\", offset: 55 },\n { color: \"#118ab2\", offset: 100 },\n]);\nconst stopsText = (stops: GradientStop[]) =>\n stops.map((stop) => `${stop.color} ${stop.offset}%`).join(\", \");\nconst linear = ref(formatGradient(value.value));\nconst radial = ref(`radial-gradient(circle, ${stopsText(value.value as GradientStop[])})`);\n\nconst onChange = (next: GradientValue) => {\n linear.value = formatGradient(next);\n radial.value = `radial-gradient(circle, ${stopsText(next as GradientStop[])})`;\n};\n</script>\n\n<style scoped>\n.gradient-picker-demo {\n width: 360px;\n}\n</style>"
|
|
5735
|
+
},
|
|
5736
|
+
{
|
|
5737
|
+
"title": "四角渐变",
|
|
5738
|
+
"file": "components/gradient-picker/demo/corner.vue",
|
|
5739
|
+
"source": "<template>\n <Space vertical>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"corner\" type=\"corner\" @change=\"onChange\" />\n </div>\n <code>colors: {{ colors }}</code>\n <div class=\"gradient-picker-demo\">\n <GradientPicker :model-value=\"corner\" type=\"corner\" disabled />\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { CornerGradientValue, GradientValue } from \"kui-vue\";\n\nconst corner = ref<GradientValue>([\"#ffffff\", \"#a9f0d1\", \"#5fe08a\", \"#3cbf6b\"]);\nconst colors = ref((corner.value as CornerGradientValue).join(\", \"));\n\nconst onChange = (next: GradientValue) => {\n colors.value = (next as CornerGradientValue).join(\", \");\n};\n</script>\n\n<style scoped>\n.gradient-picker-demo {\n width: 360px;\n}\n</style>"
|
|
5740
|
+
},
|
|
5741
|
+
{
|
|
5742
|
+
"title": "三种尺寸",
|
|
5743
|
+
"file": "components/gradient-picker/demo/sizes.vue",
|
|
5744
|
+
"source": "<template>\n <Space vertical>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"small\" size=\"small\" />\n </div>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"medium\" size=\"medium\" />\n </div>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"large\" size=\"large\" />\n </div>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"cornerSmall\" type=\"corner\" size=\"small\" />\n </div>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"cornerMedium\" type=\"corner\" size=\"medium\" />\n </div>\n <div class=\"gradient-picker-demo\">\n <GradientPicker v-model=\"cornerLarge\" type=\"corner\" size=\"large\" />\n </div>\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { GradientValue } from \"kui-vue\";\n\nconst create = (): GradientValue => [\n { color: \"#ffd166\", offset: 0 },\n { color: \"#ef476f\", offset: 55 },\n { color: \"#118ab2\", offset: 100 },\n];\n\nconst createCorner = (): GradientValue => [\"#ffd166\", \"#ef476f\", \"#118ab2\", \"#06d6a0\"];\n\nconst small = ref(create());\nconst medium = ref(create());\nconst large = ref(create());\nconst cornerSmall = ref(createCorner());\nconst cornerMedium = ref(createCorner());\nconst cornerLarge = ref(createCorner());\n</script>\n\n<style scoped>\n.gradient-picker-demo {\n width: 360px;\n}\n</style>"
|
|
5745
|
+
}
|
|
5746
|
+
]
|
|
5747
|
+
},
|
|
5748
|
+
{
|
|
5749
|
+
"name": "createCornerGradient",
|
|
5750
|
+
"behavior": {
|
|
5751
|
+
"rules": []
|
|
5752
|
+
},
|
|
5753
|
+
"models": [],
|
|
5754
|
+
"tags": [
|
|
5755
|
+
"createCornerGradient",
|
|
5756
|
+
"KcreateCornerGradient",
|
|
5757
|
+
"k-create-corner-gradient",
|
|
5758
|
+
"create-corner-gradient"
|
|
5759
|
+
],
|
|
5760
|
+
"children": [],
|
|
5761
|
+
"documentation": "https://k-ui.cn/components/create-corner-gradient",
|
|
5762
|
+
"props": [],
|
|
5763
|
+
"events": [],
|
|
5764
|
+
"slots": [],
|
|
5765
|
+
"examples": []
|
|
5766
|
+
},
|
|
5767
|
+
{
|
|
5768
|
+
"name": "createLinearGradient",
|
|
5769
|
+
"behavior": {
|
|
5770
|
+
"rules": []
|
|
5771
|
+
},
|
|
5772
|
+
"models": [],
|
|
5773
|
+
"tags": [
|
|
5774
|
+
"createLinearGradient",
|
|
5775
|
+
"KcreateLinearGradient",
|
|
5776
|
+
"k-create-linear-gradient",
|
|
5777
|
+
"create-linear-gradient"
|
|
5778
|
+
],
|
|
5779
|
+
"children": [],
|
|
5780
|
+
"documentation": "https://k-ui.cn/components/create-linear-gradient",
|
|
5781
|
+
"props": [],
|
|
5782
|
+
"events": [],
|
|
5783
|
+
"slots": [],
|
|
5784
|
+
"examples": []
|
|
5785
|
+
},
|
|
5786
|
+
{
|
|
5787
|
+
"name": "formatGradient",
|
|
5788
|
+
"behavior": {
|
|
5789
|
+
"rules": []
|
|
5790
|
+
},
|
|
5791
|
+
"models": [],
|
|
5792
|
+
"tags": [
|
|
5793
|
+
"formatGradient",
|
|
5794
|
+
"KformatGradient",
|
|
5795
|
+
"k-format-gradient",
|
|
5796
|
+
"format-gradient"
|
|
5797
|
+
],
|
|
5798
|
+
"children": [],
|
|
5799
|
+
"documentation": "https://k-ui.cn/components/format-gradient",
|
|
5800
|
+
"props": [],
|
|
5801
|
+
"events": [],
|
|
5802
|
+
"slots": [],
|
|
5803
|
+
"examples": []
|
|
5804
|
+
},
|
|
5498
5805
|
{
|
|
5499
5806
|
"name": "DatePickerPanel",
|
|
5500
5807
|
"behavior": {
|
|
@@ -10003,6 +10310,21 @@
|
|
|
10003
10310
|
"defaultExpression": "\"fill\"",
|
|
10004
10311
|
"documented": true
|
|
10005
10312
|
},
|
|
10313
|
+
{
|
|
10314
|
+
"name": "draggable",
|
|
10315
|
+
"description": "Allow dragging inside the input to adjust the value quickly",
|
|
10316
|
+
"descriptionZh": "是否允许在输入框内拖动快速调节数值",
|
|
10317
|
+
"descriptionEn": "Allow dragging inside the input to adjust the value quickly",
|
|
10318
|
+
"type": "boolean",
|
|
10319
|
+
"boolean": true,
|
|
10320
|
+
"enumValues": [
|
|
10321
|
+
false,
|
|
10322
|
+
true
|
|
10323
|
+
],
|
|
10324
|
+
"required": false,
|
|
10325
|
+
"defaultExpression": "true",
|
|
10326
|
+
"documented": true
|
|
10327
|
+
},
|
|
10006
10328
|
{
|
|
10007
10329
|
"name": "max",
|
|
10008
10330
|
"description": "Maximum value",
|
|
@@ -10348,6 +10670,11 @@
|
|
|
10348
10670
|
"file": "components/input-number/demo/ffix.vue",
|
|
10349
10671
|
"source": "<template>\n <Space block vertical>\n <InputNumber placeholder=\"Please input amount\" suffix=\"元\" prefix=\"¥\" />\n <InputNumber placeholder=\"Please input amount\" :step=\"50\" suffix=\"元\" prefix=\"充值\" />\n <InputNumber placeholder=\"Please input amount\" suffix=\".00\" />\n </Space>\n <Divider text=\"addons\" />\n <Space block vertical>\n <InputNumber placeholder=\"Please input amount\" addon-before=\"¥\" addon-after=\"RMB\" />\n <InputNumber placeholder=\"Please input weight\" addon-after=\"kg\" />\n </Space>\n <Divider text=\"slot\" />\n <Space vertical block>\n <InputNumber placeholder=\"请填写您的薪资\" :icon=\"LogoYen\">\n <template #addonAfter>\n <Tooltip title=\"此处如果不知道怎么填,请咨询管理员\">\n <Button :icon=\"CircleQuestionMark\" />\n </Tooltip>\n </template>\n </InputNumber>\n <InputNumber placeholder=\"Please input amount\">\n <template #addonBefore>\n <Button :icon=\"UserPlus\" />\n </template>\n <template #addonAfter>\n <Button>Top up</Button>\n </template>\n </InputNumber>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { CircleQuestionMark, LogoYen, UserPlus } from \"kui-icons\";\n</script>"
|
|
10350
10672
|
},
|
|
10673
|
+
{
|
|
10674
|
+
"title": "拖动调节",
|
|
10675
|
+
"file": "components/input-number/demo/drag.vue",
|
|
10676
|
+
"source": "<template>\n <Space vertical block style=\"max-width: 280px\">\n <span>Drag inside the input left or right; click to type, double-click to select.</span>\n <InputNumber v-model=\"amount\" :min=\"0\" :max=\"10000\" addon-after=\"USD\" />\n <InputNumber v-model=\"decimal\" :step=\"0.01\" :precision=\"2\" :min=\"0\" :max=\"100\" />\n <InputNumber :value=\"10\" :draggable=\"false\" placeholder=\"Drag disabled\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst amount = ref<number | undefined>(100);\nconst decimal = ref<number | undefined>(1.25);\n</script>"
|
|
10677
|
+
},
|
|
10351
10678
|
{
|
|
10352
10679
|
"title": "尺寸",
|
|
10353
10680
|
"file": "components/input-number/demo/size.vue",
|
|
@@ -10681,6 +11008,17 @@
|
|
|
10681
11008
|
"defaultExpression": "true",
|
|
10682
11009
|
"documented": true
|
|
10683
11010
|
},
|
|
11011
|
+
{
|
|
11012
|
+
"name": "subMenuOpenDelay",
|
|
11013
|
+
"description": "Hover-open delay for popup submenus in milliseconds; passing over does not open them. Set to 0 for immediate opening. Keyboard and inline click interactions remain immediate",
|
|
11014
|
+
"descriptionZh": "弹出式子菜单的鼠标悬停展开延迟(毫秒),快速经过不展开;设为 0 可立即展开,不影响键盘操作或 inline 点击展开",
|
|
11015
|
+
"descriptionEn": "Hover-open delay for popup submenus in milliseconds; passing over does not open them. Set to 0 for immediate opening. Keyboard and inline click interactions remain immediate",
|
|
11016
|
+
"type": "number",
|
|
11017
|
+
"boolean": false,
|
|
11018
|
+
"required": false,
|
|
11019
|
+
"defaultExpression": "200",
|
|
11020
|
+
"documented": true
|
|
11021
|
+
},
|
|
10684
11022
|
{
|
|
10685
11023
|
"name": "theme",
|
|
10686
11024
|
"description": "Local theme; inherits global theme when omitted",
|
|
@@ -12501,6 +12839,20 @@
|
|
|
12501
12839
|
"required": false,
|
|
12502
12840
|
"documented": true
|
|
12503
12841
|
},
|
|
12842
|
+
{
|
|
12843
|
+
"name": "arrowPointAtCenter",
|
|
12844
|
+
"description": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
12845
|
+
"descriptionZh": "让箭头中心指向触发器中心;默认按面板边缘或中心对齐,需有箭头时才生效",
|
|
12846
|
+
"descriptionEn": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
12847
|
+
"type": "boolean | undefined",
|
|
12848
|
+
"boolean": true,
|
|
12849
|
+
"enumValues": [
|
|
12850
|
+
false,
|
|
12851
|
+
true
|
|
12852
|
+
],
|
|
12853
|
+
"required": false,
|
|
12854
|
+
"documented": true
|
|
12855
|
+
},
|
|
12504
12856
|
{
|
|
12505
12857
|
"name": "panelOnly",
|
|
12506
12858
|
"description": "Render only the popover panel without a trigger",
|
|
@@ -12689,6 +13041,20 @@
|
|
|
12689
13041
|
"defaultExpression": "true",
|
|
12690
13042
|
"documented": true
|
|
12691
13043
|
},
|
|
13044
|
+
{
|
|
13045
|
+
"name": "arrowPointAtCenter",
|
|
13046
|
+
"description": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
13047
|
+
"descriptionZh": "让箭头中心指向触发器中心;默认按面板边缘或中心对齐,需有箭头时才生效",
|
|
13048
|
+
"descriptionEn": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
13049
|
+
"type": "boolean | undefined",
|
|
13050
|
+
"boolean": true,
|
|
13051
|
+
"enumValues": [
|
|
13052
|
+
false,
|
|
13053
|
+
true
|
|
13054
|
+
],
|
|
13055
|
+
"required": false,
|
|
13056
|
+
"documented": true
|
|
13057
|
+
},
|
|
12692
13058
|
{
|
|
12693
13059
|
"name": "panelOnly",
|
|
12694
13060
|
"description": "Render only the confirmation panel without a trigger",
|
|
@@ -14344,7 +14710,7 @@
|
|
|
14344
14710
|
{
|
|
14345
14711
|
"title": "带图标的选项",
|
|
14346
14712
|
"file": "components/segmented/demo/icon.vue",
|
|
14347
|
-
"source": "<template>\n <Segmented v-model=\"device\" :options=\"options\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { Monitor, Smartphone, Tablet } from \"kui-icons\";\nimport { ref } from \"vue\";\n\nconst device = ref(\"desktop\");\nconst options = [\n { label: \"Desktop\", value: \"desktop\", icon: Monitor },\n { label: \"Tablet\", value: \"tablet\", icon: Tablet },\n { label: \"Mobile\", value: \"mobile\", icon: Smartphone },\n];\n</script>"
|
|
14713
|
+
"source": "<template>\n <Space vertical>\n <Segmented v-model=\"device\" :options=\"options\" />\n <Segmented v-model=\"layout\" :options=\"layoutOptions\" aria-label=\"Layout\" />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { Monitor, Smartphone, Tablet, List, LayoutGrid } from \"kui-icons\";\nimport { ref } from \"vue\";\n\nconst device = ref(\"desktop\");\nconst layout = ref(\"list\");\nconst layoutOptions = [\n { value: \"list\", icon: List },\n { value: \"grid\", icon: LayoutGrid },\n];\nconst options = [\n { label: \"Desktop\", value: \"desktop\", icon: Monitor },\n { label: \"Tablet\", value: \"tablet\", icon: Tablet },\n { label: \"Mobile\", value: \"mobile\", icon: Smartphone },\n];\n</script>"
|
|
14348
14714
|
},
|
|
14349
14715
|
{
|
|
14350
14716
|
"title": "自定义标签",
|
|
@@ -17799,7 +18165,13 @@
|
|
|
17799
18165
|
"behavior": {
|
|
17800
18166
|
"rules": []
|
|
17801
18167
|
},
|
|
17802
|
-
"models": [
|
|
18168
|
+
"models": [
|
|
18169
|
+
{
|
|
18170
|
+
"prop": "modelValue",
|
|
18171
|
+
"event": "update:modelValue",
|
|
18172
|
+
"directive": "v-model"
|
|
18173
|
+
}
|
|
18174
|
+
],
|
|
17803
18175
|
"tags": [
|
|
17804
18176
|
"Splitter",
|
|
17805
18177
|
"KSplitter",
|
|
@@ -17811,27 +18183,94 @@
|
|
|
17811
18183
|
],
|
|
17812
18184
|
"documentation": "https://k-ui.cn/components/splitter",
|
|
17813
18185
|
"props": [
|
|
18186
|
+
{
|
|
18187
|
+
"name": "disabled",
|
|
18188
|
+
"description": "Disable pointer resizing, keyboard resizing and collapse controls",
|
|
18189
|
+
"descriptionZh": "禁用拖拽、键盘调整和折叠按钮",
|
|
18190
|
+
"descriptionEn": "Disable pointer resizing, keyboard resizing and collapse controls",
|
|
18191
|
+
"type": "boolean",
|
|
18192
|
+
"boolean": true,
|
|
18193
|
+
"enumValues": [
|
|
18194
|
+
false,
|
|
18195
|
+
true
|
|
18196
|
+
],
|
|
18197
|
+
"required": false,
|
|
18198
|
+
"documented": true
|
|
18199
|
+
},
|
|
17814
18200
|
{
|
|
17815
18201
|
"name": "direction",
|
|
17816
18202
|
"description": "Layout direction",
|
|
17817
18203
|
"descriptionZh": "布局方向",
|
|
17818
18204
|
"descriptionEn": "Layout direction",
|
|
17819
|
-
"type": "
|
|
18205
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
17820
18206
|
"boolean": false,
|
|
17821
18207
|
"enumValues": [
|
|
17822
18208
|
"horizontal",
|
|
17823
|
-
"vertical"
|
|
17824
|
-
"inline"
|
|
18209
|
+
"vertical"
|
|
17825
18210
|
],
|
|
17826
18211
|
"required": false,
|
|
17827
18212
|
"defaultExpression": "\"horizontal\"",
|
|
17828
18213
|
"documented": true
|
|
17829
18214
|
},
|
|
18215
|
+
{
|
|
18216
|
+
"name": "lazy",
|
|
18217
|
+
"description": "Move a preview guide and apply sizes on release",
|
|
18218
|
+
"descriptionZh": "拖动时只展示参考线,松开后应用尺寸",
|
|
18219
|
+
"descriptionEn": "Move a preview guide and apply sizes on release",
|
|
18220
|
+
"type": "boolean",
|
|
18221
|
+
"boolean": true,
|
|
18222
|
+
"enumValues": [
|
|
18223
|
+
false,
|
|
18224
|
+
true
|
|
18225
|
+
],
|
|
18226
|
+
"required": false,
|
|
18227
|
+
"documented": true
|
|
18228
|
+
},
|
|
18229
|
+
{
|
|
18230
|
+
"name": "modelValue",
|
|
18231
|
+
"description": "Current panel sizes in pixels; supports v-model",
|
|
18232
|
+
"descriptionZh": "当前面板尺寸数组(px),支持 v-model",
|
|
18233
|
+
"descriptionEn": "Current panel sizes in pixels; supports v-model",
|
|
18234
|
+
"type": "number[] | undefined",
|
|
18235
|
+
"boolean": false,
|
|
18236
|
+
"required": false,
|
|
18237
|
+
"documented": true
|
|
18238
|
+
},
|
|
18239
|
+
{
|
|
18240
|
+
"name": "value",
|
|
18241
|
+
"description": "Initial panel sizes in pixels; takes precedence over panel size",
|
|
18242
|
+
"descriptionZh": "初始面板尺寸数组(px),优先于面板的 size",
|
|
18243
|
+
"descriptionEn": "Initial panel sizes in pixels; takes precedence over panel size",
|
|
18244
|
+
"type": "number[] | undefined",
|
|
18245
|
+
"boolean": false,
|
|
18246
|
+
"required": false,
|
|
18247
|
+
"documented": true
|
|
18248
|
+
},
|
|
18249
|
+
{
|
|
18250
|
+
"name": "onUpdate:modelValue",
|
|
18251
|
+
"description": "Requests a new modelValue value (Current panel sizes in pixels; supports v-model); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
18252
|
+
"descriptionZh": "请求更新 modelValue(当前面板尺寸数组(px),支持 v-model),参数为更新后的值。使用 v-model 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
18253
|
+
"descriptionEn": "Requests a new modelValue value (Current panel sizes in pixels; supports v-model); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
18254
|
+
"type": "(sizes: number[]) => void",
|
|
18255
|
+
"eventName": "update:modelValue",
|
|
18256
|
+
"boolean": false,
|
|
18257
|
+
"documented": false
|
|
18258
|
+
},
|
|
18259
|
+
{
|
|
18260
|
+
"name": "onChange",
|
|
18261
|
+
"description": "Applied layout changed, including container resizing and collapsing",
|
|
18262
|
+
"descriptionZh": "已应用的布局变化时触发,包括容器缩放和折叠",
|
|
18263
|
+
"descriptionEn": "Applied layout changed, including container resizing and collapsing",
|
|
18264
|
+
"type": "(sizes: number[]) => void",
|
|
18265
|
+
"eventName": "change",
|
|
18266
|
+
"boolean": false,
|
|
18267
|
+
"documented": true
|
|
18268
|
+
},
|
|
17830
18269
|
{
|
|
17831
18270
|
"name": "onResize",
|
|
17832
|
-
"description": "
|
|
17833
|
-
"descriptionZh": "
|
|
17834
|
-
"descriptionEn": "
|
|
18271
|
+
"description": "Pointer or keyboard resizing; preview mode reports proposed sizes",
|
|
18272
|
+
"descriptionZh": "拖动或键盘调整时触发;参考线模式返回预览尺寸",
|
|
18273
|
+
"descriptionEn": "Pointer or keyboard resizing; preview mode reports proposed sizes",
|
|
17835
18274
|
"type": "(sizes: number[]) => void",
|
|
17836
18275
|
"eventName": "resize",
|
|
17837
18276
|
"boolean": false,
|
|
@@ -17839,9 +18278,9 @@
|
|
|
17839
18278
|
},
|
|
17840
18279
|
{
|
|
17841
18280
|
"name": "onResizeStart",
|
|
17842
|
-
"description": "
|
|
17843
|
-
"descriptionZh": "
|
|
17844
|
-
"descriptionEn": "
|
|
18281
|
+
"description": "Resizing started",
|
|
18282
|
+
"descriptionZh": "开始调整尺寸时触发",
|
|
18283
|
+
"descriptionEn": "Resizing started",
|
|
17845
18284
|
"type": "(sizes: number[]) => void",
|
|
17846
18285
|
"eventName": "resizeStart",
|
|
17847
18286
|
"boolean": false,
|
|
@@ -17849,36 +18288,67 @@
|
|
|
17849
18288
|
},
|
|
17850
18289
|
{
|
|
17851
18290
|
"name": "onResizeEnd",
|
|
17852
|
-
"description": "
|
|
17853
|
-
"descriptionZh": "
|
|
17854
|
-
"descriptionEn": "
|
|
18291
|
+
"description": "Resizing ended or was cancelled; reports final sizes",
|
|
18292
|
+
"descriptionZh": "结束或取消调整尺寸时触发,返回最终尺寸",
|
|
18293
|
+
"descriptionEn": "Resizing ended or was cancelled; reports final sizes",
|
|
17855
18294
|
"type": "(sizes: number[]) => void",
|
|
17856
18295
|
"eventName": "resizeEnd",
|
|
17857
18296
|
"boolean": false,
|
|
17858
18297
|
"documented": true
|
|
18298
|
+
},
|
|
18299
|
+
{
|
|
18300
|
+
"name": "onCollapse",
|
|
18301
|
+
"description": "Panel collapse toggled by a button; index starts at zero",
|
|
18302
|
+
"descriptionZh": "通过按钮切换面板折叠状态时触发,index 从 0 开始",
|
|
18303
|
+
"descriptionEn": "Panel collapse toggled by a button; index starts at zero",
|
|
18304
|
+
"type": "(index: number, collapsed: boolean) => void",
|
|
18305
|
+
"eventName": "collapse",
|
|
18306
|
+
"boolean": false,
|
|
18307
|
+
"documented": true
|
|
17859
18308
|
}
|
|
17860
18309
|
],
|
|
17861
18310
|
"events": [
|
|
18311
|
+
{
|
|
18312
|
+
"name": "update:modelValue",
|
|
18313
|
+
"type": "(sizes: number[]) => void",
|
|
18314
|
+
"description": "Requests a new modelValue value (Current panel sizes in pixels; supports v-model); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
18315
|
+
"descriptionZh": "请求更新 modelValue(当前面板尺寸数组(px),支持 v-model),参数为更新后的值。使用 v-model 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
18316
|
+
"descriptionEn": "Requests a new modelValue value (Current panel sizes in pixels; supports v-model); the payload is the new value. With v-model, Vue synchronizes the binding automatically; no additional update handler is needed."
|
|
18317
|
+
},
|
|
18318
|
+
{
|
|
18319
|
+
"name": "change",
|
|
18320
|
+
"type": "(sizes: number[]) => void",
|
|
18321
|
+
"description": "Applied layout changed, including container resizing and collapsing",
|
|
18322
|
+
"descriptionZh": "已应用的布局变化时触发,包括容器缩放和折叠",
|
|
18323
|
+
"descriptionEn": "Applied layout changed, including container resizing and collapsing"
|
|
18324
|
+
},
|
|
17862
18325
|
{
|
|
17863
18326
|
"name": "resize",
|
|
17864
18327
|
"type": "(sizes: number[]) => void",
|
|
17865
|
-
"description": "
|
|
17866
|
-
"descriptionZh": "
|
|
17867
|
-
"descriptionEn": "
|
|
18328
|
+
"description": "Pointer or keyboard resizing; preview mode reports proposed sizes",
|
|
18329
|
+
"descriptionZh": "拖动或键盘调整时触发;参考线模式返回预览尺寸",
|
|
18330
|
+
"descriptionEn": "Pointer or keyboard resizing; preview mode reports proposed sizes"
|
|
17868
18331
|
},
|
|
17869
18332
|
{
|
|
17870
18333
|
"name": "resizeStart",
|
|
17871
18334
|
"type": "(sizes: number[]) => void",
|
|
17872
|
-
"description": "
|
|
17873
|
-
"descriptionZh": "
|
|
17874
|
-
"descriptionEn": "
|
|
18335
|
+
"description": "Resizing started",
|
|
18336
|
+
"descriptionZh": "开始调整尺寸时触发",
|
|
18337
|
+
"descriptionEn": "Resizing started"
|
|
17875
18338
|
},
|
|
17876
18339
|
{
|
|
17877
18340
|
"name": "resizeEnd",
|
|
17878
18341
|
"type": "(sizes: number[]) => void",
|
|
17879
|
-
"description": "
|
|
17880
|
-
"descriptionZh": "
|
|
17881
|
-
"descriptionEn": "
|
|
18342
|
+
"description": "Resizing ended or was cancelled; reports final sizes",
|
|
18343
|
+
"descriptionZh": "结束或取消调整尺寸时触发,返回最终尺寸",
|
|
18344
|
+
"descriptionEn": "Resizing ended or was cancelled; reports final sizes"
|
|
18345
|
+
},
|
|
18346
|
+
{
|
|
18347
|
+
"name": "collapse",
|
|
18348
|
+
"type": "(index: number, collapsed: boolean) => void",
|
|
18349
|
+
"description": "Panel collapse toggled by a button; index starts at zero",
|
|
18350
|
+
"descriptionZh": "通过按钮切换面板折叠状态时触发,index 从 0 开始",
|
|
18351
|
+
"descriptionEn": "Panel collapse toggled by a button; index starts at zero"
|
|
17882
18352
|
}
|
|
17883
18353
|
],
|
|
17884
18354
|
"slots": [],
|
|
@@ -17889,9 +18359,24 @@
|
|
|
17889
18359
|
"source": "<template>\n <code>size: {{ sizes }}</code>\n <Splitter style=\"height: 200px; width: 100%\" @resize=\"resize\">\n <SplitterPanel><Text text=\"Left\" /></SplitterPanel>\n <SplitterPanel><Text text=\"Center\" /></SplitterPanel>\n <SplitterPanel><Text text=\"Right\" /></SplitterPanel>\n </Splitter>\n</template>\n<script lang=\"ts\" setup>\nimport { Flex } from \"kui-vue\";\nimport { h, ref } from \"vue\";\nconst sizes = ref<number[]>([]);\n\nconst resize = (value: number[]) => {\n sizes.value = value;\n};\nconst Text = (p: { text: string }) => {\n return h(\n Flex,\n { align: \"center\", justify: \"center\", style: { height: \"100%\", color: \"#aaa\" } },\n { default: () => p.text },\n );\n};\n</script>"
|
|
17890
18360
|
},
|
|
17891
18361
|
{
|
|
17892
|
-
"title": "
|
|
18362
|
+
"title": "垂直与嵌套布局",
|
|
17893
18363
|
"file": "components/splitter/demo/vertical.vue",
|
|
17894
18364
|
"source": "<template>\n <Splitter direction=\"horizontal\" style=\"height: 200px\">\n <SplitterPanel size=\"20%\" min=\"10%\" max=\"30%\"><Text text=\"Folders\" /></SplitterPanel>\n <SplitterPanel>\n <Splitter direction=\"vertical\">\n <SplitterPanel><Text text=\"Editor\" /></SplitterPanel>\n <SplitterPanel size=\"50px\"><Text text=\"Console\" /></SplitterPanel>\n </Splitter>\n </SplitterPanel>\n </Splitter>\n</template>\n<script lang=\"ts\" setup>\nimport { Flex } from \"kui-vue\";\nimport { h } from \"vue\";\n\nconst Text = (p: { text: string }) => {\n return h(\n Flex,\n { align: \"center\", justify: \"center\", style: { height: \"100%\", color: \"#aaa\" } },\n { default: () => p.text },\n );\n};\n</script>"
|
|
18365
|
+
},
|
|
18366
|
+
{
|
|
18367
|
+
"title": "折叠与锁定",
|
|
18368
|
+
"file": "components/splitter/demo/collapsible.vue",
|
|
18369
|
+
"source": "<template>\n <Splitter style=\"height: 220px\">\n <SplitterPanel v-model:collapsed=\"collapsed\" size=\"25%\" min=\"100px\" collapsible>\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Folders</Flex>\n </SplitterPanel>\n <SplitterPanel>\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Editor</Flex>\n </SplitterPanel>\n <SplitterPanel size=\"120px\" :resizable=\"false\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Locked</Flex>\n </SplitterPanel>\n </Splitter>\n <code>collapsed: {{ collapsed }}</code>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Flex, Splitter, SplitterPanel } from \"kui-vue\";\nconst collapsed = ref(false);\n</script>"
|
|
18370
|
+
},
|
|
18371
|
+
{
|
|
18372
|
+
"title": "绑定与恢复布局",
|
|
18373
|
+
"file": "components/splitter/demo/controlled.vue",
|
|
18374
|
+
"source": "<template>\n <Space vertical style=\"width: 100%\">\n <Space>\n <Button @click=\"saved = [...sizes]\">Save layout</Button>\n <Button @click=\"sizes = [...saved]\">Restore layout</Button>\n </Space>\n <code>sizes: {{ sizes.map((size) => Math.round(size)).join(\", \") }}</code>\n <Splitter v-model=\"sizes\" style=\"height: 200px\">\n <SplitterPanel min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Left</Flex>\n </SplitterPanel>\n <SplitterPanel min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Right</Flex>\n </SplitterPanel>\n </Splitter>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Button, Flex, Space, Splitter, SplitterPanel } from \"kui-vue\";\nconst sizes = ref([240, 556]);\nconst saved = ref([...sizes.value]);\n</script>"
|
|
18375
|
+
},
|
|
18376
|
+
{
|
|
18377
|
+
"title": "参考线拖动",
|
|
18378
|
+
"file": "components/splitter/demo/lazy.vue",
|
|
18379
|
+
"source": "<template>\n <Splitter lazy style=\"height: 220px\" @resize=\"preview = $event\" @change=\"applied = $event\">\n <SplitterPanel size=\"35%\" min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Chart</Flex>\n </SplitterPanel>\n <SplitterPanel min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Editor</Flex>\n </SplitterPanel>\n </Splitter>\n <div>\n <code>preview: {{ preview.map((size) => Math.round(size)).join(\", \") }}</code>\n </div>\n <div>\n <code>applied: {{ applied.map((size) => Math.round(size)).join(\", \") }}</code>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Flex, Splitter, SplitterPanel } from \"kui-vue\";\nconst preview = ref<number[]>([]);\nconst applied = ref<number[]>([]);\n</script>"
|
|
17895
18380
|
}
|
|
17896
18381
|
]
|
|
17897
18382
|
},
|
|
@@ -17900,7 +18385,13 @@
|
|
|
17900
18385
|
"behavior": {
|
|
17901
18386
|
"rules": []
|
|
17902
18387
|
},
|
|
17903
|
-
"models": [
|
|
18388
|
+
"models": [
|
|
18389
|
+
{
|
|
18390
|
+
"prop": "collapsed",
|
|
18391
|
+
"event": "update:collapsed",
|
|
18392
|
+
"directive": "v-model:collapsed"
|
|
18393
|
+
}
|
|
18394
|
+
],
|
|
17904
18395
|
"tags": [
|
|
17905
18396
|
"SplitterPanel",
|
|
17906
18397
|
"KSplitterPanel",
|
|
@@ -17911,11 +18402,40 @@
|
|
|
17911
18402
|
"children": [],
|
|
17912
18403
|
"documentation": "https://k-ui.cn/components/splitter",
|
|
17913
18404
|
"props": [
|
|
18405
|
+
{
|
|
18406
|
+
"name": "collapsible",
|
|
18407
|
+
"description": "Show this panel's collapse controls",
|
|
18408
|
+
"descriptionZh": "是否显示此面板的折叠按钮",
|
|
18409
|
+
"descriptionEn": "Show this panel's collapse controls",
|
|
18410
|
+
"type": "boolean",
|
|
18411
|
+
"boolean": true,
|
|
18412
|
+
"enumValues": [
|
|
18413
|
+
false,
|
|
18414
|
+
true
|
|
18415
|
+
],
|
|
18416
|
+
"required": false,
|
|
18417
|
+
"documented": true
|
|
18418
|
+
},
|
|
18419
|
+
{
|
|
18420
|
+
"name": "resizable",
|
|
18421
|
+
"description": "Allow resizing; when false, adjacent separators cannot be dragged and this panel cannot be collapsed by a button",
|
|
18422
|
+
"descriptionZh": "是否允许调整此面板;关闭后相邻分隔条不可拖动,面板不可通过按钮折叠",
|
|
18423
|
+
"descriptionEn": "Allow resizing; when false, adjacent separators cannot be dragged and this panel cannot be collapsed by a button",
|
|
18424
|
+
"type": "boolean",
|
|
18425
|
+
"boolean": true,
|
|
18426
|
+
"enumValues": [
|
|
18427
|
+
false,
|
|
18428
|
+
true
|
|
18429
|
+
],
|
|
18430
|
+
"required": false,
|
|
18431
|
+
"defaultExpression": "true",
|
|
18432
|
+
"documented": true
|
|
18433
|
+
},
|
|
17914
18434
|
{
|
|
17915
18435
|
"name": "size",
|
|
17916
|
-
"description": "Initial size; numbers are px, strings
|
|
18436
|
+
"description": "Initial size; numbers are px, strings accept px or percentages",
|
|
17917
18437
|
"descriptionZh": "初始尺寸;数字为 px,字符串支持 px 或百分比",
|
|
17918
|
-
"descriptionEn": "Initial size; numbers are px, strings
|
|
18438
|
+
"descriptionEn": "Initial size; numbers are px, strings accept px or percentages",
|
|
17919
18439
|
"type": "string | number | undefined",
|
|
17920
18440
|
"boolean": false,
|
|
17921
18441
|
"required": false,
|
|
@@ -17923,9 +18443,9 @@
|
|
|
17923
18443
|
},
|
|
17924
18444
|
{
|
|
17925
18445
|
"name": "max",
|
|
17926
|
-
"description": "Maximum size; numbers are px, strings
|
|
17927
|
-
"descriptionZh": "
|
|
17928
|
-
"descriptionEn": "Maximum size; numbers are px, strings
|
|
18446
|
+
"description": "Maximum expanded size; numbers are px, strings accept px or percentages",
|
|
18447
|
+
"descriptionZh": "展开时的最大尺寸;数字为 px,字符串支持 px 或百分比",
|
|
18448
|
+
"descriptionEn": "Maximum expanded size; numbers are px, strings accept px or percentages",
|
|
17929
18449
|
"type": "string | number | undefined",
|
|
17930
18450
|
"boolean": false,
|
|
17931
18451
|
"required": false,
|
|
@@ -17933,16 +18453,49 @@
|
|
|
17933
18453
|
},
|
|
17934
18454
|
{
|
|
17935
18455
|
"name": "min",
|
|
17936
|
-
"description": "Minimum size; numbers are px, strings
|
|
17937
|
-
"descriptionZh": "
|
|
17938
|
-
"descriptionEn": "Minimum size; numbers are px, strings
|
|
18456
|
+
"description": "Minimum expanded size; numbers are px, strings accept px or percentages",
|
|
18457
|
+
"descriptionZh": "展开时的最小尺寸;数字为 px,字符串支持 px 或百分比",
|
|
18458
|
+
"descriptionEn": "Minimum expanded size; numbers are px, strings accept px or percentages",
|
|
17939
18459
|
"type": "string | number | undefined",
|
|
17940
18460
|
"boolean": false,
|
|
17941
18461
|
"required": false,
|
|
17942
18462
|
"documented": true
|
|
18463
|
+
},
|
|
18464
|
+
{
|
|
18465
|
+
"name": "collapsed",
|
|
18466
|
+
"description": "Collapse to zero size; supports v-model:collapsed",
|
|
18467
|
+
"descriptionZh": "是否折叠,支持 v-model:collapsed,折叠尺寸为 0",
|
|
18468
|
+
"descriptionEn": "Collapse to zero size; supports v-model:collapsed",
|
|
18469
|
+
"type": "boolean | undefined",
|
|
18470
|
+
"boolean": true,
|
|
18471
|
+
"enumValues": [
|
|
18472
|
+
false,
|
|
18473
|
+
true
|
|
18474
|
+
],
|
|
18475
|
+
"required": false,
|
|
18476
|
+
"defaultExpression": "undefined",
|
|
18477
|
+
"documented": true
|
|
18478
|
+
},
|
|
18479
|
+
{
|
|
18480
|
+
"name": "onUpdate:collapsed",
|
|
18481
|
+
"description": "Requests a new collapsed value (Collapse to zero size; supports v-model:collapsed); the payload is the new value. With v-model:collapsed, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
18482
|
+
"descriptionZh": "请求更新 collapsed(是否折叠,支持 v-model:collapsed,折叠尺寸为 0),参数为更新后的值。使用 v-model:collapsed 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
18483
|
+
"descriptionEn": "Requests a new collapsed value (Collapse to zero size; supports v-model:collapsed); the payload is the new value. With v-model:collapsed, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
18484
|
+
"type": "(collapsed: boolean) => void",
|
|
18485
|
+
"eventName": "update:collapsed",
|
|
18486
|
+
"boolean": false,
|
|
18487
|
+
"documented": false
|
|
18488
|
+
}
|
|
18489
|
+
],
|
|
18490
|
+
"events": [
|
|
18491
|
+
{
|
|
18492
|
+
"name": "update:collapsed",
|
|
18493
|
+
"type": "(collapsed: boolean) => void",
|
|
18494
|
+
"description": "Requests a new collapsed value (Collapse to zero size; supports v-model:collapsed); the payload is the new value. With v-model:collapsed, Vue synchronizes the binding automatically; no additional update handler is needed.",
|
|
18495
|
+
"descriptionZh": "请求更新 collapsed(是否折叠,支持 v-model:collapsed,折叠尺寸为 0),参数为更新后的值。使用 v-model:collapsed 时由 Vue 自动同步绑定值,无需另写更新处理器。",
|
|
18496
|
+
"descriptionEn": "Requests a new collapsed value (Collapse to zero size; supports v-model:collapsed); the payload is the new value. With v-model:collapsed, Vue synchronizes the binding automatically; no additional update handler is needed."
|
|
17943
18497
|
}
|
|
17944
18498
|
],
|
|
17945
|
-
"events": [],
|
|
17946
18499
|
"slots": [],
|
|
17947
18500
|
"examples": [
|
|
17948
18501
|
{
|
|
@@ -17951,9 +18504,24 @@
|
|
|
17951
18504
|
"source": "<template>\n <code>size: {{ sizes }}</code>\n <Splitter style=\"height: 200px; width: 100%\" @resize=\"resize\">\n <SplitterPanel><Text text=\"Left\" /></SplitterPanel>\n <SplitterPanel><Text text=\"Center\" /></SplitterPanel>\n <SplitterPanel><Text text=\"Right\" /></SplitterPanel>\n </Splitter>\n</template>\n<script lang=\"ts\" setup>\nimport { Flex } from \"kui-vue\";\nimport { h, ref } from \"vue\";\nconst sizes = ref<number[]>([]);\n\nconst resize = (value: number[]) => {\n sizes.value = value;\n};\nconst Text = (p: { text: string }) => {\n return h(\n Flex,\n { align: \"center\", justify: \"center\", style: { height: \"100%\", color: \"#aaa\" } },\n { default: () => p.text },\n );\n};\n</script>"
|
|
17952
18505
|
},
|
|
17953
18506
|
{
|
|
17954
|
-
"title": "
|
|
18507
|
+
"title": "垂直与嵌套布局",
|
|
17955
18508
|
"file": "components/splitter/demo/vertical.vue",
|
|
17956
18509
|
"source": "<template>\n <Splitter direction=\"horizontal\" style=\"height: 200px\">\n <SplitterPanel size=\"20%\" min=\"10%\" max=\"30%\"><Text text=\"Folders\" /></SplitterPanel>\n <SplitterPanel>\n <Splitter direction=\"vertical\">\n <SplitterPanel><Text text=\"Editor\" /></SplitterPanel>\n <SplitterPanel size=\"50px\"><Text text=\"Console\" /></SplitterPanel>\n </Splitter>\n </SplitterPanel>\n </Splitter>\n</template>\n<script lang=\"ts\" setup>\nimport { Flex } from \"kui-vue\";\nimport { h } from \"vue\";\n\nconst Text = (p: { text: string }) => {\n return h(\n Flex,\n { align: \"center\", justify: \"center\", style: { height: \"100%\", color: \"#aaa\" } },\n { default: () => p.text },\n );\n};\n</script>"
|
|
18510
|
+
},
|
|
18511
|
+
{
|
|
18512
|
+
"title": "折叠与锁定",
|
|
18513
|
+
"file": "components/splitter/demo/collapsible.vue",
|
|
18514
|
+
"source": "<template>\n <Splitter style=\"height: 220px\">\n <SplitterPanel v-model:collapsed=\"collapsed\" size=\"25%\" min=\"100px\" collapsible>\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Folders</Flex>\n </SplitterPanel>\n <SplitterPanel>\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Editor</Flex>\n </SplitterPanel>\n <SplitterPanel size=\"120px\" :resizable=\"false\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Locked</Flex>\n </SplitterPanel>\n </Splitter>\n <code>collapsed: {{ collapsed }}</code>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Flex, Splitter, SplitterPanel } from \"kui-vue\";\nconst collapsed = ref(false);\n</script>"
|
|
18515
|
+
},
|
|
18516
|
+
{
|
|
18517
|
+
"title": "绑定与恢复布局",
|
|
18518
|
+
"file": "components/splitter/demo/controlled.vue",
|
|
18519
|
+
"source": "<template>\n <Space vertical style=\"width: 100%\">\n <Space>\n <Button @click=\"saved = [...sizes]\">Save layout</Button>\n <Button @click=\"sizes = [...saved]\">Restore layout</Button>\n </Space>\n <code>sizes: {{ sizes.map((size) => Math.round(size)).join(\", \") }}</code>\n <Splitter v-model=\"sizes\" style=\"height: 200px\">\n <SplitterPanel min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Left</Flex>\n </SplitterPanel>\n <SplitterPanel min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Right</Flex>\n </SplitterPanel>\n </Splitter>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Button, Flex, Space, Splitter, SplitterPanel } from \"kui-vue\";\nconst sizes = ref([240, 556]);\nconst saved = ref([...sizes.value]);\n</script>"
|
|
18520
|
+
},
|
|
18521
|
+
{
|
|
18522
|
+
"title": "参考线拖动",
|
|
18523
|
+
"file": "components/splitter/demo/lazy.vue",
|
|
18524
|
+
"source": "<template>\n <Splitter lazy style=\"height: 220px\" @resize=\"preview = $event\" @change=\"applied = $event\">\n <SplitterPanel size=\"35%\" min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Chart</Flex>\n </SplitterPanel>\n <SplitterPanel min=\"100px\">\n <Flex align=\"center\" justify=\"center\" style=\"height: 100%\">Editor</Flex>\n </SplitterPanel>\n </Splitter>\n <div>\n <code>preview: {{ preview.map((size) => Math.round(size)).join(\", \") }}</code>\n </div>\n <div>\n <code>applied: {{ applied.map((size) => Math.round(size)).join(\", \") }}</code>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { Flex, Splitter, SplitterPanel } from \"kui-vue\";\nconst preview = ref<number[]>([]);\nconst applied = ref<number[]>([]);\n</script>"
|
|
17957
18525
|
}
|
|
17958
18526
|
]
|
|
17959
18527
|
},
|
|
@@ -18998,6 +19566,20 @@
|
|
|
18998
19566
|
"required": false,
|
|
18999
19567
|
"documented": true
|
|
19000
19568
|
},
|
|
19569
|
+
{
|
|
19570
|
+
"name": "arrowPointAtCenter",
|
|
19571
|
+
"description": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
19572
|
+
"descriptionZh": "让箭头中心指向触发器中心;默认按面板边缘或中心对齐,需有箭头时才生效",
|
|
19573
|
+
"descriptionEn": "Point the arrow at the trigger center instead of aligning panel edges; requires a visible arrow",
|
|
19574
|
+
"type": "boolean | undefined",
|
|
19575
|
+
"boolean": true,
|
|
19576
|
+
"enumValues": [
|
|
19577
|
+
false,
|
|
19578
|
+
true
|
|
19579
|
+
],
|
|
19580
|
+
"required": false,
|
|
19581
|
+
"documented": true
|
|
19582
|
+
},
|
|
19001
19583
|
{
|
|
19002
19584
|
"name": "panelOnly",
|
|
19003
19585
|
"description": "Render only the tooltip panel without a trigger",
|