kui-vue 5.7.0 → 5.8.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/evals/cases.json +18 -0
- package/ai/kui-components.json +1071 -107
- package/ai/kui-components.schema.json +33 -0
- package/dist/index.js +2 -2
- package/es/index.js +533 -26
- package/es/locale/de.js +6 -2
- package/es/locale/el.js +6 -2
- package/es/locale/en.js +6 -2
- package/es/locale/fr.js +6 -2
- package/es/locale/it.js +6 -2
- package/es/locale/ja.js +6 -2
- package/es/locale/ko.js +6 -2
- package/es/locale/ru.js +6 -2
- package/es/locale/th.js +6 -2
- package/es/locale/uk.js +6 -2
- package/es/locale/vi.js +6 -2
- package/es/locale/zh-CN.js +6 -2
- package/es/locale/zh-TW.js +6 -2
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +2 -2
- package/lib/locale/el.cjs +2 -2
- package/lib/locale/en.cjs +2 -2
- package/lib/locale/fr.cjs +2 -2
- package/lib/locale/it.cjs +2 -2
- package/lib/locale/ja.cjs +2 -2
- package/lib/locale/ko.cjs +2 -2
- package/lib/locale/ru.cjs +2 -2
- package/lib/locale/th.cjs +2 -2
- package/lib/locale/uk.cjs +2 -2
- package/lib/locale/vi.cjs +2 -2
- package/lib/locale/zh-CN.cjs +2 -2
- package/lib/locale/zh-TW.cjs +2 -2
- package/package.json +4 -2
- 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/calendar/index.d.ts +97 -0
- package/types/components.d.ts +10 -2
- package/types/feature-card/index.d.ts +46 -3
- package/types/global.d.ts +9 -0
- package/types/kanban/index.d.ts +137 -0
- package/types/list-panel/index.d.ts +78 -0
- package/types/locale/de.d.cts +2 -0
- package/types/locale/de.d.ts +2 -0
- package/types/locale/el.d.cts +2 -0
- package/types/locale/el.d.ts +2 -0
- package/types/locale/en.d.cts +2 -0
- package/types/locale/en.d.ts +2 -0
- package/types/locale/fr.d.cts +2 -0
- package/types/locale/fr.d.ts +2 -0
- package/types/locale/it.d.cts +2 -0
- package/types/locale/it.d.ts +2 -0
- package/types/locale/ja.d.cts +2 -0
- package/types/locale/ja.d.ts +2 -0
- package/types/locale/ko.d.cts +2 -0
- package/types/locale/ko.d.ts +2 -0
- package/types/locale/ru.d.cts +2 -0
- package/types/locale/ru.d.ts +2 -0
- package/types/locale/th.d.cts +2 -0
- package/types/locale/th.d.ts +2 -0
- package/types/locale/uk.d.cts +2 -0
- package/types/locale/uk.d.ts +2 -0
- package/types/locale/vi.d.cts +2 -0
- package/types/locale/vi.d.ts +2 -0
- package/types/locale/zh-CN.d.cts +2 -0
- package/types/locale/zh-CN.d.ts +2 -0
- package/types/locale/zh-TW.d.cts +2 -0
- package/types/locale/zh-TW.d.ts +2 -0
- package/types/page-header/index.d.ts +14 -0
- package/types/table/column-setting.d.ts +75 -0
- package/types/table/index.d.ts +15 -0
- package/vetur/attributes.json +380 -32
- package/vetur/tags.json +125 -4
- package/vetur/web-types.json +710 -38
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": "5.
|
|
4
|
+
"version": "5.8.0",
|
|
5
5
|
"homepage": "https://k-ui.cn",
|
|
6
6
|
"components": [
|
|
7
7
|
{
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"descriptionEn": "Triggered when the fixed state changes"
|
|
61
61
|
}
|
|
62
62
|
],
|
|
63
|
+
"slots": [],
|
|
63
64
|
"examples": [
|
|
64
65
|
{
|
|
65
66
|
"title": "基本用法",
|
|
@@ -188,6 +189,7 @@
|
|
|
188
189
|
"descriptionEn": "Callback function triggered when closing"
|
|
189
190
|
}
|
|
190
191
|
],
|
|
192
|
+
"slots": [],
|
|
191
193
|
"examples": [
|
|
192
194
|
{
|
|
193
195
|
"title": "基本用法",
|
|
@@ -443,6 +445,7 @@
|
|
|
443
445
|
"descriptionEn": "Open state change"
|
|
444
446
|
}
|
|
445
447
|
],
|
|
448
|
+
"slots": [],
|
|
446
449
|
"examples": [
|
|
447
450
|
{
|
|
448
451
|
"title": "基础用法",
|
|
@@ -560,21 +563,22 @@
|
|
|
560
563
|
"descriptionEn": "Click event for Anchor"
|
|
561
564
|
}
|
|
562
565
|
],
|
|
566
|
+
"slots": [],
|
|
563
567
|
"examples": [
|
|
564
568
|
{
|
|
565
569
|
"title": "基础用法(侧边栏目录)",
|
|
566
570
|
"file": "components/anchor/demo/basic.vue",
|
|
567
|
-
"source": "<template>\n <Layout class=\"anchor-d1\">\n <Row :gutter=\"24\">\n <Col :span=\"18\">\n <section id=\"part-1\" style=\"margin-bottom: 20px
|
|
571
|
+
"source": "<template>\n <Layout class=\"anchor-d1\">\n <Row :gutter=\"24\">\n <Col :span=\"18\">\n <section id=\"part-1\" style=\"margin-bottom: 20px\">\n <h2>Part 1:Basic</h2>\n <p>Here is the basic content...</p>\n </section>\n <section id=\"part-2\" style=\"margin-bottom: 20px\">\n <h2>Part 2:Guide</h2>\n <p>Here is the advanced content...</p>\n </section>\n <section id=\"part-3\">\n <h2>Part 3:FQA</h2>\n <p>Here is the FAQ content...</p>\n </section>\n </Col>\n <Col :span=\"6\">\n <Anchor :offsetTop=\"20\" container=\".anchor-d1\">\n <AnchorLink href=\"#part-1\" title=\"Basic\" />\n <AnchorLink href=\"#part-2\" title=\"Guide\" />\n <AnchorLink href=\"#part-3\" title=\"FAQ\" />\n </Anchor>\n </Col>\n </Row>\n </Layout>\n</template>\n<style scoped>\n.anchor-d1 {\n background: var(--kui-color-bg);\n padding: 24px;\n max-height: 500px;\n overflow: auto;\n}\nsection {\n height: 500px;\n background: var(--kui-color-bg-container);\n padding: 20px;\n}\n</style>"
|
|
568
572
|
},
|
|
569
573
|
{
|
|
570
574
|
"title": "嵌套锚点(复杂文档结构)",
|
|
571
575
|
"file": "components/anchor/demo/nested-anchors.vue",
|
|
572
|
-
"source": "<template>\n <Row style=\"display: flex;max-height:500px;overflow:auto
|
|
576
|
+
"source": "<template>\n <Row style=\"display: flex; max-height: 500px; overflow: auto\" class=\"anchor-d2\">\n <Col style=\"flex: 1; padding: 40px\">\n <h1 id=\"api\">API</h1>\n <div style=\"height: 400px\"></div>\n\n <h2 id=\"props\">Props</h2>\n <div style=\"height: 300px\"></div>\n\n <h3 id=\"anchor-props\">Anchor Props</h3>\n <div style=\"height: 300px\"></div>\n\n <h2 id=\"events\">Events</h2>\n <div style=\"height: 600px\"></div>\n </Col>\n\n <Col style=\"width: 200px; padding-top: 40px\">\n <Anchor container=\".anchor-d2\">\n <AnchorLink href=\"#api\" title=\"API\">\n <AnchorLink href=\"#props\" title=\"Props\">\n <AnchorLink href=\"#anchor-props\" title=\"Anchor Props\" />\n </AnchorLink>\n <AnchorLink href=\"#events\" title=\"Events\" />\n </AnchorLink>\n </Anchor>\n </Col>\n </Row>\n</template>"
|
|
573
577
|
},
|
|
574
578
|
{
|
|
575
579
|
"title": "指定容器(滚动容器内定位)",
|
|
576
580
|
"file": "components/anchor/demo/within-container.vue",
|
|
577
|
-
"source": "<template>\n <div class=\"demo-container\">\n <Row :gutter=\"10\">\n <Col :span=\"18\">\n <div\n class=\"scroll-content\"\n style=\"height: 300px; overflow-y: scroll; border: 1px solid var(--kui-color-border)
|
|
581
|
+
"source": "<template>\n <div class=\"demo-container\">\n <Row :gutter=\"10\">\n <Col :span=\"18\">\n <div\n class=\"scroll-content\"\n style=\"height: 300px; overflow-y: scroll; border: 1px solid var(--kui-color-border)\"\n >\n <div id=\"item-1\" style=\"height: 400px; background: #e6f7ff3c\">content 1</div>\n <div id=\"item-2\" style=\"height: 400px; background: #fff7e640\">content 2</div>\n </div>\n </Col>\n <Col :span=\"6\">\n <Anchor container=\".scroll-content\">\n <AnchorLink href=\"#item-1\" title=\"part 1\" />\n <AnchorLink href=\"#item-2\" title=\"part 2\" />\n </Anchor>\n </Col>\n </Row>\n </div>\n</template>"
|
|
578
582
|
}
|
|
579
583
|
]
|
|
580
584
|
},
|
|
@@ -608,21 +612,22 @@
|
|
|
608
612
|
}
|
|
609
613
|
],
|
|
610
614
|
"events": [],
|
|
615
|
+
"slots": [],
|
|
611
616
|
"examples": [
|
|
612
617
|
{
|
|
613
618
|
"title": "基础用法(侧边栏目录)",
|
|
614
619
|
"file": "components/anchor/demo/basic.vue",
|
|
615
|
-
"source": "<template>\n <Layout class=\"anchor-d1\">\n <Row :gutter=\"24\">\n <Col :span=\"18\">\n <section id=\"part-1\" style=\"margin-bottom: 20px
|
|
620
|
+
"source": "<template>\n <Layout class=\"anchor-d1\">\n <Row :gutter=\"24\">\n <Col :span=\"18\">\n <section id=\"part-1\" style=\"margin-bottom: 20px\">\n <h2>Part 1:Basic</h2>\n <p>Here is the basic content...</p>\n </section>\n <section id=\"part-2\" style=\"margin-bottom: 20px\">\n <h2>Part 2:Guide</h2>\n <p>Here is the advanced content...</p>\n </section>\n <section id=\"part-3\">\n <h2>Part 3:FQA</h2>\n <p>Here is the FAQ content...</p>\n </section>\n </Col>\n <Col :span=\"6\">\n <Anchor :offsetTop=\"20\" container=\".anchor-d1\">\n <AnchorLink href=\"#part-1\" title=\"Basic\" />\n <AnchorLink href=\"#part-2\" title=\"Guide\" />\n <AnchorLink href=\"#part-3\" title=\"FAQ\" />\n </Anchor>\n </Col>\n </Row>\n </Layout>\n</template>\n<style scoped>\n.anchor-d1 {\n background: var(--kui-color-bg);\n padding: 24px;\n max-height: 500px;\n overflow: auto;\n}\nsection {\n height: 500px;\n background: var(--kui-color-bg-container);\n padding: 20px;\n}\n</style>"
|
|
616
621
|
},
|
|
617
622
|
{
|
|
618
623
|
"title": "嵌套锚点(复杂文档结构)",
|
|
619
624
|
"file": "components/anchor/demo/nested-anchors.vue",
|
|
620
|
-
"source": "<template>\n <Row style=\"display: flex;max-height:500px;overflow:auto
|
|
625
|
+
"source": "<template>\n <Row style=\"display: flex; max-height: 500px; overflow: auto\" class=\"anchor-d2\">\n <Col style=\"flex: 1; padding: 40px\">\n <h1 id=\"api\">API</h1>\n <div style=\"height: 400px\"></div>\n\n <h2 id=\"props\">Props</h2>\n <div style=\"height: 300px\"></div>\n\n <h3 id=\"anchor-props\">Anchor Props</h3>\n <div style=\"height: 300px\"></div>\n\n <h2 id=\"events\">Events</h2>\n <div style=\"height: 600px\"></div>\n </Col>\n\n <Col style=\"width: 200px; padding-top: 40px\">\n <Anchor container=\".anchor-d2\">\n <AnchorLink href=\"#api\" title=\"API\">\n <AnchorLink href=\"#props\" title=\"Props\">\n <AnchorLink href=\"#anchor-props\" title=\"Anchor Props\" />\n </AnchorLink>\n <AnchorLink href=\"#events\" title=\"Events\" />\n </AnchorLink>\n </Anchor>\n </Col>\n </Row>\n</template>"
|
|
621
626
|
},
|
|
622
627
|
{
|
|
623
628
|
"title": "指定容器(滚动容器内定位)",
|
|
624
629
|
"file": "components/anchor/demo/within-container.vue",
|
|
625
|
-
"source": "<template>\n <div class=\"demo-container\">\n <Row :gutter=\"10\">\n <Col :span=\"18\">\n <div\n class=\"scroll-content\"\n style=\"height: 300px; overflow-y: scroll; border: 1px solid var(--kui-color-border)
|
|
630
|
+
"source": "<template>\n <div class=\"demo-container\">\n <Row :gutter=\"10\">\n <Col :span=\"18\">\n <div\n class=\"scroll-content\"\n style=\"height: 300px; overflow-y: scroll; border: 1px solid var(--kui-color-border)\"\n >\n <div id=\"item-1\" style=\"height: 400px; background: #e6f7ff3c\">content 1</div>\n <div id=\"item-2\" style=\"height: 400px; background: #fff7e640\">content 2</div>\n </div>\n </Col>\n <Col :span=\"6\">\n <Anchor container=\".scroll-content\">\n <AnchorLink href=\"#item-1\" title=\"part 1\" />\n <AnchorLink href=\"#item-2\" title=\"part 2\" />\n </Anchor>\n </Col>\n </Row>\n </div>\n</template>"
|
|
626
631
|
}
|
|
627
632
|
]
|
|
628
633
|
},
|
|
@@ -701,6 +706,7 @@
|
|
|
701
706
|
"descriptionEn": "Image error callback; return `false` to prevent rendering fallback"
|
|
702
707
|
}
|
|
703
708
|
],
|
|
709
|
+
"slots": [],
|
|
704
710
|
"examples": [
|
|
705
711
|
{
|
|
706
712
|
"title": "基本",
|
|
@@ -773,6 +779,7 @@
|
|
|
773
779
|
}
|
|
774
780
|
],
|
|
775
781
|
"events": [],
|
|
782
|
+
"slots": [],
|
|
776
783
|
"examples": [
|
|
777
784
|
{
|
|
778
785
|
"title": "基本",
|
|
@@ -818,6 +825,7 @@
|
|
|
818
825
|
}
|
|
819
826
|
],
|
|
820
827
|
"events": [],
|
|
828
|
+
"slots": [],
|
|
821
829
|
"examples": [
|
|
822
830
|
{
|
|
823
831
|
"title": "基本用法",
|
|
@@ -866,6 +874,7 @@
|
|
|
866
874
|
}
|
|
867
875
|
],
|
|
868
876
|
"events": [],
|
|
877
|
+
"slots": [],
|
|
869
878
|
"examples": [
|
|
870
879
|
{
|
|
871
880
|
"title": "基本用法",
|
|
@@ -949,6 +958,7 @@
|
|
|
949
958
|
"descriptionEn": "Triggered when the button is clicked"
|
|
950
959
|
}
|
|
951
960
|
],
|
|
961
|
+
"slots": [],
|
|
952
962
|
"examples": [
|
|
953
963
|
{
|
|
954
964
|
"title": "基本用法",
|
|
@@ -1045,6 +1055,7 @@
|
|
|
1045
1055
|
}
|
|
1046
1056
|
],
|
|
1047
1057
|
"events": [],
|
|
1058
|
+
"slots": [],
|
|
1048
1059
|
"examples": [
|
|
1049
1060
|
{
|
|
1050
1061
|
"title": "基本用法",
|
|
@@ -1203,6 +1214,7 @@
|
|
|
1203
1214
|
}
|
|
1204
1215
|
],
|
|
1205
1216
|
"events": [],
|
|
1217
|
+
"slots": [],
|
|
1206
1218
|
"examples": [
|
|
1207
1219
|
{
|
|
1208
1220
|
"title": "基本用法",
|
|
@@ -1212,7 +1224,7 @@
|
|
|
1212
1224
|
{
|
|
1213
1225
|
"title": "主题",
|
|
1214
1226
|
"file": "components/button/demo/theme.vue",
|
|
1215
|
-
"source": "<template>\n <Space vertical>\n <code>outline</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"outline\">outline</Button>\n <Button type=\"danger\" theme=\"outline\">outline</Button>\n <Button type=\"warning\" theme=\"outline\">outline</Button>\n <Button theme=\"outline\">outline</Button>\n </Space>\n <code>dashed</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"dashed\">dashed</Button>\n <Button type=\"danger\" theme=\"dashed\">dashed</Button>\n <Button type=\"warning\" theme=\"dashed\">dashed</Button>\n <Button theme=\"dashed\">dashed</Button>\n </Space>\n <code>fill</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"fill\">primary</Button>\n <Button type=\"danger\" theme=\"fill\">danger</Button>\n <Button type=\"warning\" theme=\"fill\">warning</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n <code>shape</code>\n <Space size=\"small\">\n <Button type=\"primary\" shape=\"round\">Round</Button>\n <Button type=\"danger\" shape=\"circle\">Circle</Button>\n <Button type=\"warning\" shape=\"square\">Square</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n </Space>\n</template>"
|
|
1227
|
+
"source": "<template>\n <Space vertical>\n <code>outline</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"outline\">outline</Button>\n <Button type=\"danger\" theme=\"outline\">outline</Button>\n <Button type=\"warning\" theme=\"outline\">outline</Button>\n <Button theme=\"outline\">outline</Button>\n </Space>\n <code>dashed</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"dashed\">dashed</Button>\n <Button type=\"danger\" theme=\"dashed\">dashed</Button>\n <Button type=\"warning\" theme=\"dashed\">dashed</Button>\n <Button theme=\"dashed\">dashed</Button>\n </Space>\n <code>fill</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"fill\">primary</Button>\n <Button type=\"danger\" theme=\"fill\">danger</Button>\n <Button type=\"warning\" theme=\"fill\">warning</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n <code>plain</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"plain\">primary</Button>\n <Button type=\"danger\" theme=\"plain\">danger</Button>\n <Button color=\"red\" theme=\"plain\">red</Button>\n <Button theme=\"plain\">default</Button>\n </Space>\n <code>shape</code>\n <Space size=\"small\">\n <Button type=\"primary\" shape=\"round\">Round</Button>\n <Button type=\"danger\" shape=\"circle\">Circle</Button>\n <Button type=\"warning\" shape=\"square\">Square</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n </Space>\n</template>"
|
|
1216
1228
|
},
|
|
1217
1229
|
{
|
|
1218
1230
|
"title": "多彩",
|
|
@@ -1242,7 +1254,7 @@
|
|
|
1242
1254
|
{
|
|
1243
1255
|
"title": "Block 按钮",
|
|
1244
1256
|
"file": "components/button/demo/block.vue",
|
|
1245
|
-
"source": "<template>\n <Space vertical style=\"width:100%\">\n <Button type=\"primary\" block>Primary</Button>\n <Button type=\"danger\" block>Danger</Button>\n <Button block>Default</Button>\n <Button type=\"text\" block>Text</Button>\n <Button type=\"link\" block>Link</Button>\n </Space>\n</template>"
|
|
1257
|
+
"source": "<template>\n <Space vertical style=\"width: 100%\">\n <Button type=\"primary\" block>Primary</Button>\n <Button type=\"danger\" block>Danger</Button>\n <Button block>Default</Button>\n <Button type=\"text\" block>Text</Button>\n <Button type=\"link\" block>Link</Button>\n </Space>\n</template>"
|
|
1246
1258
|
},
|
|
1247
1259
|
{
|
|
1248
1260
|
"title": "按钮组合",
|
|
@@ -1282,6 +1294,7 @@
|
|
|
1282
1294
|
}
|
|
1283
1295
|
],
|
|
1284
1296
|
"events": [],
|
|
1297
|
+
"slots": [],
|
|
1285
1298
|
"examples": [
|
|
1286
1299
|
{
|
|
1287
1300
|
"title": "基本用法",
|
|
@@ -1291,7 +1304,7 @@
|
|
|
1291
1304
|
{
|
|
1292
1305
|
"title": "主题",
|
|
1293
1306
|
"file": "components/button/demo/theme.vue",
|
|
1294
|
-
"source": "<template>\n <Space vertical>\n <code>outline</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"outline\">outline</Button>\n <Button type=\"danger\" theme=\"outline\">outline</Button>\n <Button type=\"warning\" theme=\"outline\">outline</Button>\n <Button theme=\"outline\">outline</Button>\n </Space>\n <code>dashed</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"dashed\">dashed</Button>\n <Button type=\"danger\" theme=\"dashed\">dashed</Button>\n <Button type=\"warning\" theme=\"dashed\">dashed</Button>\n <Button theme=\"dashed\">dashed</Button>\n </Space>\n <code>fill</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"fill\">primary</Button>\n <Button type=\"danger\" theme=\"fill\">danger</Button>\n <Button type=\"warning\" theme=\"fill\">warning</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n <code>shape</code>\n <Space size=\"small\">\n <Button type=\"primary\" shape=\"round\">Round</Button>\n <Button type=\"danger\" shape=\"circle\">Circle</Button>\n <Button type=\"warning\" shape=\"square\">Square</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n </Space>\n</template>"
|
|
1307
|
+
"source": "<template>\n <Space vertical>\n <code>outline</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"outline\">outline</Button>\n <Button type=\"danger\" theme=\"outline\">outline</Button>\n <Button type=\"warning\" theme=\"outline\">outline</Button>\n <Button theme=\"outline\">outline</Button>\n </Space>\n <code>dashed</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"dashed\">dashed</Button>\n <Button type=\"danger\" theme=\"dashed\">dashed</Button>\n <Button type=\"warning\" theme=\"dashed\">dashed</Button>\n <Button theme=\"dashed\">dashed</Button>\n </Space>\n <code>fill</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"fill\">primary</Button>\n <Button type=\"danger\" theme=\"fill\">danger</Button>\n <Button type=\"warning\" theme=\"fill\">warning</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n <code>plain</code>\n <Space size=\"small\">\n <Button type=\"primary\" theme=\"plain\">primary</Button>\n <Button type=\"danger\" theme=\"plain\">danger</Button>\n <Button color=\"red\" theme=\"plain\">red</Button>\n <Button theme=\"plain\">default</Button>\n </Space>\n <code>shape</code>\n <Space size=\"small\">\n <Button type=\"primary\" shape=\"round\">Round</Button>\n <Button type=\"danger\" shape=\"circle\">Circle</Button>\n <Button type=\"warning\" shape=\"square\">Square</Button>\n <Button theme=\"fill\">default</Button>\n </Space>\n </Space>\n</template>"
|
|
1295
1308
|
},
|
|
1296
1309
|
{
|
|
1297
1310
|
"title": "多彩",
|
|
@@ -1321,7 +1334,7 @@
|
|
|
1321
1334
|
{
|
|
1322
1335
|
"title": "Block 按钮",
|
|
1323
1336
|
"file": "components/button/demo/block.vue",
|
|
1324
|
-
"source": "<template>\n <Space vertical style=\"width:100%\">\n <Button type=\"primary\" block>Primary</Button>\n <Button type=\"danger\" block>Danger</Button>\n <Button block>Default</Button>\n <Button type=\"text\" block>Text</Button>\n <Button type=\"link\" block>Link</Button>\n </Space>\n</template>"
|
|
1337
|
+
"source": "<template>\n <Space vertical style=\"width: 100%\">\n <Button type=\"primary\" block>Primary</Button>\n <Button type=\"danger\" block>Danger</Button>\n <Button block>Default</Button>\n <Button type=\"text\" block>Text</Button>\n <Button type=\"link\" block>Link</Button>\n </Space>\n</template>"
|
|
1325
1338
|
},
|
|
1326
1339
|
{
|
|
1327
1340
|
"title": "按钮组合",
|
|
@@ -1494,6 +1507,7 @@
|
|
|
1494
1507
|
}
|
|
1495
1508
|
],
|
|
1496
1509
|
"events": [],
|
|
1510
|
+
"slots": [],
|
|
1497
1511
|
"examples": [
|
|
1498
1512
|
{
|
|
1499
1513
|
"title": "基础省市区三级联动",
|
|
@@ -1593,6 +1607,7 @@
|
|
|
1593
1607
|
}
|
|
1594
1608
|
],
|
|
1595
1609
|
"events": [],
|
|
1610
|
+
"slots": [],
|
|
1596
1611
|
"examples": [
|
|
1597
1612
|
{
|
|
1598
1613
|
"title": "基本用法",
|
|
@@ -1665,6 +1680,7 @@
|
|
|
1665
1680
|
}
|
|
1666
1681
|
],
|
|
1667
1682
|
"events": [],
|
|
1683
|
+
"slots": [],
|
|
1668
1684
|
"examples": [
|
|
1669
1685
|
{
|
|
1670
1686
|
"title": "基本用法",
|
|
@@ -1698,6 +1714,187 @@
|
|
|
1698
1714
|
}
|
|
1699
1715
|
]
|
|
1700
1716
|
},
|
|
1717
|
+
{
|
|
1718
|
+
"name": "Calendar",
|
|
1719
|
+
"tags": [
|
|
1720
|
+
"calendar",
|
|
1721
|
+
"k-calendar"
|
|
1722
|
+
],
|
|
1723
|
+
"children": [],
|
|
1724
|
+
"documentation": "https://k-ui.cn/components/calendar",
|
|
1725
|
+
"props": [
|
|
1726
|
+
{
|
|
1727
|
+
"name": "events",
|
|
1728
|
+
"description": "Calendar events",
|
|
1729
|
+
"descriptionZh": "日程数据",
|
|
1730
|
+
"descriptionEn": "Calendar events",
|
|
1731
|
+
"type": "CalendarEventData[]",
|
|
1732
|
+
"boolean": false,
|
|
1733
|
+
"documented": true
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"name": "maxEvents",
|
|
1737
|
+
"description": "Maximum visible events per day",
|
|
1738
|
+
"descriptionZh": "单日最多展示的事件数",
|
|
1739
|
+
"descriptionEn": "Maximum visible events per day",
|
|
1740
|
+
"type": "number",
|
|
1741
|
+
"boolean": false,
|
|
1742
|
+
"documented": true
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
"name": "showToolbar",
|
|
1746
|
+
"description": "Show the calendar toolbar",
|
|
1747
|
+
"descriptionZh": "是否展示工具栏",
|
|
1748
|
+
"descriptionEn": "Show the calendar toolbar",
|
|
1749
|
+
"type": "boolean",
|
|
1750
|
+
"boolean": true,
|
|
1751
|
+
"documented": true
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"name": "onChange",
|
|
1755
|
+
"description": "Emitted when a date or the Today button is selected",
|
|
1756
|
+
"descriptionZh": "选择日期或点击“今天”时触发",
|
|
1757
|
+
"descriptionEn": "Emitted when a date or the Today button is selected",
|
|
1758
|
+
"type": "((date: string, cell: CalendarDateCell) => void) | undefined",
|
|
1759
|
+
"eventName": "change",
|
|
1760
|
+
"boolean": false,
|
|
1761
|
+
"documented": true
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
"name": "modelValue",
|
|
1765
|
+
"description": "Selected date in `YYYY-MM-DD` format",
|
|
1766
|
+
"descriptionZh": "选中日期,格式 `YYYY-MM-DD`",
|
|
1767
|
+
"descriptionEn": "Selected date in `YYYY-MM-DD` format",
|
|
1768
|
+
"type": "string | undefined",
|
|
1769
|
+
"boolean": false,
|
|
1770
|
+
"documented": true
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"name": "firstDayOfWeek",
|
|
1774
|
+
"description": "First weekday, where 0 is Sunday",
|
|
1775
|
+
"descriptionZh": "每周起始日,0 为周日",
|
|
1776
|
+
"descriptionEn": "First weekday, where 0 is Sunday",
|
|
1777
|
+
"type": "number | undefined",
|
|
1778
|
+
"boolean": false,
|
|
1779
|
+
"documented": true
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"name": "todayText",
|
|
1783
|
+
"description": "Today button text",
|
|
1784
|
+
"descriptionZh": "今日按钮文字",
|
|
1785
|
+
"descriptionEn": "Today button text",
|
|
1786
|
+
"type": "string | undefined",
|
|
1787
|
+
"boolean": false,
|
|
1788
|
+
"documented": true
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
"name": "weekdays",
|
|
1792
|
+
"description": "Labels ordered from Sunday to Saturday",
|
|
1793
|
+
"descriptionZh": "星期名称,按周日至周六排列",
|
|
1794
|
+
"descriptionEn": "Labels ordered from Sunday to Saturday",
|
|
1795
|
+
"type": "string[] | undefined",
|
|
1796
|
+
"boolean": false,
|
|
1797
|
+
"documented": true
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"name": "onMonthChange",
|
|
1801
|
+
"description": "Emitted when the displayed month changes",
|
|
1802
|
+
"descriptionZh": "切换展示月份时触发",
|
|
1803
|
+
"descriptionEn": "Emitted when the displayed month changes",
|
|
1804
|
+
"type": "((value: { year: number; month: number; }) => void) | undefined",
|
|
1805
|
+
"eventName": "monthChange",
|
|
1806
|
+
"boolean": false,
|
|
1807
|
+
"documented": true
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"name": "onEventClick",
|
|
1811
|
+
"description": "Emitted when an event is clicked",
|
|
1812
|
+
"descriptionZh": "点击日程时触发",
|
|
1813
|
+
"descriptionEn": "Emitted when an event is clicked",
|
|
1814
|
+
"type": "((event: CalendarEventData, cell: CalendarDateCell) => void) | undefined",
|
|
1815
|
+
"eventName": "eventClick",
|
|
1816
|
+
"boolean": false,
|
|
1817
|
+
"documented": true
|
|
1818
|
+
}
|
|
1819
|
+
],
|
|
1820
|
+
"events": [
|
|
1821
|
+
{
|
|
1822
|
+
"name": "change",
|
|
1823
|
+
"type": "((date: string, cell: CalendarDateCell) => void) | undefined",
|
|
1824
|
+
"description": "Emitted when a date or the Today button is selected",
|
|
1825
|
+
"descriptionZh": "选择日期或点击“今天”时触发",
|
|
1826
|
+
"descriptionEn": "Emitted when a date or the Today button is selected"
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
"name": "monthChange",
|
|
1830
|
+
"type": "((value: { year: number; month: number; }) => void) | undefined",
|
|
1831
|
+
"description": "Emitted when the displayed month changes",
|
|
1832
|
+
"descriptionZh": "切换展示月份时触发",
|
|
1833
|
+
"descriptionEn": "Emitted when the displayed month changes"
|
|
1834
|
+
},
|
|
1835
|
+
{
|
|
1836
|
+
"name": "eventClick",
|
|
1837
|
+
"type": "((event: CalendarEventData, cell: CalendarDateCell) => void) | undefined",
|
|
1838
|
+
"description": "Emitted when an event is clicked",
|
|
1839
|
+
"descriptionZh": "点击日程时触发",
|
|
1840
|
+
"descriptionEn": "Emitted when an event is clicked"
|
|
1841
|
+
}
|
|
1842
|
+
],
|
|
1843
|
+
"slots": [
|
|
1844
|
+
{
|
|
1845
|
+
"name": "title",
|
|
1846
|
+
"description": "Custom month title",
|
|
1847
|
+
"descriptionZh": "自定义月份标题",
|
|
1848
|
+
"descriptionEn": "Custom month title",
|
|
1849
|
+
"scope": "{ year: number, month: number }"
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"name": "extra",
|
|
1853
|
+
"description": "Extra toolbar content",
|
|
1854
|
+
"descriptionZh": "工具栏右侧扩展内容",
|
|
1855
|
+
"descriptionEn": "Extra toolbar content",
|
|
1856
|
+
"scope": "-"
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
"name": "dateCell",
|
|
1860
|
+
"description": "Custom date-cell heading",
|
|
1861
|
+
"descriptionZh": "自定义日期单元格标题",
|
|
1862
|
+
"descriptionEn": "Custom date-cell heading",
|
|
1863
|
+
"scope": "CalendarDateCell"
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
"name": "event",
|
|
1867
|
+
"description": "Custom event content",
|
|
1868
|
+
"descriptionZh": "自定义日程内容",
|
|
1869
|
+
"descriptionEn": "Custom event content",
|
|
1870
|
+
"scope": "{ event: CalendarEventData, cell: CalendarDateCell }"
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
"name": "more",
|
|
1874
|
+
"description": "Custom overflow indicator",
|
|
1875
|
+
"descriptionZh": "自定义超出数量提示",
|
|
1876
|
+
"descriptionEn": "Custom overflow indicator",
|
|
1877
|
+
"scope": "{ count: number, cell: CalendarDateCell }"
|
|
1878
|
+
}
|
|
1879
|
+
],
|
|
1880
|
+
"examples": [
|
|
1881
|
+
{
|
|
1882
|
+
"title": "基本用法",
|
|
1883
|
+
"file": "components/calendar/demo/basic.vue",
|
|
1884
|
+
"source": "<template>\n <Calendar v-model=\"date\" :events=\"events\" @event-click=\"onEventClick\" />\n</template>\n<script setup lang=\"ts\">\nimport { message, type CalendarEventData } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst date = ref(\"2026-08-23\");\nconst events: CalendarEventData[] = [\n { key: 1, date: \"2026-08-23\", time: \"10:00\", title: \"Product review\", color: \"#3a95ff\" },\n { key: 2, date: \"2026-08-25\", title: \"Release\", color: \"#22a06b\" },\n];\nconst onEventClick = (event: CalendarEventData) => message.info(event.title);\n</script>"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
"title": "自定义内容",
|
|
1888
|
+
"file": "components/calendar/demo/custom.vue",
|
|
1889
|
+
"source": "<template>\n <Calendar v-model=\"date\" :events=\"events\" :max-events=\"2\">\n <template #extra><Tag color=\"blue\">Team calendar</Tag></template>\n <template #event=\"{ event }\">\n <button class=\"custom-event\" type=\"button\">\n <i :style=\"{ background: event.color }\"></i>{{ event.title }}\n </button>\n </template>\n <template #more=\"{ count }\"><span class=\"more\">还有 {{ count }} 项</span></template>\n </Calendar>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { CalendarEventData } from \"kui-vue\";\n\nconst date = ref(\"2026-08-23\");\nconst events: CalendarEventData[] = [\n { key: 1, date: \"2026-08-23\", title: \"需求评审\", color: \"#3a95ff\" },\n { key: 2, date: \"2026-08-23\", title: \"设计同步\", color: \"#7b61ff\" },\n { key: 3, date: \"2026-08-23\", title: \"版本发布\", color: \"#22a06b\" },\n];\n</script>\n<style scoped>\n.custom-event { display: flex; width: 100%; gap: 6px; align-items: center; border: 0; background: transparent; color: inherit; }\n.custom-event i { width: 6px; height: 6px; border-radius: 50%; }\n.more { color: var(--kui-color-primary); }\n</style>"
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
"title": "国际化",
|
|
1893
|
+
"file": "components/calendar/demo/locale.vue",
|
|
1894
|
+
"source": "<template>\n <Space vertical style=\"width: 100%\">\n <RadioGroup v-model=\"language\" type=\"button\" :options=\"options\" />\n <ConfigProvider :locale=\"language === 'en' ? en : zhCN\">\n <Calendar v-model=\"date\" />\n </ConfigProvider>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport en from \"kui-vue/locale/en\";\nimport zhCN from \"kui-vue/locale/zh-CN\";\n\nconst language = ref(\"zh\");\nconst date = ref(\"2026-08-23\");\nconst options = [\n { label: \"中文\", value: \"zh\" },\n { label: \"English\", value: \"en\" },\n];\n</script>"
|
|
1895
|
+
}
|
|
1896
|
+
]
|
|
1897
|
+
},
|
|
1701
1898
|
{
|
|
1702
1899
|
"name": "FeatureCard",
|
|
1703
1900
|
"tags": [
|
|
@@ -1734,35 +1931,139 @@
|
|
|
1734
1931
|
"boolean": false,
|
|
1735
1932
|
"documented": true
|
|
1736
1933
|
},
|
|
1934
|
+
{
|
|
1935
|
+
"name": "size",
|
|
1936
|
+
"description": "Card size",
|
|
1937
|
+
"descriptionZh": "卡片尺寸",
|
|
1938
|
+
"descriptionEn": "Card size",
|
|
1939
|
+
"type": "SizeType",
|
|
1940
|
+
"boolean": false,
|
|
1941
|
+
"documented": true
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
"name": "direction",
|
|
1945
|
+
"description": "Content direction",
|
|
1946
|
+
"descriptionZh": "内容排列方向",
|
|
1947
|
+
"descriptionEn": "Content direction",
|
|
1948
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
1949
|
+
"boolean": false,
|
|
1950
|
+
"documented": true
|
|
1951
|
+
},
|
|
1737
1952
|
{
|
|
1738
1953
|
"name": "icon",
|
|
1739
|
-
"description": "
|
|
1740
|
-
"descriptionZh": "
|
|
1741
|
-
"descriptionEn": "
|
|
1954
|
+
"description": "Custom icon",
|
|
1955
|
+
"descriptionZh": "自定义图标",
|
|
1956
|
+
"descriptionEn": "Custom icon",
|
|
1742
1957
|
"type": "IconType[] | undefined",
|
|
1743
1958
|
"boolean": false,
|
|
1744
1959
|
"documented": true
|
|
1745
1960
|
},
|
|
1961
|
+
{
|
|
1962
|
+
"name": "disabled",
|
|
1963
|
+
"description": "Disable interaction",
|
|
1964
|
+
"descriptionZh": "是否禁用交互",
|
|
1965
|
+
"descriptionEn": "Disable interaction",
|
|
1966
|
+
"type": "boolean | undefined",
|
|
1967
|
+
"boolean": true,
|
|
1968
|
+
"documented": true
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
"name": "onClick",
|
|
1972
|
+
"description": "Emitted when clicked",
|
|
1973
|
+
"descriptionZh": "点击时触发",
|
|
1974
|
+
"descriptionEn": "Emitted when clicked",
|
|
1975
|
+
"type": "((event: MouseEvent) => void) | undefined",
|
|
1976
|
+
"eventName": "click",
|
|
1977
|
+
"boolean": false,
|
|
1978
|
+
"documented": true
|
|
1979
|
+
},
|
|
1746
1980
|
{
|
|
1747
1981
|
"name": "title",
|
|
1748
|
-
"description": "
|
|
1749
|
-
"descriptionZh": "
|
|
1750
|
-
"descriptionEn": "
|
|
1982
|
+
"description": "Custom title",
|
|
1983
|
+
"descriptionZh": "自定义标题",
|
|
1984
|
+
"descriptionEn": "Custom title",
|
|
1985
|
+
"type": "string | undefined",
|
|
1986
|
+
"boolean": false,
|
|
1987
|
+
"documented": true
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
"name": "color",
|
|
1991
|
+
"description": "Icon accent color",
|
|
1992
|
+
"descriptionZh": "图标强调色",
|
|
1993
|
+
"descriptionEn": "Icon accent color",
|
|
1751
1994
|
"type": "string | undefined",
|
|
1752
1995
|
"boolean": false,
|
|
1753
1996
|
"documented": true
|
|
1754
1997
|
},
|
|
1755
1998
|
{
|
|
1756
1999
|
"name": "desc",
|
|
1757
|
-
"description": "
|
|
1758
|
-
"descriptionZh": "
|
|
1759
|
-
"descriptionEn": "
|
|
2000
|
+
"description": "Custom description",
|
|
2001
|
+
"descriptionZh": "自定义描述",
|
|
2002
|
+
"descriptionEn": "Custom description",
|
|
2003
|
+
"type": "string | undefined",
|
|
2004
|
+
"boolean": false,
|
|
2005
|
+
"documented": true
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"name": "clickable",
|
|
2009
|
+
"description": "Enable interaction and keyboard semantics",
|
|
2010
|
+
"descriptionZh": "是否可交互;启用键盘及按钮语义",
|
|
2011
|
+
"descriptionEn": "Enable interaction and keyboard semantics",
|
|
2012
|
+
"type": "boolean | undefined",
|
|
2013
|
+
"boolean": true,
|
|
2014
|
+
"documented": true
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
"name": "iconBackground",
|
|
2018
|
+
"description": "Icon container background; derived from `color` when omitted",
|
|
2019
|
+
"descriptionZh": "图标容器背景;未设置时根据 `color` 自动生成",
|
|
2020
|
+
"descriptionEn": "Icon container background; derived from `color` when omitted",
|
|
1760
2021
|
"type": "string | undefined",
|
|
1761
2022
|
"boolean": false,
|
|
1762
2023
|
"documented": true
|
|
1763
2024
|
}
|
|
1764
2025
|
],
|
|
1765
|
-
"events": [
|
|
2026
|
+
"events": [
|
|
2027
|
+
{
|
|
2028
|
+
"name": "click",
|
|
2029
|
+
"type": "((event: MouseEvent) => void) | undefined",
|
|
2030
|
+
"description": "Emitted when clicked",
|
|
2031
|
+
"descriptionZh": "点击时触发",
|
|
2032
|
+
"descriptionEn": "Emitted when clicked"
|
|
2033
|
+
}
|
|
2034
|
+
],
|
|
2035
|
+
"slots": [
|
|
2036
|
+
{
|
|
2037
|
+
"name": "icon",
|
|
2038
|
+
"description": "Custom icon",
|
|
2039
|
+
"descriptionZh": "自定义图标",
|
|
2040
|
+
"descriptionEn": "Custom icon"
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
"name": "title",
|
|
2044
|
+
"description": "Custom title",
|
|
2045
|
+
"descriptionZh": "自定义标题",
|
|
2046
|
+
"descriptionEn": "Custom title"
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
"name": "desc",
|
|
2050
|
+
"description": "Custom description",
|
|
2051
|
+
"descriptionZh": "自定义描述",
|
|
2052
|
+
"descriptionEn": "Custom description"
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
"name": "extra",
|
|
2056
|
+
"description": "Trailing content",
|
|
2057
|
+
"descriptionZh": "右侧扩展区域",
|
|
2058
|
+
"descriptionEn": "Trailing content"
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"name": "default",
|
|
2062
|
+
"description": "Additional content",
|
|
2063
|
+
"descriptionZh": "补充内容",
|
|
2064
|
+
"descriptionEn": "Additional content"
|
|
2065
|
+
}
|
|
2066
|
+
],
|
|
1766
2067
|
"examples": [
|
|
1767
2068
|
{
|
|
1768
2069
|
"title": "基本用法",
|
|
@@ -1773,6 +2074,16 @@
|
|
|
1773
2074
|
"title": "边框",
|
|
1774
2075
|
"file": "components/feature-card/demo/bordered.vue",
|
|
1775
2076
|
"source": "<template>\n <div class=\"feature-demo\">\n <FeatureCard\n :icon=\"Code\"\n title=\"显示边框\"\n desc=\"设置 bordered 后显示边框,适合放置在普通页面背景中。\"\n bordered\n />\n <FeatureCard\n :icon=\"Code\"\n title=\"隐藏边框\"\n desc=\"默认不显示边框,可将卡片放在具有层次的容器背景中。\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { Code } from \"kui-icons\";\n</script>\n\n<style scoped>\n.feature-demo {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 16px;\n padding: 16px;\n background: var(--kui-color-bg);\n}\n</style>"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"title": "尺寸",
|
|
2080
|
+
"file": "components/feature-card/demo/size.vue",
|
|
2081
|
+
"source": "<template>\n <Space vertical block :size=\"12\">\n <FeatureCard v-for=\"size in sizes\" :key=\"size\" :icon=\"Zap\" :size=\"size\" :title=\"`${size} card`\" desc=\"Icon, spacing and typography scale together.\" theme=\"outline\" />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Zap } from \"kui-icons\";\nimport type { SizeType } from \"kui-vue\";\nconst sizes: SizeType[] = [\"small\", \"medium\", \"large\"];\n</script>"
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
"title": "功能入口",
|
|
2085
|
+
"file": "components/feature-card/demo/interactive.vue",
|
|
2086
|
+
"source": "<template>\n <Grid :cols=\"{ xs: 2, md: 4 }\" :x-gap=\"12\" :y-gap=\"12\">\n <GridItem v-for=\"item in entries\" :key=\"item.title\">\n <FeatureCard\n :icon=\"item.icon\"\n :title=\"item.title\"\n :color=\"item.color\"\n size=\"small\"\n direction=\"vertical\"\n theme=\"outline\"\n clickable\n @click=\"message.info(item.title)\"\n />\n </GridItem>\n </Grid>\n</template>\n<script setup lang=\"ts\">\nimport { FolderKanban, ShoppingCart, Users, Wallet } from \"kui-icons\";\nimport { message } from \"kui-vue\";\nconst entries = [\n { title: \"项目管理\", icon: FolderKanban, color: \"#3a95ff\" },\n { title: \"订单管理\", icon: ShoppingCart, color: \"#7b61ff\" },\n { title: \"客户管理\", icon: Users, color: \"#22a06b\" },\n { title: \"财务报表\", icon: Wallet, color: \"#f59e0b\" },\n];\n</script>"
|
|
1776
2087
|
}
|
|
1777
2088
|
]
|
|
1778
2089
|
},
|
|
@@ -1967,6 +2278,7 @@
|
|
|
1967
2278
|
}
|
|
1968
2279
|
],
|
|
1969
2280
|
"events": [],
|
|
2281
|
+
"slots": [],
|
|
1970
2282
|
"examples": [
|
|
1971
2283
|
{
|
|
1972
2284
|
"title": "基础用法",
|
|
@@ -1980,6 +2292,132 @@
|
|
|
1980
2292
|
}
|
|
1981
2293
|
]
|
|
1982
2294
|
},
|
|
2295
|
+
{
|
|
2296
|
+
"name": "ListPanel",
|
|
2297
|
+
"tags": [
|
|
2298
|
+
"list-panel",
|
|
2299
|
+
"k-list-panel"
|
|
2300
|
+
],
|
|
2301
|
+
"children": [],
|
|
2302
|
+
"documentation": "https://k-ui.cn/components/list-panel",
|
|
2303
|
+
"props": [
|
|
2304
|
+
{
|
|
2305
|
+
"name": "bordered",
|
|
2306
|
+
"description": "Show border",
|
|
2307
|
+
"descriptionZh": "是否显示边框",
|
|
2308
|
+
"descriptionEn": "Show border",
|
|
2309
|
+
"type": "boolean",
|
|
2310
|
+
"boolean": true,
|
|
2311
|
+
"documented": true
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"name": "theme",
|
|
2315
|
+
"description": "Panel theme",
|
|
2316
|
+
"descriptionZh": "面板外观",
|
|
2317
|
+
"descriptionEn": "Panel theme",
|
|
2318
|
+
"type": "ThemeType",
|
|
2319
|
+
"boolean": false,
|
|
2320
|
+
"documented": true
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
"name": "shape",
|
|
2324
|
+
"description": "Panel shape",
|
|
2325
|
+
"descriptionZh": "面板形状",
|
|
2326
|
+
"descriptionEn": "Panel shape",
|
|
2327
|
+
"type": "ShapeType",
|
|
2328
|
+
"boolean": false,
|
|
2329
|
+
"documented": true
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
"name": "size",
|
|
2333
|
+
"description": "Panel size",
|
|
2334
|
+
"descriptionZh": "面板尺寸",
|
|
2335
|
+
"descriptionEn": "Panel size",
|
|
2336
|
+
"type": "SizeType",
|
|
2337
|
+
"boolean": false,
|
|
2338
|
+
"documented": true
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
"name": "selectedCount",
|
|
2342
|
+
"description": "Current selection count used to show bulk actions",
|
|
2343
|
+
"descriptionZh": "当前选中数量,用于切换批量操作栏",
|
|
2344
|
+
"descriptionEn": "Current selection count used to show bulk actions",
|
|
2345
|
+
"type": "number",
|
|
2346
|
+
"boolean": false,
|
|
2347
|
+
"documented": true
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
"name": "summary",
|
|
2351
|
+
"description": "Custom result summary",
|
|
2352
|
+
"descriptionZh": "自定义结果摘要",
|
|
2353
|
+
"descriptionEn": "Custom result summary",
|
|
2354
|
+
"type": "string | number | undefined",
|
|
2355
|
+
"boolean": false,
|
|
2356
|
+
"documented": true
|
|
2357
|
+
}
|
|
2358
|
+
],
|
|
2359
|
+
"events": [],
|
|
2360
|
+
"slots": [
|
|
2361
|
+
{
|
|
2362
|
+
"name": "filters",
|
|
2363
|
+
"description": "Query controls",
|
|
2364
|
+
"descriptionZh": "查询条件区域",
|
|
2365
|
+
"descriptionEn": "Query controls"
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
"name": "summary",
|
|
2369
|
+
"description": "Custom result summary",
|
|
2370
|
+
"descriptionZh": "自定义结果摘要",
|
|
2371
|
+
"descriptionEn": "Custom result summary"
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
"name": "actions",
|
|
2375
|
+
"description": "Toolbar actions",
|
|
2376
|
+
"descriptionZh": "查询栏右侧操作",
|
|
2377
|
+
"descriptionEn": "Toolbar actions"
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
"name": "selection",
|
|
2381
|
+
"description": "Bulk action toolbar, scoped with `{ count }",
|
|
2382
|
+
"descriptionZh": "批量操作栏,作用域参数为 `{ count }",
|
|
2383
|
+
"descriptionEn": "Bulk action toolbar, scoped with `{ count }"
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
"name": "default",
|
|
2387
|
+
"description": "Table, list or other primary content",
|
|
2388
|
+
"descriptionZh": "列表、表格或其他主要内容",
|
|
2389
|
+
"descriptionEn": "Table, list or other primary content"
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
"name": "footer",
|
|
2393
|
+
"description": "Pagination or footer actions",
|
|
2394
|
+
"descriptionZh": "分页或列表底部操作",
|
|
2395
|
+
"descriptionEn": "Pagination or footer actions"
|
|
2396
|
+
}
|
|
2397
|
+
],
|
|
2398
|
+
"examples": [
|
|
2399
|
+
{
|
|
2400
|
+
"title": "查询列表",
|
|
2401
|
+
"file": "components/list-panel/demo/basic.vue",
|
|
2402
|
+
"source": "<template>\n <ListPanel :summary=\"`${data.length} records`\">\n <template #filters>\n <Input v-model=\"keyword\" clearable placeholder=\"Search users\" :icon=\"Search\" />\n <Select v-model=\"status\" clearable placeholder=\"All statuses\" :options=\"options\" />\n </template>\n <Table :data=\"filtered\" :columns=\"columns\" />\n </ListPanel>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport type { Column } from \"kui-vue\";\nimport { computed, ref } from \"vue\";\nconst keyword = ref(\"\");\nconst status = ref<string>();\nconst options = [{ label: \"Active\", value: \"Active\" }, { label: \"Disabled\", value: \"Disabled\" }];\nconst columns: Column[] = [{ title: \"Name\", key: \"name\" }, { title: \"Status\", key: \"status\" }];\nconst data = [{ key: 1, name: \"Alex\", status: \"Active\" }, { key: 2, name: \"Mia\", status: \"Disabled\" }];\nconst filtered = computed(() => data.filter((item) => (!keyword.value || item.name.includes(keyword.value)) && (!status.value || item.status === status.value)));\n</script>"
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
"title": "工具操作",
|
|
2406
|
+
"file": "components/list-panel/demo/actions.vue",
|
|
2407
|
+
"source": "<template>\n <ListPanel summary=\"Updated just now\">\n <template #filters><Input placeholder=\"Search projects\" :icon=\"Search\" /></template>\n <template #actions><Button :icon=\"RotateCcw\">Reset</Button><Button type=\"primary\" :icon=\"Plus\">Create</Button></template>\n <Empty description=\"No matching projects\" />\n </ListPanel>\n</template>\n<script setup lang=\"ts\">\nimport { Plus, RotateCcw, Search } from \"kui-icons\";\n</script>"
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
"title": "分页与外观",
|
|
2411
|
+
"file": "components/list-panel/demo/footer.vue",
|
|
2412
|
+
"source": "<template>\n <ListPanel summary=\"Total 128 users\" size=\"small\" shape=\"square\">\n <Table :data=\"data\" :columns=\"columns\" size=\"small\" />\n <template #footer><Page :total=\"128\" :page-size=\"10\" show-total /></template>\n </ListPanel>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nconst columns: Column[] = [{ title: \"Name\", key: \"name\" }, { title: \"Email\", key: \"email\" }];\nconst data = [{ key: 1, name: \"Alex\", email: \"alex@example.com\" }];\n</script>"
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
"title": "批量操作",
|
|
2416
|
+
"file": "components/list-panel/demo/selection.vue",
|
|
2417
|
+
"source": "<template>\n <ListPanel :selected-count=\"selectedKeys.length\" summary=\"3 users\">\n <template #filters><Input placeholder=\"Search users\" :icon=\"Search\" /></template>\n <template #selection=\"{ count }\">\n <strong>{{ count }} selected</strong>\n <Button size=\"small\" type=\"danger\" theme=\"plain\">Disable</Button>\n <Button size=\"small\" theme=\"plain\" @click=\"selectedKeys = []\">Clear</Button>\n </template>\n <Table v-model:selected-keys=\"selectedKeys\" checkable :data=\"data\" :columns=\"columns\" />\n </ListPanel>\n</template>\n<script setup lang=\"ts\">\nimport { Search } from \"kui-icons\";\nimport type { Column, TableKey } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst selectedKeys = ref<TableKey[]>([]);\nconst columns: Column[] = [{ title: \"Name\", key: \"name\" }, { title: \"Role\", key: \"role\" }];\nconst data = [{ key: 1, name: \"Alex\", role: \"Admin\" }, { key: 2, name: \"Mia\", role: \"Editor\" }, { key: 3, name: \"Leo\", role: \"Viewer\" }];\n</script>"
|
|
2418
|
+
}
|
|
2419
|
+
]
|
|
2420
|
+
},
|
|
1983
2421
|
{
|
|
1984
2422
|
"name": "Carousel",
|
|
1985
2423
|
"tags": [
|
|
@@ -2009,6 +2447,15 @@
|
|
|
2009
2447
|
"boolean": false,
|
|
2010
2448
|
"documented": true
|
|
2011
2449
|
},
|
|
2450
|
+
{
|
|
2451
|
+
"name": "vertical",
|
|
2452
|
+
"description": "Whether to display in vertical mode",
|
|
2453
|
+
"descriptionZh": "是否垂直模式显示",
|
|
2454
|
+
"descriptionEn": "Whether to display in vertical mode",
|
|
2455
|
+
"type": "boolean",
|
|
2456
|
+
"boolean": true,
|
|
2457
|
+
"documented": true
|
|
2458
|
+
},
|
|
2012
2459
|
{
|
|
2013
2460
|
"name": "loop",
|
|
2014
2461
|
"description": "Whether to enable loop",
|
|
@@ -2027,15 +2474,6 @@
|
|
|
2027
2474
|
"boolean": false,
|
|
2028
2475
|
"documented": true
|
|
2029
2476
|
},
|
|
2030
|
-
{
|
|
2031
|
-
"name": "vertical",
|
|
2032
|
-
"description": "Whether to display in vertical mode",
|
|
2033
|
-
"descriptionZh": "是否垂直模式显示",
|
|
2034
|
-
"descriptionEn": "Whether to display in vertical mode",
|
|
2035
|
-
"type": "boolean",
|
|
2036
|
-
"boolean": true,
|
|
2037
|
-
"documented": true
|
|
2038
|
-
},
|
|
2039
2477
|
{
|
|
2040
2478
|
"name": "dots",
|
|
2041
2479
|
"description": "Whether to show the dots at the bottom of the gallery",
|
|
@@ -2056,6 +2494,7 @@
|
|
|
2056
2494
|
}
|
|
2057
2495
|
],
|
|
2058
2496
|
"events": [],
|
|
2497
|
+
"slots": [],
|
|
2059
2498
|
"examples": [
|
|
2060
2499
|
{
|
|
2061
2500
|
"title": "基本用法",
|
|
@@ -2085,6 +2524,7 @@
|
|
|
2085
2524
|
"documentation": "https://k-ui.cn/components/carousel-item",
|
|
2086
2525
|
"props": [],
|
|
2087
2526
|
"events": [],
|
|
2527
|
+
"slots": [],
|
|
2088
2528
|
"examples": []
|
|
2089
2529
|
},
|
|
2090
2530
|
{
|
|
@@ -2198,6 +2638,7 @@
|
|
|
2198
2638
|
"descriptionEn": "Triggered when the option state changes, returns the currently selected item and state"
|
|
2199
2639
|
}
|
|
2200
2640
|
],
|
|
2641
|
+
"slots": [],
|
|
2201
2642
|
"examples": [
|
|
2202
2643
|
{
|
|
2203
2644
|
"title": "单选",
|
|
@@ -2311,6 +2752,7 @@
|
|
|
2311
2752
|
"descriptionEn": "Triggered when the option state changes, returns the currently selected item and state"
|
|
2312
2753
|
}
|
|
2313
2754
|
],
|
|
2755
|
+
"slots": [],
|
|
2314
2756
|
"examples": [
|
|
2315
2757
|
{
|
|
2316
2758
|
"title": "单选",
|
|
@@ -2468,6 +2910,7 @@
|
|
|
2468
2910
|
"descriptionEn": "Emitted when the selected value changes"
|
|
2469
2911
|
}
|
|
2470
2912
|
],
|
|
2913
|
+
"slots": [],
|
|
2471
2914
|
"examples": [
|
|
2472
2915
|
{
|
|
2473
2916
|
"title": "独立选择",
|
|
@@ -2585,6 +3028,7 @@
|
|
|
2585
3028
|
"descriptionEn": "Emitted when the selected value changes"
|
|
2586
3029
|
}
|
|
2587
3030
|
],
|
|
3031
|
+
"slots": [],
|
|
2588
3032
|
"examples": [
|
|
2589
3033
|
{
|
|
2590
3034
|
"title": "独立选择",
|
|
@@ -2684,6 +3128,7 @@
|
|
|
2684
3128
|
"descriptionEn": "Callback triggered when switching panels, returns the `name` of the current tab"
|
|
2685
3129
|
}
|
|
2686
3130
|
],
|
|
3131
|
+
"slots": [],
|
|
2687
3132
|
"examples": [
|
|
2688
3133
|
{
|
|
2689
3134
|
"title": "基本用法",
|
|
@@ -2733,6 +3178,7 @@
|
|
|
2733
3178
|
}
|
|
2734
3179
|
],
|
|
2735
3180
|
"events": [],
|
|
3181
|
+
"slots": [],
|
|
2736
3182
|
"examples": [
|
|
2737
3183
|
{
|
|
2738
3184
|
"title": "基本用法",
|
|
@@ -2772,6 +3218,7 @@
|
|
|
2772
3218
|
"documentation": "https://k-ui.cn/components/color-picker-panel",
|
|
2773
3219
|
"props": [],
|
|
2774
3220
|
"events": [],
|
|
3221
|
+
"slots": [],
|
|
2775
3222
|
"examples": []
|
|
2776
3223
|
},
|
|
2777
3224
|
{
|
|
@@ -2938,6 +3385,7 @@
|
|
|
2938
3385
|
"descriptionEn": "Triggered when the color mode is updated"
|
|
2939
3386
|
}
|
|
2940
3387
|
],
|
|
3388
|
+
"slots": [],
|
|
2941
3389
|
"examples": [
|
|
2942
3390
|
{
|
|
2943
3391
|
"title": "基本用法",
|
|
@@ -2972,6 +3420,7 @@
|
|
|
2972
3420
|
"documentation": "https://k-ui.cn/components/date-picker-panel",
|
|
2973
3421
|
"props": [],
|
|
2974
3422
|
"events": [],
|
|
3423
|
+
"slots": [],
|
|
2975
3424
|
"examples": []
|
|
2976
3425
|
},
|
|
2977
3426
|
{
|
|
@@ -3228,6 +3677,7 @@
|
|
|
3228
3677
|
"descriptionEn": "Triggered when the dropdown box expands or collapses"
|
|
3229
3678
|
}
|
|
3230
3679
|
],
|
|
3680
|
+
"slots": [],
|
|
3231
3681
|
"examples": [
|
|
3232
3682
|
{
|
|
3233
3683
|
"title": "基本用法",
|
|
@@ -3352,11 +3802,12 @@
|
|
|
3352
3802
|
}
|
|
3353
3803
|
],
|
|
3354
3804
|
"events": [],
|
|
3805
|
+
"slots": [],
|
|
3355
3806
|
"examples": [
|
|
3356
3807
|
{
|
|
3357
3808
|
"title": "基本用法",
|
|
3358
3809
|
"file": "components/descriptions/demo/basic.vue",
|
|
3359
|
-
"source": "<template>\n <Descriptions title=\"Order Information\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Tel\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\"
|
|
3810
|
+
"source": "<template>\n <Descriptions title=\"Order Information\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Tel\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\">\n No. 188, Guanggu, Hongshan District, Wuhan City, Hubei Province, China\n </DescriptionsItem>\n </Descriptions>\n</template>"
|
|
3360
3811
|
},
|
|
3361
3812
|
{
|
|
3362
3813
|
"title": "带边框的",
|
|
@@ -3371,7 +3822,7 @@
|
|
|
3371
3822
|
{
|
|
3372
3823
|
"title": "垂直",
|
|
3373
3824
|
"file": "components/descriptions/demo/vertical.vue",
|
|
3374
|
-
"source": "<template>\n <Descriptions title=\"Order Information\" layout=\"vertical\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Phone\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\"
|
|
3825
|
+
"source": "<template>\n <Descriptions title=\"Order Information\" layout=\"vertical\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Phone\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\">\n No. 188, Guanggu, Hongshan District, Wuhan City, Hubei Province\n </DescriptionsItem>\n </Descriptions>\n</template>"
|
|
3375
3826
|
},
|
|
3376
3827
|
{
|
|
3377
3828
|
"title": "垂直带边框",
|
|
@@ -3437,11 +3888,12 @@
|
|
|
3437
3888
|
}
|
|
3438
3889
|
],
|
|
3439
3890
|
"events": [],
|
|
3891
|
+
"slots": [],
|
|
3440
3892
|
"examples": [
|
|
3441
3893
|
{
|
|
3442
3894
|
"title": "基本用法",
|
|
3443
3895
|
"file": "components/descriptions/demo/basic.vue",
|
|
3444
|
-
"source": "<template>\n <Descriptions title=\"Order Information\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Tel\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\"
|
|
3896
|
+
"source": "<template>\n <Descriptions title=\"Order Information\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Tel\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\">\n No. 188, Guanggu, Hongshan District, Wuhan City, Hubei Province, China\n </DescriptionsItem>\n </Descriptions>\n</template>"
|
|
3445
3897
|
},
|
|
3446
3898
|
{
|
|
3447
3899
|
"title": "带边框的",
|
|
@@ -3456,7 +3908,7 @@
|
|
|
3456
3908
|
{
|
|
3457
3909
|
"title": "垂直",
|
|
3458
3910
|
"file": "components/descriptions/demo/vertical.vue",
|
|
3459
|
-
"source": "<template>\n <Descriptions title=\"Order Information\" layout=\"vertical\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Phone\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\"
|
|
3911
|
+
"source": "<template>\n <Descriptions title=\"Order Information\" layout=\"vertical\">\n <DescriptionsItem label=\"Order Numbers\">20202203302200</DescriptionsItem>\n <DescriptionsItem label=\"Price\">¥ 199.99</DescriptionsItem>\n <DescriptionsItem label=\"Name\">Qiu</DescriptionsItem>\n <DescriptionsItem label=\"Phone\">13888888888</DescriptionsItem>\n <DescriptionsItem label=\"Shipping Address\">\n No. 188, Guanggu, Hongshan District, Wuhan City, Hubei Province\n </DescriptionsItem>\n </Descriptions>\n</template>"
|
|
3460
3912
|
},
|
|
3461
3913
|
{
|
|
3462
3914
|
"title": "垂直带边框",
|
|
@@ -3671,6 +4123,7 @@
|
|
|
3671
4123
|
"descriptionEn": "Callback when Cancel is clicked"
|
|
3672
4124
|
}
|
|
3673
4125
|
],
|
|
4126
|
+
"slots": [],
|
|
3674
4127
|
"examples": [
|
|
3675
4128
|
{
|
|
3676
4129
|
"title": "基本用法",
|
|
@@ -3777,6 +4230,7 @@
|
|
|
3777
4230
|
"descriptionEn": "Triggered when opening or closing a Dropdown"
|
|
3778
4231
|
}
|
|
3779
4232
|
],
|
|
4233
|
+
"slots": [],
|
|
3780
4234
|
"examples": [
|
|
3781
4235
|
{
|
|
3782
4236
|
"title": "基本用法",
|
|
@@ -3902,6 +4356,7 @@
|
|
|
3902
4356
|
"descriptionEn": "Triggered when the main button is clicked"
|
|
3903
4357
|
}
|
|
3904
4358
|
],
|
|
4359
|
+
"slots": [],
|
|
3905
4360
|
"examples": [
|
|
3906
4361
|
{
|
|
3907
4362
|
"title": "基本用法",
|
|
@@ -3982,6 +4437,7 @@
|
|
|
3982
4437
|
}
|
|
3983
4438
|
],
|
|
3984
4439
|
"events": [],
|
|
4440
|
+
"slots": [],
|
|
3985
4441
|
"examples": [
|
|
3986
4442
|
{
|
|
3987
4443
|
"title": "垂直分割线",
|
|
@@ -4038,6 +4494,7 @@
|
|
|
4038
4494
|
}
|
|
4039
4495
|
],
|
|
4040
4496
|
"events": [],
|
|
4497
|
+
"slots": [],
|
|
4041
4498
|
"examples": [
|
|
4042
4499
|
{
|
|
4043
4500
|
"title": "基本用法",
|
|
@@ -4199,6 +4656,7 @@
|
|
|
4199
4656
|
"descriptionEn": "Trigger event when submitting the form"
|
|
4200
4657
|
}
|
|
4201
4658
|
],
|
|
4659
|
+
"slots": [],
|
|
4202
4660
|
"examples": [
|
|
4203
4661
|
{
|
|
4204
4662
|
"title": "典型表单",
|
|
@@ -4294,6 +4752,7 @@
|
|
|
4294
4752
|
}
|
|
4295
4753
|
],
|
|
4296
4754
|
"events": [],
|
|
4755
|
+
"slots": [],
|
|
4297
4756
|
"examples": [
|
|
4298
4757
|
{
|
|
4299
4758
|
"title": "典型表单",
|
|
@@ -4388,6 +4847,7 @@
|
|
|
4388
4847
|
}
|
|
4389
4848
|
],
|
|
4390
4849
|
"events": [],
|
|
4850
|
+
"slots": [],
|
|
4391
4851
|
"examples": [
|
|
4392
4852
|
{
|
|
4393
4853
|
"title": "基本布局",
|
|
@@ -4514,6 +4974,7 @@
|
|
|
4514
4974
|
}
|
|
4515
4975
|
],
|
|
4516
4976
|
"events": [],
|
|
4977
|
+
"slots": [],
|
|
4517
4978
|
"examples": [
|
|
4518
4979
|
{
|
|
4519
4980
|
"title": "基本用法",
|
|
@@ -4615,6 +5076,7 @@
|
|
|
4615
5076
|
}
|
|
4616
5077
|
],
|
|
4617
5078
|
"events": [],
|
|
5079
|
+
"slots": [],
|
|
4618
5080
|
"examples": [
|
|
4619
5081
|
{
|
|
4620
5082
|
"title": "基本用法",
|
|
@@ -4822,6 +5284,7 @@
|
|
|
4822
5284
|
"descriptionEn": "Multi-image switch trigger event"
|
|
4823
5285
|
}
|
|
4824
5286
|
],
|
|
5287
|
+
"slots": [],
|
|
4825
5288
|
"examples": [
|
|
4826
5289
|
{
|
|
4827
5290
|
"title": "基本用法",
|
|
@@ -4867,6 +5330,7 @@
|
|
|
4867
5330
|
}
|
|
4868
5331
|
],
|
|
4869
5332
|
"events": [],
|
|
5333
|
+
"slots": [],
|
|
4870
5334
|
"examples": [
|
|
4871
5335
|
{
|
|
4872
5336
|
"title": "基本用法",
|
|
@@ -4973,6 +5437,7 @@
|
|
|
4973
5437
|
"descriptionEn": "Click event"
|
|
4974
5438
|
}
|
|
4975
5439
|
],
|
|
5440
|
+
"slots": [],
|
|
4976
5441
|
"examples": [
|
|
4977
5442
|
{
|
|
4978
5443
|
"title": "IconList",
|
|
@@ -5183,6 +5648,7 @@
|
|
|
5183
5648
|
"descriptionEn": "Callback for icon click event"
|
|
5184
5649
|
}
|
|
5185
5650
|
],
|
|
5651
|
+
"slots": [],
|
|
5186
5652
|
"examples": [
|
|
5187
5653
|
{
|
|
5188
5654
|
"title": "基本用法",
|
|
@@ -5273,6 +5739,7 @@
|
|
|
5273
5739
|
}
|
|
5274
5740
|
],
|
|
5275
5741
|
"events": [],
|
|
5742
|
+
"slots": [],
|
|
5276
5743
|
"examples": [
|
|
5277
5744
|
{
|
|
5278
5745
|
"title": "基本用法",
|
|
@@ -5417,6 +5884,7 @@
|
|
|
5417
5884
|
"descriptionEn": "Triggered when the content changes"
|
|
5418
5885
|
}
|
|
5419
5886
|
],
|
|
5887
|
+
"slots": [],
|
|
5420
5888
|
"examples": [
|
|
5421
5889
|
{
|
|
5422
5890
|
"title": "基本用法",
|
|
@@ -5657,6 +6125,7 @@
|
|
|
5657
6125
|
"descriptionEn": "Tag removed"
|
|
5658
6126
|
}
|
|
5659
6127
|
],
|
|
6128
|
+
"slots": [],
|
|
5660
6129
|
"examples": [
|
|
5661
6130
|
{
|
|
5662
6131
|
"title": "基础用法",
|
|
@@ -5895,6 +6364,7 @@
|
|
|
5895
6364
|
"descriptionEn": "Emitted when an input loses focus"
|
|
5896
6365
|
}
|
|
5897
6366
|
],
|
|
6367
|
+
"slots": [],
|
|
5898
6368
|
"examples": [
|
|
5899
6369
|
{
|
|
5900
6370
|
"title": "基本用法",
|
|
@@ -6120,6 +6590,7 @@
|
|
|
6120
6590
|
"descriptionEn": "Change callback"
|
|
6121
6591
|
}
|
|
6122
6592
|
],
|
|
6593
|
+
"slots": [],
|
|
6123
6594
|
"examples": [
|
|
6124
6595
|
{
|
|
6125
6596
|
"title": "基本用法",
|
|
@@ -6154,6 +6625,7 @@
|
|
|
6154
6625
|
"documentation": "https://k-ui.cn/components/content",
|
|
6155
6626
|
"props": [],
|
|
6156
6627
|
"events": [],
|
|
6628
|
+
"slots": [],
|
|
6157
6629
|
"examples": []
|
|
6158
6630
|
},
|
|
6159
6631
|
{
|
|
@@ -6167,6 +6639,7 @@
|
|
|
6167
6639
|
"documentation": "https://k-ui.cn/components/footer",
|
|
6168
6640
|
"props": [],
|
|
6169
6641
|
"events": [],
|
|
6642
|
+
"slots": [],
|
|
6170
6643
|
"examples": []
|
|
6171
6644
|
},
|
|
6172
6645
|
{
|
|
@@ -6180,6 +6653,7 @@
|
|
|
6180
6653
|
"documentation": "https://k-ui.cn/components/header",
|
|
6181
6654
|
"props": [],
|
|
6182
6655
|
"events": [],
|
|
6656
|
+
"slots": [],
|
|
6183
6657
|
"examples": []
|
|
6184
6658
|
},
|
|
6185
6659
|
{
|
|
@@ -6197,6 +6671,7 @@
|
|
|
6197
6671
|
"documentation": "https://k-ui.cn/components/layout",
|
|
6198
6672
|
"props": [],
|
|
6199
6673
|
"events": [],
|
|
6674
|
+
"slots": [],
|
|
6200
6675
|
"examples": [
|
|
6201
6676
|
{
|
|
6202
6677
|
"title": "基础布局",
|
|
@@ -6246,6 +6721,7 @@
|
|
|
6246
6721
|
"documentation": "https://k-ui.cn/components/sider",
|
|
6247
6722
|
"props": [],
|
|
6248
6723
|
"events": [],
|
|
6724
|
+
"slots": [],
|
|
6249
6725
|
"examples": []
|
|
6250
6726
|
},
|
|
6251
6727
|
{
|
|
@@ -6362,6 +6838,7 @@
|
|
|
6362
6838
|
"descriptionEn": "Callback when SubMenu expands/collapses"
|
|
6363
6839
|
}
|
|
6364
6840
|
],
|
|
6841
|
+
"slots": [],
|
|
6365
6842
|
"examples": [
|
|
6366
6843
|
{
|
|
6367
6844
|
"title": "顶部导航",
|
|
@@ -6411,6 +6888,7 @@
|
|
|
6411
6888
|
"documentation": "https://k-ui.cn/components/menu-divider",
|
|
6412
6889
|
"props": [],
|
|
6413
6890
|
"events": [],
|
|
6891
|
+
"slots": [],
|
|
6414
6892
|
"examples": []
|
|
6415
6893
|
},
|
|
6416
6894
|
{
|
|
@@ -6434,6 +6912,7 @@
|
|
|
6434
6912
|
}
|
|
6435
6913
|
],
|
|
6436
6914
|
"events": [],
|
|
6915
|
+
"slots": [],
|
|
6437
6916
|
"examples": [
|
|
6438
6917
|
{
|
|
6439
6918
|
"title": "顶部导航",
|
|
@@ -6511,6 +6990,7 @@
|
|
|
6511
6990
|
}
|
|
6512
6991
|
],
|
|
6513
6992
|
"events": [],
|
|
6993
|
+
"slots": [],
|
|
6514
6994
|
"examples": [
|
|
6515
6995
|
{
|
|
6516
6996
|
"title": "顶部导航",
|
|
@@ -6588,6 +7068,7 @@
|
|
|
6588
7068
|
}
|
|
6589
7069
|
],
|
|
6590
7070
|
"events": [],
|
|
7071
|
+
"slots": [],
|
|
6591
7072
|
"examples": [
|
|
6592
7073
|
{
|
|
6593
7074
|
"title": "顶部导航",
|
|
@@ -6850,6 +7331,7 @@
|
|
|
6850
7331
|
"descriptionEn": "Mention selection"
|
|
6851
7332
|
}
|
|
6852
7333
|
],
|
|
7334
|
+
"slots": [],
|
|
6853
7335
|
"examples": [
|
|
6854
7336
|
{
|
|
6855
7337
|
"title": "基础用法",
|
|
@@ -6908,6 +7390,7 @@
|
|
|
6908
7390
|
"documentation": "https://k-ui.cn/components/message-panel",
|
|
6909
7391
|
"props": [],
|
|
6910
7392
|
"events": [],
|
|
7393
|
+
"slots": [],
|
|
6911
7394
|
"examples": []
|
|
6912
7395
|
},
|
|
6913
7396
|
{
|
|
@@ -6920,6 +7403,7 @@
|
|
|
6920
7403
|
"documentation": "https://k-ui.cn/components/notice-panel",
|
|
6921
7404
|
"props": [],
|
|
6922
7405
|
"events": [],
|
|
7406
|
+
"slots": [],
|
|
6923
7407
|
"examples": []
|
|
6924
7408
|
},
|
|
6925
7409
|
{
|
|
@@ -6933,6 +7417,7 @@
|
|
|
6933
7417
|
"documentation": "https://k-ui.cn/components/modal-panel",
|
|
6934
7418
|
"props": [],
|
|
6935
7419
|
"events": [],
|
|
7420
|
+
"slots": [],
|
|
6936
7421
|
"examples": []
|
|
6937
7422
|
},
|
|
6938
7423
|
{
|
|
@@ -7161,6 +7646,7 @@
|
|
|
7161
7646
|
"descriptionEn": "Callback when Cancel is clicked"
|
|
7162
7647
|
}
|
|
7163
7648
|
],
|
|
7649
|
+
"slots": [],
|
|
7164
7650
|
"examples": [
|
|
7165
7651
|
{
|
|
7166
7652
|
"title": "基本用法",
|
|
@@ -7290,62 +7776,148 @@
|
|
|
7290
7776
|
"documented": true
|
|
7291
7777
|
},
|
|
7292
7778
|
{
|
|
7293
|
-
"name": "showSizer",
|
|
7294
|
-
"description": "Whether to show page size selector",
|
|
7295
|
-
"descriptionZh": "是否显示页码组",
|
|
7296
|
-
"descriptionEn": "Whether to show page size selector",
|
|
7297
|
-
"type": "boolean | undefined",
|
|
7298
|
-
"boolean": true,
|
|
7299
|
-
"documented": true
|
|
7779
|
+
"name": "showSizer",
|
|
7780
|
+
"description": "Whether to show page size selector",
|
|
7781
|
+
"descriptionZh": "是否显示页码组",
|
|
7782
|
+
"descriptionEn": "Whether to show page size selector",
|
|
7783
|
+
"type": "boolean | undefined",
|
|
7784
|
+
"boolean": true,
|
|
7785
|
+
"documented": true
|
|
7786
|
+
},
|
|
7787
|
+
{
|
|
7788
|
+
"name": "showElevator",
|
|
7789
|
+
"description": "Whether to show page elevator",
|
|
7790
|
+
"descriptionZh": "是否显示页码阶梯",
|
|
7791
|
+
"descriptionEn": "Whether to show page elevator",
|
|
7792
|
+
"type": "boolean | undefined",
|
|
7793
|
+
"boolean": true,
|
|
7794
|
+
"documented": true
|
|
7795
|
+
},
|
|
7796
|
+
{
|
|
7797
|
+
"name": "simple",
|
|
7798
|
+
"description": "Use compact pagination",
|
|
7799
|
+
"descriptionZh": "是否使用简洁分页",
|
|
7800
|
+
"descriptionEn": "Use compact pagination",
|
|
7801
|
+
"type": "boolean | undefined",
|
|
7802
|
+
"boolean": true,
|
|
7803
|
+
"documented": true
|
|
7804
|
+
}
|
|
7805
|
+
],
|
|
7806
|
+
"events": [
|
|
7807
|
+
{
|
|
7808
|
+
"name": "change",
|
|
7809
|
+
"type": "((page: number, pageSize: number) => void) | undefined",
|
|
7810
|
+
"description": "Callback when page number or page size changes, returns the changed page number",
|
|
7811
|
+
"descriptionZh": "页码,页码组 改变的回调,返回改变后的页码",
|
|
7812
|
+
"descriptionEn": "Callback when page number or page size changes, returns the changed page number"
|
|
7813
|
+
}
|
|
7814
|
+
],
|
|
7815
|
+
"slots": [],
|
|
7816
|
+
"examples": [
|
|
7817
|
+
{
|
|
7818
|
+
"title": "基本用法",
|
|
7819
|
+
"file": "components/page/demo/basic.vue",
|
|
7820
|
+
"source": "<template>\n <Space vertical>\n <Page v-model:page=\"page\" v-model:pageSize=\"size\" :total=\"50\" @change=\"onChange\" />\n <Page v-model:page=\"page\" v-model:pageSize=\"size\" :total=\"50\" @change=\"onChange\" disabled />\n <code>theme & shape</code>\n <Page\n v-model:page=\"page\"\n v-model:pageSize=\"size\"\n theme=\"outline\"\n shape=\"round\"\n :total=\"50\"\n @change=\"onChange\"\n />\n <Page\n v-model:page=\"page\"\n v-model:pageSize=\"size\"\n shape=\"circle\"\n :total=\"50\"\n @change=\"onChange\"\n />\n <Page\n v-model:page=\"page\"\n v-model:pageSize=\"size\"\n shape=\"square\"\n :total=\"50\"\n @change=\"onChange\"\n />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { message } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst page = ref(1);\nconst size = ref(15);\nconst onChange = (page: number, pageSize: number) => {\n console.log(page, pageSize);\n message.info(`当前页: ${page}, 每页: ${pageSize}`);\n};\n</script>"
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
"title": "条目 / 跳转",
|
|
7824
|
+
"file": "components/page/demo/sizer-elevator.vue",
|
|
7825
|
+
"source": "<template>\n <Space vertical>\n <Page v-model:page=\"page\" :total=\"100\" />\n <code>showSizer</code>\n <Page v-model:page=\"page\" :total=\"100\" showSizer :page-size=\"20\" />\n <code>showElevator</code>\n <Page\n v-model:page=\"page\"\n :total=\"100\"\n showSizer\n showElevator\n :pageSize=\"30\"\n :sizeData=\"sizeData\"\n />\n <code>disabled</code>\n <Page\n v-model:page=\"page\"\n :total=\"100\"\n disabled\n showSizer\n showElevator\n :pageSize=\"30\"\n :sizeData=\"sizeData\"\n />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst page = ref(3);\nconst sizeData = [30, 50, 80, 100];\n</script>"
|
|
7826
|
+
},
|
|
7827
|
+
{
|
|
7828
|
+
"title": "尺寸",
|
|
7829
|
+
"file": "components/page/demo/size.vue",
|
|
7830
|
+
"source": "<template>\n <Space vertical>\n <Page :page=\"page\" :total=\"50\" size=\"small\" />\n <Page :page=\"page\" :total=\"50\" size=\"small\" show-sizer />\n <Page :page=\"page\" :total=\"50\" size=\"small\" show-elevator show-sizer />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst page = ref(1);\n</script>"
|
|
7831
|
+
},
|
|
7832
|
+
{
|
|
7833
|
+
"title": "简洁分页",
|
|
7834
|
+
"file": "components/page/demo/simple.vue",
|
|
7835
|
+
"source": "<template>\n <Space vertical>\n <Page v-model:page=\"page\" simple :total=\"80\" :page-size=\"10\" />\n <Page v-model:page=\"page\" simple show-elevator :total=\"1000\" :page-size=\"10\" />\n <Page v-model:page=\"page\" simple size=\"small\" theme=\"outline\" :total=\"80\" :page-size=\"10\" />\n <Page simple disabled :page=\"3\" :total=\"80\" :page-size=\"10\" />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\n\nconst page = ref(2);\n</script>"
|
|
7836
|
+
}
|
|
7837
|
+
]
|
|
7838
|
+
},
|
|
7839
|
+
{
|
|
7840
|
+
"name": "PageHeader",
|
|
7841
|
+
"tags": [
|
|
7842
|
+
"page-header",
|
|
7843
|
+
"k-page-header"
|
|
7844
|
+
],
|
|
7845
|
+
"children": [],
|
|
7846
|
+
"documentation": "https://k-ui.cn/components/page-header",
|
|
7847
|
+
"props": [
|
|
7848
|
+
{
|
|
7849
|
+
"name": "description",
|
|
7850
|
+
"description": "Custom description",
|
|
7851
|
+
"descriptionZh": "自定义说明",
|
|
7852
|
+
"descriptionEn": "Custom description",
|
|
7853
|
+
"type": "string | undefined",
|
|
7854
|
+
"boolean": false,
|
|
7855
|
+
"documented": true
|
|
7856
|
+
},
|
|
7857
|
+
{
|
|
7858
|
+
"name": "title",
|
|
7859
|
+
"description": "Custom title",
|
|
7860
|
+
"descriptionZh": "自定义标题",
|
|
7861
|
+
"descriptionEn": "Custom title",
|
|
7862
|
+
"type": "string | undefined",
|
|
7863
|
+
"boolean": false,
|
|
7864
|
+
"documented": true
|
|
7865
|
+
}
|
|
7866
|
+
],
|
|
7867
|
+
"events": [],
|
|
7868
|
+
"slots": [
|
|
7869
|
+
{
|
|
7870
|
+
"name": "title",
|
|
7871
|
+
"description": "Custom title",
|
|
7872
|
+
"descriptionZh": "自定义标题",
|
|
7873
|
+
"descriptionEn": "Custom title"
|
|
7874
|
+
},
|
|
7875
|
+
{
|
|
7876
|
+
"name": "description",
|
|
7877
|
+
"description": "Custom description",
|
|
7878
|
+
"descriptionZh": "自定义说明",
|
|
7879
|
+
"descriptionEn": "Custom description"
|
|
7880
|
+
},
|
|
7881
|
+
{
|
|
7882
|
+
"name": "breadcrumb",
|
|
7883
|
+
"description": "Breadcrumb area",
|
|
7884
|
+
"descriptionZh": "面包屑区域",
|
|
7885
|
+
"descriptionEn": "Breadcrumb area"
|
|
7300
7886
|
},
|
|
7301
7887
|
{
|
|
7302
|
-
"name": "
|
|
7303
|
-
"description": "
|
|
7304
|
-
"descriptionZh": "
|
|
7305
|
-
"descriptionEn": "
|
|
7306
|
-
"type": "boolean | undefined",
|
|
7307
|
-
"boolean": true,
|
|
7308
|
-
"documented": true
|
|
7888
|
+
"name": "back",
|
|
7889
|
+
"description": "Back action area",
|
|
7890
|
+
"descriptionZh": "返回区域",
|
|
7891
|
+
"descriptionEn": "Back action area"
|
|
7309
7892
|
},
|
|
7310
7893
|
{
|
|
7311
|
-
"name": "
|
|
7312
|
-
"description": "
|
|
7313
|
-
"descriptionZh": "
|
|
7314
|
-
"descriptionEn": "
|
|
7315
|
-
|
|
7316
|
-
"boolean": true,
|
|
7317
|
-
"documented": true
|
|
7318
|
-
}
|
|
7319
|
-
],
|
|
7320
|
-
"events": [
|
|
7894
|
+
"name": "actions",
|
|
7895
|
+
"description": "Page actions",
|
|
7896
|
+
"descriptionZh": "页面操作区域",
|
|
7897
|
+
"descriptionEn": "Page actions"
|
|
7898
|
+
},
|
|
7321
7899
|
{
|
|
7322
|
-
"name": "
|
|
7323
|
-
"
|
|
7324
|
-
"
|
|
7325
|
-
"
|
|
7326
|
-
"descriptionEn": "Callback when page number or page size changes, returns the changed page number"
|
|
7900
|
+
"name": "default",
|
|
7901
|
+
"description": "Additional content below the heading",
|
|
7902
|
+
"descriptionZh": "标题下方附加内容",
|
|
7903
|
+
"descriptionEn": "Additional content below the heading"
|
|
7327
7904
|
}
|
|
7328
7905
|
],
|
|
7329
7906
|
"examples": [
|
|
7330
7907
|
{
|
|
7331
7908
|
"title": "基本用法",
|
|
7332
|
-
"file": "components/page/demo/basic.vue",
|
|
7333
|
-
"source": "<template>\n <
|
|
7334
|
-
},
|
|
7335
|
-
{
|
|
7336
|
-
"title": "条目 / 跳转",
|
|
7337
|
-
"file": "components/page/demo/sizer-elevator.vue",
|
|
7338
|
-
"source": "<template>\n <Space vertical>\n <Page v-model:page=\"page\" :total=\"100\" />\n <code>showSizer</code>\n <Page v-model:page=\"page\" :total=\"100\" showSizer :page-size=\"20\" />\n <code>showElevator</code>\n <Page\n v-model:page=\"page\"\n :total=\"100\"\n showSizer\n showElevator\n :pageSize=\"30\"\n :sizeData=\"sizeData\"\n />\n <code>disabled</code>\n <Page\n v-model:page=\"page\"\n :total=\"100\"\n disabled\n showSizer\n showElevator\n :pageSize=\"30\"\n :sizeData=\"sizeData\"\n />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst page = ref(3);\nconst sizeData = [30, 50, 80, 100];\n</script>"
|
|
7909
|
+
"file": "components/page-header/demo/basic.vue",
|
|
7910
|
+
"source": "<template>\n <PageHeader title=\"Project overview\" description=\"Track progress and recent activity.\">\n <template #actions> <Button>Export</Button><Button type=\"primary\">Create</Button> </template>\n </PageHeader>\n</template>"
|
|
7339
7911
|
},
|
|
7340
7912
|
{
|
|
7341
|
-
"title": "
|
|
7342
|
-
"file": "components/page/demo/
|
|
7343
|
-
"source": "<template>\n <
|
|
7913
|
+
"title": "完整结构",
|
|
7914
|
+
"file": "components/page-header/demo/slots.vue",
|
|
7915
|
+
"source": "<template>\n <PageHeader>\n <template #breadcrumb>\n <Breadcrumb><BreadcrumbItem>Projects</BreadcrumbItem><BreadcrumbItem>Detail</BreadcrumbItem></Breadcrumb>\n </template>\n <template #back><Button :icon=\"ArrowLeft\" shape=\"circle\" /></template>\n <template #title>Design system <Tag color=\"blue\">Active</Tag></template>\n <template #description>Shared foundations and reusable components.</template>\n <template #actions><Button type=\"primary\">Edit project</Button></template>\n <Alert description=\"The next release is scheduled for Friday.\" show-icon />\n </PageHeader>\n</template>\n<script setup lang=\"ts\">\nimport { ArrowLeft } from \"kui-icons\";\n</script>"
|
|
7344
7916
|
},
|
|
7345
7917
|
{
|
|
7346
|
-
"title": "
|
|
7347
|
-
"file": "components/page/demo/simple.vue",
|
|
7348
|
-
"source": "<template>\n <
|
|
7918
|
+
"title": "简洁页头",
|
|
7919
|
+
"file": "components/page-header/demo/simple.vue",
|
|
7920
|
+
"source": "<template>\n <PageHeader title=\"Team members\" description=\"Manage access and project roles.\" />\n</template>"
|
|
7349
7921
|
}
|
|
7350
7922
|
]
|
|
7351
7923
|
},
|
|
@@ -7360,6 +7932,7 @@
|
|
|
7360
7932
|
"documentation": "https://k-ui.cn/components/poptip-panel",
|
|
7361
7933
|
"props": [],
|
|
7362
7934
|
"events": [],
|
|
7935
|
+
"slots": [],
|
|
7363
7936
|
"examples": []
|
|
7364
7937
|
},
|
|
7365
7938
|
{
|
|
@@ -7465,6 +8038,7 @@
|
|
|
7465
8038
|
"descriptionEn": "Callback when closed"
|
|
7466
8039
|
}
|
|
7467
8040
|
],
|
|
8041
|
+
"slots": [],
|
|
7468
8042
|
"examples": [
|
|
7469
8043
|
{
|
|
7470
8044
|
"title": "基本用法",
|
|
@@ -7484,7 +8058,7 @@
|
|
|
7484
8058
|
{
|
|
7485
8059
|
"title": "位置",
|
|
7486
8060
|
"file": "components/poptip/demo/placement.vue",
|
|
7487
|
-
"source": "<template>\n <Flex style=\"width:300px\" vertical align=\"center\">\n <Space compact>\n <Poptip placement=\"top-left\" :title=\"title\">\n <Button>TL</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"top\" :title=\"title\">\n <Button>Top</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"top-right\" :title=\"title\">\n <Button>TR</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n <Flex justify=\"space-between\" style=\"width:100%;padding:10px 0\">\n <Space vertical compact>\n <Poptip placement=\"left-top\" :title=\"title\">\n <Button>LT</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"left\" :title=\"title\">\n <Button>Left</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"left-bottom\" :title=\"title\">\n <Button>LB</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n\n <Space vertical compact>\n <Poptip placement=\"right-top\" :title=\"title\">\n <Button>RT</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"right\" :title=\"title\">\n <Button>Right</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"right-bottom\" :title=\"title\">\n <Button>RB</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n </Flex>\n <Space compact>\n <Poptip placement=\"bottom-left\" :title=\"title\">\n <Button>BL</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"bottom\" :title=\"title\">\n <Button>Bottom</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"bottom-right\" :title=\"title\">\n <Button>BR</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n </Flex>\n</template>\n<script setup lang=\"ts\">\nconst tip = \"See the light through the mist!\";\nconst title = \"Title\";\n</script>"
|
|
8061
|
+
"source": "<template>\n <Flex style=\"width: 300px\" vertical align=\"center\">\n <Space compact>\n <Poptip placement=\"top-left\" :title=\"title\">\n <Button>TL</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"top\" :title=\"title\">\n <Button>Top</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"top-right\" :title=\"title\">\n <Button>TR</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n <Flex justify=\"space-between\" style=\"width: 100%; padding: 10px 0\">\n <Space vertical compact>\n <Poptip placement=\"left-top\" :title=\"title\">\n <Button>LT</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"left\" :title=\"title\">\n <Button>Left</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"left-bottom\" :title=\"title\">\n <Button>LB</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n\n <Space vertical compact>\n <Poptip placement=\"right-top\" :title=\"title\">\n <Button>RT</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"right\" :title=\"title\">\n <Button>Right</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"right-bottom\" :title=\"title\">\n <Button>RB</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n </Flex>\n <Space compact>\n <Poptip placement=\"bottom-left\" :title=\"title\">\n <Button>BL</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"bottom\" :title=\"title\">\n <Button>Bottom</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n <Poptip placement=\"bottom-right\" :title=\"title\">\n <Button>BR</Button>\n <template #content>\n <p>{{ tip }}</p>\n <p>{{ tip }}</p>\n </template>\n </Poptip>\n </Space>\n </Flex>\n</template>\n<script setup lang=\"ts\">\nconst tip = \"See the light through the mist!\";\nconst title = \"Title\";\n</script>"
|
|
7488
8062
|
}
|
|
7489
8063
|
]
|
|
7490
8064
|
},
|
|
@@ -7499,6 +8073,7 @@
|
|
|
7499
8073
|
"documentation": "https://k-ui.cn/components/popconfirm-panel",
|
|
7500
8074
|
"props": [],
|
|
7501
8075
|
"events": [],
|
|
8076
|
+
"slots": [],
|
|
7502
8077
|
"examples": []
|
|
7503
8078
|
},
|
|
7504
8079
|
{
|
|
@@ -7621,6 +8196,7 @@
|
|
|
7621
8196
|
"descriptionEn": "Callback when cancel is clicked"
|
|
7622
8197
|
}
|
|
7623
8198
|
],
|
|
8199
|
+
"slots": [],
|
|
7624
8200
|
"examples": [
|
|
7625
8201
|
{
|
|
7626
8202
|
"title": "基本用法",
|
|
@@ -7635,7 +8211,7 @@
|
|
|
7635
8211
|
{
|
|
7636
8212
|
"title": "位置",
|
|
7637
8213
|
"file": "components/popconfirm/demo/placement.vue",
|
|
7638
|
-
"source": "<template>\n <Flex style=\"width:300px\" vertical align=\"center\">\n <Space compact>\n <Popconfirm :title=\"title\" placement=\"top-left\">\n <Button>TL</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"top\">\n <Button>Top</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"top-right\">\n <Button>TR</Button>\n </Popconfirm>\n </Space>\n <Flex justify=\"space-between\" style=\"width:100%;padding:10px 0\">\n <Space vertical compact>\n <Popconfirm :title=\"title\" placement=\"left-top\">\n <Button>LT</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"left\">\n <Button>Left</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"left-bottom\">\n <Button>LB</Button>\n </Popconfirm>\n </Space>\n <Space vertical compact>\n <Popconfirm :title=\"title\" placement=\"right-top\">\n <Button>RT</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"right\">\n <Button>Right</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"right-bottom\">\n <Button>RB</Button>\n </Popconfirm>\n </Space>\n </Flex>\n <Space compact>\n <Popconfirm :title=\"title\" placement=\"bottom-left\">\n <Button>BL</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"bottom\">\n <Button>Bottom</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"bottom-right\">\n <Button>BR</Button>\n </Popconfirm>\n </Space>\n </Flex>\n</template>\n<script setup lang=\"ts\">\nconst title = \"Are you sure to delete this task?\";\n</script>"
|
|
8214
|
+
"source": "<template>\n <Flex style=\"width: 300px\" vertical align=\"center\">\n <Space compact>\n <Popconfirm :title=\"title\" placement=\"top-left\">\n <Button>TL</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"top\">\n <Button>Top</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"top-right\">\n <Button>TR</Button>\n </Popconfirm>\n </Space>\n <Flex justify=\"space-between\" style=\"width: 100%; padding: 10px 0\">\n <Space vertical compact>\n <Popconfirm :title=\"title\" placement=\"left-top\">\n <Button>LT</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"left\">\n <Button>Left</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"left-bottom\">\n <Button>LB</Button>\n </Popconfirm>\n </Space>\n <Space vertical compact>\n <Popconfirm :title=\"title\" placement=\"right-top\">\n <Button>RT</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"right\">\n <Button>Right</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"right-bottom\">\n <Button>RB</Button>\n </Popconfirm>\n </Space>\n </Flex>\n <Space compact>\n <Popconfirm :title=\"title\" placement=\"bottom-left\">\n <Button>BL</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"bottom\">\n <Button>Bottom</Button>\n </Popconfirm>\n <Popconfirm :title=\"title\" placement=\"bottom-right\">\n <Button>BR</Button>\n </Popconfirm>\n </Space>\n </Flex>\n</template>\n<script setup lang=\"ts\">\nconst title = \"Are you sure to delete this task?\";\n</script>"
|
|
7639
8215
|
}
|
|
7640
8216
|
]
|
|
7641
8217
|
},
|
|
@@ -7758,6 +8334,7 @@
|
|
|
7758
8334
|
}
|
|
7759
8335
|
],
|
|
7760
8336
|
"events": [],
|
|
8337
|
+
"slots": [],
|
|
7761
8338
|
"examples": [
|
|
7762
8339
|
{
|
|
7763
8340
|
"title": "进度条",
|
|
@@ -7767,7 +8344,7 @@
|
|
|
7767
8344
|
{
|
|
7768
8345
|
"title": "进度圈",
|
|
7769
8346
|
"file": "components/progress/demo/circle.vue",
|
|
7770
|
-
"source": "<template>\n <Progress type=\"circle\" :percent=\"50\" />\n <Progress type=\"circle\" :percent=\"70\" status=\"exception\" />\n <Progress type=\"circle\" :percent=\"100\" />\n <Progress type=\"circle\" :percent=\"50\">\n <template #format>\n <div class=\"demo-progress\">\n <h2 style=\"margin:0\">13389</h2>\n <span>Steps</span>\n </div>\n </template>\n </Progress>\n</template>\n<style>\n.demo-progress > h2 {\n font-size: 23px;\n}\n.demo-progress > span {\n font-size: 14px;\n color: #999;\n}\n</style>"
|
|
8347
|
+
"source": "<template>\n <Progress type=\"circle\" :percent=\"50\" />\n <Progress type=\"circle\" :percent=\"70\" status=\"exception\" />\n <Progress type=\"circle\" :percent=\"100\" />\n <Progress type=\"circle\" :percent=\"50\">\n <template #format>\n <div class=\"demo-progress\">\n <h2 style=\"margin: 0\">13389</h2>\n <span>Steps</span>\n </div>\n </template>\n </Progress>\n</template>\n<style>\n.demo-progress > h2 {\n font-size: 23px;\n}\n.demo-progress > span {\n font-size: 14px;\n color: #999;\n}\n</style>"
|
|
7771
8348
|
},
|
|
7772
8349
|
{
|
|
7773
8350
|
"title": "盘仪表进度条",
|
|
@@ -7892,6 +8469,7 @@
|
|
|
7892
8469
|
}
|
|
7893
8470
|
],
|
|
7894
8471
|
"events": [],
|
|
8472
|
+
"slots": [],
|
|
7895
8473
|
"examples": [
|
|
7896
8474
|
{
|
|
7897
8475
|
"title": "基础用法",
|
|
@@ -8042,6 +8620,7 @@
|
|
|
8042
8620
|
}
|
|
8043
8621
|
],
|
|
8044
8622
|
"events": [],
|
|
8623
|
+
"slots": [],
|
|
8045
8624
|
"examples": [
|
|
8046
8625
|
{
|
|
8047
8626
|
"title": "基本用法",
|
|
@@ -8163,6 +8742,7 @@
|
|
|
8163
8742
|
"descriptionEn": "Triggered when option state changes, returns currently selected item"
|
|
8164
8743
|
}
|
|
8165
8744
|
],
|
|
8745
|
+
"slots": [],
|
|
8166
8746
|
"examples": [
|
|
8167
8747
|
{
|
|
8168
8748
|
"title": "单选",
|
|
@@ -8302,6 +8882,7 @@
|
|
|
8302
8882
|
"descriptionEn": "Triggered when option state changes, returns currently selected item"
|
|
8303
8883
|
}
|
|
8304
8884
|
],
|
|
8885
|
+
"slots": [],
|
|
8305
8886
|
"examples": [
|
|
8306
8887
|
{
|
|
8307
8888
|
"title": "单选",
|
|
@@ -8434,6 +9015,7 @@
|
|
|
8434
9015
|
"descriptionEn": "Triggered when option state changes, returns currently selected item"
|
|
8435
9016
|
}
|
|
8436
9017
|
],
|
|
9018
|
+
"slots": [],
|
|
8437
9019
|
"examples": [
|
|
8438
9020
|
{
|
|
8439
9021
|
"title": "单选",
|
|
@@ -8608,6 +9190,7 @@
|
|
|
8608
9190
|
"descriptionEn": "Callback when selecting"
|
|
8609
9191
|
}
|
|
8610
9192
|
],
|
|
9193
|
+
"slots": [],
|
|
8611
9194
|
"examples": [
|
|
8612
9195
|
{
|
|
8613
9196
|
"title": "基本用法",
|
|
@@ -8673,6 +9256,7 @@
|
|
|
8673
9256
|
}
|
|
8674
9257
|
],
|
|
8675
9258
|
"events": [],
|
|
9259
|
+
"slots": [],
|
|
8676
9260
|
"examples": [
|
|
8677
9261
|
{
|
|
8678
9262
|
"title": "Success",
|
|
@@ -8790,6 +9374,7 @@
|
|
|
8790
9374
|
}
|
|
8791
9375
|
],
|
|
8792
9376
|
"events": [],
|
|
9377
|
+
"slots": [],
|
|
8793
9378
|
"examples": [
|
|
8794
9379
|
{
|
|
8795
9380
|
"title": "基本用法",
|
|
@@ -8887,6 +9472,7 @@
|
|
|
8887
9472
|
"descriptionEn": "Triggered when an item is selected"
|
|
8888
9473
|
}
|
|
8889
9474
|
],
|
|
9475
|
+
"slots": [],
|
|
8890
9476
|
"examples": [
|
|
8891
9477
|
{
|
|
8892
9478
|
"title": "单选",
|
|
@@ -9237,6 +9823,7 @@
|
|
|
9237
9823
|
"descriptionEn": "Triggered when dropdown expands or collapses"
|
|
9238
9824
|
}
|
|
9239
9825
|
],
|
|
9826
|
+
"slots": [],
|
|
9240
9827
|
"examples": [
|
|
9241
9828
|
{
|
|
9242
9829
|
"title": "单选",
|
|
@@ -9309,6 +9896,7 @@
|
|
|
9309
9896
|
}
|
|
9310
9897
|
],
|
|
9311
9898
|
"events": [],
|
|
9899
|
+
"slots": [],
|
|
9312
9900
|
"examples": []
|
|
9313
9901
|
},
|
|
9314
9902
|
{
|
|
@@ -9426,6 +10014,7 @@
|
|
|
9426
10014
|
}
|
|
9427
10015
|
],
|
|
9428
10016
|
"events": [],
|
|
10017
|
+
"slots": [],
|
|
9429
10018
|
"examples": [
|
|
9430
10019
|
{
|
|
9431
10020
|
"title": "基本用法",
|
|
@@ -9445,7 +10034,7 @@
|
|
|
9445
10034
|
{
|
|
9446
10035
|
"title": "子组件",
|
|
9447
10036
|
"file": "components/skeleton/demo/child.vue",
|
|
9448
|
-
"source": "<template>\n <Skeleton :loading=\"loading\" :rows=\"2\" animated>\n <div class=\"skeleton-demo\">\n <h4>KUI is a desktop UI component library based on Vue.js</h4>\n <p>\n Dozens of useful and aesthetically pleasing components, a very user-friendly API suitable
|
|
10037
|
+
"source": "<template>\n <Skeleton :loading=\"loading\" :rows=\"2\" animated>\n <div class=\"skeleton-demo\">\n <h4>KUI is a desktop UI component library based on Vue.js</h4>\n <p>\n Dozens of useful and aesthetically pleasing components, a very user-friendly API suitable\n for developers of any skill level, comprehensive documentation, and support for Electron,\n SSR, Nuxt.js...\n </p>\n </div>\n </Skeleton>\n <br />\n <br />\n <Button :disabled=\"loading\" @click=\"showSkeleton\">Reload</Button>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst loading = ref(false);\n\nconst showSkeleton = () => {\n loading.value = true;\n setTimeout(() => {\n loading.value = false;\n }, 3000);\n};\n</script>\n<style lang=\"less\">\n.skeleton-demo h4 {\n font-weight: bold;\n margin-bottom: 15px;\n}\n</style>"
|
|
9449
10038
|
},
|
|
9450
10039
|
{
|
|
9451
10040
|
"title": "列表",
|
|
@@ -9460,7 +10049,7 @@
|
|
|
9460
10049
|
{
|
|
9461
10050
|
"title": "自定义",
|
|
9462
10051
|
"file": "components/skeleton/demo/custom.vue",
|
|
9463
|
-
"source": "<template>\n <Button :disabled=\"loading\" @click=\"showSkeleton\">Reload</Button>\n <br />\n <br />\n <Card v-for=\"x in 3\" class=\"demo-skeleton-card\" title=\"A Poem\" :key=\"x\">\n <SkeletonImage animated :loading=\"loading\" :radius=\"8\" style=\"width:166px;height:100px
|
|
10052
|
+
"source": "<template>\n <Button :disabled=\"loading\" @click=\"showSkeleton\">Reload</Button>\n <br />\n <br />\n <Card v-for=\"x in 3\" class=\"demo-skeleton-card\" title=\"A Poem\" :key=\"x\">\n <SkeletonImage animated :loading=\"loading\" :radius=\"8\" style=\"width: 166px; height: 100px\">\n <div class=\"cover\" />\n </SkeletonImage>\n <SkeletonText animated :loading=\"loading\" size=\"small\" style=\"min-width: 80px; margin: 8px 0\">\n <p>Tony Stack</p>\n </SkeletonText>\n <SkeletonText animated :loading=\"loading\" size=\"small\" style=\"min-width: 130px\">\n <span>I am Iron Man.</span>\n </SkeletonText>\n </Card>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst loading = ref(false);\n\nconst showSkeleton = () => {\n loading.value = true;\n setTimeout(() => {\n loading.value = false;\n }, 3000);\n};\n</script>\n<style>\n.demo-skeleton-card {\n width: 200px;\n margin-bottom: 10px;\n display: inline-block;\n margin-right: 20px;\n}\n.demo-skeleton-card .cover {\n height: 100px;\n width: 166px;\n border-radius: 8px;\n background: url(\"https://cdn.chuchur.com/upload/demo/test_300.jpg\") no-repeat center;\n background-size: cover;\n}\n.demo-skeleton-card h2 {\n font-size: 15px;\n}\n.demo-skeleton-card span {\n font-size: 13px;\n color: #999;\n}\n</style>"
|
|
9464
10053
|
}
|
|
9465
10054
|
]
|
|
9466
10055
|
},
|
|
@@ -9475,6 +10064,7 @@
|
|
|
9475
10064
|
"documentation": "https://k-ui.cn/components/skeleton-avatar",
|
|
9476
10065
|
"props": [],
|
|
9477
10066
|
"events": [],
|
|
10067
|
+
"slots": [],
|
|
9478
10068
|
"examples": []
|
|
9479
10069
|
},
|
|
9480
10070
|
{
|
|
@@ -9488,6 +10078,7 @@
|
|
|
9488
10078
|
"documentation": "https://k-ui.cn/components/skeleton-button",
|
|
9489
10079
|
"props": [],
|
|
9490
10080
|
"events": [],
|
|
10081
|
+
"slots": [],
|
|
9491
10082
|
"examples": []
|
|
9492
10083
|
},
|
|
9493
10084
|
{
|
|
@@ -9501,6 +10092,7 @@
|
|
|
9501
10092
|
"documentation": "https://k-ui.cn/components/skeleton-image",
|
|
9502
10093
|
"props": [],
|
|
9503
10094
|
"events": [],
|
|
10095
|
+
"slots": [],
|
|
9504
10096
|
"examples": []
|
|
9505
10097
|
},
|
|
9506
10098
|
{
|
|
@@ -9514,6 +10106,7 @@
|
|
|
9514
10106
|
"documentation": "https://k-ui.cn/components/skeleton-text",
|
|
9515
10107
|
"props": [],
|
|
9516
10108
|
"events": [],
|
|
10109
|
+
"slots": [],
|
|
9517
10110
|
"examples": []
|
|
9518
10111
|
},
|
|
9519
10112
|
{
|
|
@@ -9608,6 +10201,7 @@
|
|
|
9608
10201
|
}
|
|
9609
10202
|
],
|
|
9610
10203
|
"events": [],
|
|
10204
|
+
"slots": [],
|
|
9611
10205
|
"examples": [
|
|
9612
10206
|
{
|
|
9613
10207
|
"title": "卡片展示",
|
|
@@ -9617,7 +10211,7 @@
|
|
|
9617
10211
|
{
|
|
9618
10212
|
"title": "趋势信息",
|
|
9619
10213
|
"file": "components/stat-card/demo/trend.vue",
|
|
9620
|
-
"source": "<template>\n <Grid :cols=\"{ xs: 1, sm: 2, md: 4 }\" :xGap=\"16\" :yGap=\"16\">\n <GridItem v-for=\"item in cards\" :key=\"item.title\">\n <StatCard :title=\"item.title\" :items=\"[item.data]\" reverse bordered />\n </GridItem>\n </Grid>\n</template>\n\n<script setup lang=\"ts\">\nimport type { StatNumberItem } from \"kui-vue\";\n\nconst cards: Array<{ title: string; data: StatNumberItem }> = [\n {\n title: \"请求数\",\n data: {\n value: 12840,\n separator: \",\",\n desc: \"本月累计\",\n trend: \"+18.2% 较上月\",\n trendStatus: \"success\",\n },\n },\n {\n title: \"转化率\",\n data: {\n value: 8.6,\n precision: 1,\n suffix: \"%\",\n desc: \"本周平均\",\n trend: \"接近目标值\",\n trendStatus: \"warning\",\n },\n },\n {\n title: \"退款率\",\n data: {\n value: 2.4,\n precision: 1,\n suffix: \"%\",\n desc: \"近 30 天\",\n trend: \"+0.6% 需要关注\",\n trendStatus: \"danger\",\n },\n },\n {\n title: \"在线用户\",\n data: {\n value: 3268,\n separator: \",\",\n desc: \"当前数据\",\n
|
|
10214
|
+
"source": "<template>\n <Grid :cols=\"{ xs: 1, sm: 2, md: 4 }\" :xGap=\"16\" :yGap=\"16\">\n <GridItem v-for=\"item in cards\" :key=\"item.title\">\n <StatCard :title=\"item.title\" :items=\"[item.data]\" reverse bordered />\n </GridItem>\n </Grid>\n</template>\n\n<script setup lang=\"ts\">\nimport type { StatNumberItem } from \"kui-vue\";\n\nconst cards: Array<{ title: string; data: StatNumberItem }> = [\n {\n title: \"请求数\",\n data: {\n value: 12840,\n separator: \",\",\n desc: \"本月累计\",\n trend: \"+18.2% 较上月\",\n trendStatus: \"success\",\n },\n },\n {\n title: \"转化率\",\n data: {\n value: 8.6,\n precision: 1,\n suffix: \"%\",\n desc: \"本周平均\",\n trend: \"接近目标值\",\n trendStatus: \"warning\",\n },\n },\n {\n title: \"退款率\",\n data: {\n value: 2.4,\n precision: 1,\n suffix: \"%\",\n desc: \"近 30 天\",\n trend: \"+0.6% 需要关注\",\n trendStatus: \"danger\",\n },\n },\n {\n title: \"在线用户\",\n data: {\n value: 3268,\n separator: \",\",\n desc: \"当前数据\",\n },\n },\n];\n</script>"
|
|
9621
10215
|
},
|
|
9622
10216
|
{
|
|
9623
10217
|
"title": "基本用法",
|
|
@@ -9627,7 +10221,7 @@
|
|
|
9627
10221
|
{
|
|
9628
10222
|
"title": "组合展示",
|
|
9629
10223
|
"file": "components/stat-card/demo/with-card.vue",
|
|
9630
|
-
"source": "<template>\n <Space vertical class=\"demo-view-fill\">\n <Card theme=\"plain\">\n <StatNumber v-model=\"value\" prefix=\"$\" suffix=\"%\" style=\"font-size: 2em
|
|
10224
|
+
"source": "<template>\n <Space vertical class=\"demo-view-fill\">\n <Card theme=\"plain\">\n <StatNumber v-model=\"value\" prefix=\"$\" suffix=\"%\" style=\"font-size: 2em\" />\n </Card>\n <Card theme=\"plain\" title=\"Today's Trends\">\n <StatNumber v-model=\"value\" suffix=\"%\" style=\"font-size: 2em; color: green\">\n <template #prefix><Icon :type=\"ArrowUp\" /></template>\n </StatNumber>\n </Card>\n <Card theme=\"plain\" title=\"Yesterday's Trend\">\n <StatNumber v-model=\"value\" suffix=\"%\" style=\"font-size: 2em; color: red\" type=\"rollup\">\n <template #prefix><Icon :type=\"ArrowDown\" /></template>\n </StatNumber>\n </Card>\n\n <Button @click=\"change\">change</Button>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { ArrowUp, ArrowDown } from \"kui-icons\";\nconst value = ref(Math.random() * 100000);\nconst change = () => {\n value.value = Math.random() * 100000;\n};\n</script>"
|
|
9631
10225
|
}
|
|
9632
10226
|
]
|
|
9633
10227
|
},
|
|
@@ -9723,6 +10317,7 @@
|
|
|
9723
10317
|
}
|
|
9724
10318
|
],
|
|
9725
10319
|
"events": [],
|
|
10320
|
+
"slots": [],
|
|
9726
10321
|
"examples": [
|
|
9727
10322
|
{
|
|
9728
10323
|
"title": "卡片展示",
|
|
@@ -9732,7 +10327,7 @@
|
|
|
9732
10327
|
{
|
|
9733
10328
|
"title": "趋势信息",
|
|
9734
10329
|
"file": "components/stat-card/demo/trend.vue",
|
|
9735
|
-
"source": "<template>\n <Grid :cols=\"{ xs: 1, sm: 2, md: 4 }\" :xGap=\"16\" :yGap=\"16\">\n <GridItem v-for=\"item in cards\" :key=\"item.title\">\n <StatCard :title=\"item.title\" :items=\"[item.data]\" reverse bordered />\n </GridItem>\n </Grid>\n</template>\n\n<script setup lang=\"ts\">\nimport type { StatNumberItem } from \"kui-vue\";\n\nconst cards: Array<{ title: string; data: StatNumberItem }> = [\n {\n title: \"请求数\",\n data: {\n value: 12840,\n separator: \",\",\n desc: \"本月累计\",\n trend: \"+18.2% 较上月\",\n trendStatus: \"success\",\n },\n },\n {\n title: \"转化率\",\n data: {\n value: 8.6,\n precision: 1,\n suffix: \"%\",\n desc: \"本周平均\",\n trend: \"接近目标值\",\n trendStatus: \"warning\",\n },\n },\n {\n title: \"退款率\",\n data: {\n value: 2.4,\n precision: 1,\n suffix: \"%\",\n desc: \"近 30 天\",\n trend: \"+0.6% 需要关注\",\n trendStatus: \"danger\",\n },\n },\n {\n title: \"在线用户\",\n data: {\n value: 3268,\n separator: \",\",\n desc: \"当前数据\",\n
|
|
10330
|
+
"source": "<template>\n <Grid :cols=\"{ xs: 1, sm: 2, md: 4 }\" :xGap=\"16\" :yGap=\"16\">\n <GridItem v-for=\"item in cards\" :key=\"item.title\">\n <StatCard :title=\"item.title\" :items=\"[item.data]\" reverse bordered />\n </GridItem>\n </Grid>\n</template>\n\n<script setup lang=\"ts\">\nimport type { StatNumberItem } from \"kui-vue\";\n\nconst cards: Array<{ title: string; data: StatNumberItem }> = [\n {\n title: \"请求数\",\n data: {\n value: 12840,\n separator: \",\",\n desc: \"本月累计\",\n trend: \"+18.2% 较上月\",\n trendStatus: \"success\",\n },\n },\n {\n title: \"转化率\",\n data: {\n value: 8.6,\n precision: 1,\n suffix: \"%\",\n desc: \"本周平均\",\n trend: \"接近目标值\",\n trendStatus: \"warning\",\n },\n },\n {\n title: \"退款率\",\n data: {\n value: 2.4,\n precision: 1,\n suffix: \"%\",\n desc: \"近 30 天\",\n trend: \"+0.6% 需要关注\",\n trendStatus: \"danger\",\n },\n },\n {\n title: \"在线用户\",\n data: {\n value: 3268,\n separator: \",\",\n desc: \"当前数据\",\n },\n },\n];\n</script>"
|
|
9736
10331
|
},
|
|
9737
10332
|
{
|
|
9738
10333
|
"title": "基本用法",
|
|
@@ -9742,7 +10337,7 @@
|
|
|
9742
10337
|
{
|
|
9743
10338
|
"title": "组合展示",
|
|
9744
10339
|
"file": "components/stat-card/demo/with-card.vue",
|
|
9745
|
-
"source": "<template>\n <Space vertical class=\"demo-view-fill\">\n <Card theme=\"plain\">\n <StatNumber v-model=\"value\" prefix=\"$\" suffix=\"%\" style=\"font-size: 2em
|
|
10340
|
+
"source": "<template>\n <Space vertical class=\"demo-view-fill\">\n <Card theme=\"plain\">\n <StatNumber v-model=\"value\" prefix=\"$\" suffix=\"%\" style=\"font-size: 2em\" />\n </Card>\n <Card theme=\"plain\" title=\"Today's Trends\">\n <StatNumber v-model=\"value\" suffix=\"%\" style=\"font-size: 2em; color: green\">\n <template #prefix><Icon :type=\"ArrowUp\" /></template>\n </StatNumber>\n </Card>\n <Card theme=\"plain\" title=\"Yesterday's Trend\">\n <StatNumber v-model=\"value\" suffix=\"%\" style=\"font-size: 2em; color: red\" type=\"rollup\">\n <template #prefix><Icon :type=\"ArrowDown\" /></template>\n </StatNumber>\n </Card>\n\n <Button @click=\"change\">change</Button>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { ArrowUp, ArrowDown } from \"kui-icons\";\nconst value = ref(Math.random() * 100000);\nconst change = () => {\n value.value = Math.random() * 100000;\n};\n</script>"
|
|
9746
10341
|
}
|
|
9747
10342
|
]
|
|
9748
10343
|
},
|
|
@@ -9892,6 +10487,7 @@
|
|
|
9892
10487
|
"descriptionEn": "Triggered when Slider value changes, passes the changed value as parameter"
|
|
9893
10488
|
}
|
|
9894
10489
|
],
|
|
10490
|
+
"slots": [],
|
|
9895
10491
|
"examples": [
|
|
9896
10492
|
{
|
|
9897
10493
|
"title": "基本用法",
|
|
@@ -9916,12 +10512,12 @@
|
|
|
9916
10512
|
{
|
|
9917
10513
|
"title": "带标签的",
|
|
9918
10514
|
"file": "components/slider/demo/marks.vue",
|
|
9919
|
-
"source": "<template>\n <Space style=\"max-width:520px
|
|
10515
|
+
"source": "<template>\n <Space style=\"max-width: 520px\" vertical block>\n <code>step=10</code>\n <Slider\n :step=\"10\"\n :marks=\"{ 10: '10', 20: '20', 30: '30', 40: '40', 50: '50', 80: '80' }\"\n :modelValue=\"[10, 80]\"\n :max=\"80\"\n :min=\"10\"\n :range=\"true\"\n ></Slider>\n <br />\n <code>step=0.1</code>\n <Slider\n :step=\"0.1\"\n :marks=\"{ 0.1: '0.1', 0.2: '0.2', 0.3: '0.3', 0.4: '0.4', 0.5: '0.5' }\"\n :min=\"0\"\n :max=\"1\"\n :modelValue=\"[0.1, 0.5]\"\n :range=\"true\"\n ></Slider>\n <br />\n <code>Marks & step=10</code>\n <Slider\n :marks=\"{ 25: '25°C', 36: '36°C' }\"\n :step=\"10\"\n :modelValue=\"[0, 100]\"\n :range=\"true\"\n ></Slider>\n <br />\n <code>step=null</code>\n <Slider\n :marks=\"{ 0: '0°C', 25: '25°C', 36: '36°C', 100: '100°C' }\"\n :step=\"null\"\n :modelValue=\"[0, 100]\"\n :range=\"true\"\n ></Slider>\n <Slider\n :marks=\"{ 0: '0°C', 25: '25°C', 36: '36°C', 100: '100°C' }\"\n :step=\"null\"\n :modelValue=\"25\"\n ></Slider>\n <br />\n <code>Included</code>\n <Slider\n :marks=\"{ 20: '20°C', 40: '40°C' }\"\n :included=\"false\"\n :modelValue=\"[0, 100]\"\n :range=\"true\"\n ></Slider>\n </Space>\n</template>"
|
|
9920
10516
|
},
|
|
9921
10517
|
{
|
|
9922
10518
|
"title": "垂直",
|
|
9923
10519
|
"file": "components/slider/demo/vertical.vue",
|
|
9924
|
-
"source": "<template>\n <Space style=\"height: 300px
|
|
10520
|
+
"source": "<template>\n <Space style=\"height: 300px\" block class=\"demo-slider-vertical\" :size=\"35\">\n <Slider vertical :modelValue=\"35\" size=\"small\" />\n <Slider vertical reverse :modelValue=\"35\" />\n <Slider vertical range :modelValue=\"[20, 60]\" />\n <Slider vertical range :marks=\"{ 20: '20°C', 40: '40°C' }\" :step=\"10\" :modelValue=\"[20, 60]\" />\n <Slider\n vertical\n reverse\n size=\"small\"\n range\n :marks=\"{ 0: '0°C', 25: '25°C', 36: '36°C', 100: '100°C' }\"\n :step=\"10\"\n :modelValue=\"[20, 60]\"\n />\n </Space>\n</template>\n<style lang=\"less\">\n.demo-slider-vertical > div {\n height: 100%;\n}\n</style>"
|
|
9925
10521
|
},
|
|
9926
10522
|
{
|
|
9927
10523
|
"title": "反向",
|
|
@@ -9995,6 +10591,7 @@
|
|
|
9995
10591
|
}
|
|
9996
10592
|
],
|
|
9997
10593
|
"events": [],
|
|
10594
|
+
"slots": [],
|
|
9998
10595
|
"examples": [
|
|
9999
10596
|
{
|
|
10000
10597
|
"title": "基本用法",
|
|
@@ -10004,7 +10601,7 @@
|
|
|
10004
10601
|
{
|
|
10005
10602
|
"title": "垂直间距",
|
|
10006
10603
|
"file": "components/space/demo/vertical.vue",
|
|
10007
|
-
"source": "<template>\n <Space vertical>\n <Card title=\"Card\" :icon=\"Heart\" style=\"width:256px\">\n <p>card content</p>\n <p>card content</p>\n </Card>\n <Card title=\"Card\" :icon=\"Heart\" style=\"width:256px\">\n <p>card content</p>\n <p>card content</p>\n </Card>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Heart } from \"kui-icons\";\n</script>"
|
|
10604
|
+
"source": "<template>\n <Space vertical>\n <Card title=\"Card\" :icon=\"Heart\" style=\"width: 256px\">\n <p>card content</p>\n <p>card content</p>\n </Card>\n <Card title=\"Card\" :icon=\"Heart\" style=\"width: 256px\">\n <p>card content</p>\n <p>card content</p>\n </Card>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { Heart } from \"kui-icons\";\n</script>"
|
|
10008
10605
|
},
|
|
10009
10606
|
{
|
|
10010
10607
|
"title": "间距大小",
|
|
@@ -10095,6 +10692,7 @@
|
|
|
10095
10692
|
}
|
|
10096
10693
|
],
|
|
10097
10694
|
"events": [],
|
|
10695
|
+
"slots": [],
|
|
10098
10696
|
"examples": [
|
|
10099
10697
|
{
|
|
10100
10698
|
"title": "基本用法",
|
|
@@ -10170,6 +10768,7 @@
|
|
|
10170
10768
|
}
|
|
10171
10769
|
],
|
|
10172
10770
|
"events": [],
|
|
10771
|
+
"slots": [],
|
|
10173
10772
|
"examples": [
|
|
10174
10773
|
{
|
|
10175
10774
|
"title": "基础用法",
|
|
@@ -10228,7 +10827,7 @@
|
|
|
10228
10827
|
"description": "Direction",
|
|
10229
10828
|
"descriptionZh": "排列方向",
|
|
10230
10829
|
"descriptionEn": "Direction",
|
|
10231
|
-
"type": "\"
|
|
10830
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
10232
10831
|
"boolean": false,
|
|
10233
10832
|
"documented": true
|
|
10234
10833
|
},
|
|
@@ -10270,6 +10869,7 @@
|
|
|
10270
10869
|
"descriptionEn": "Step click"
|
|
10271
10870
|
}
|
|
10272
10871
|
],
|
|
10872
|
+
"slots": [],
|
|
10273
10873
|
"examples": [
|
|
10274
10874
|
{
|
|
10275
10875
|
"title": "基础用法",
|
|
@@ -10421,6 +11021,7 @@
|
|
|
10421
11021
|
"descriptionEn": "Triggered when `checked` changes, callback"
|
|
10422
11022
|
}
|
|
10423
11023
|
],
|
|
11024
|
+
"slots": [],
|
|
10424
11025
|
"examples": [
|
|
10425
11026
|
{
|
|
10426
11027
|
"title": "基本用法",
|
|
@@ -10523,6 +11124,7 @@
|
|
|
10523
11124
|
"descriptionEn": "Callback before dragging starts"
|
|
10524
11125
|
}
|
|
10525
11126
|
],
|
|
11127
|
+
"slots": [],
|
|
10526
11128
|
"examples": [
|
|
10527
11129
|
{
|
|
10528
11130
|
"title": "基本用法",
|
|
@@ -10575,6 +11177,7 @@
|
|
|
10575
11177
|
}
|
|
10576
11178
|
],
|
|
10577
11179
|
"events": [],
|
|
11180
|
+
"slots": [],
|
|
10578
11181
|
"examples": [
|
|
10579
11182
|
{
|
|
10580
11183
|
"title": "基本用法",
|
|
@@ -10644,13 +11247,22 @@
|
|
|
10644
11247
|
},
|
|
10645
11248
|
{
|
|
10646
11249
|
"name": "columns",
|
|
10647
|
-
"description": "
|
|
10648
|
-
"descriptionZh": "
|
|
10649
|
-
"descriptionEn": "
|
|
11250
|
+
"description": "Column definitions shared with Table",
|
|
11251
|
+
"descriptionZh": "与 Table 共用的列配置",
|
|
11252
|
+
"descriptionEn": "Column definitions shared with Table",
|
|
10650
11253
|
"type": "Column[]",
|
|
10651
11254
|
"boolean": false,
|
|
10652
11255
|
"documented": true
|
|
10653
11256
|
},
|
|
11257
|
+
{
|
|
11258
|
+
"name": "hiddenColumnKeys",
|
|
11259
|
+
"description": "Hidden column keys, including grouped columns",
|
|
11260
|
+
"descriptionZh": "隐藏的列 key 集合,支持分组列",
|
|
11261
|
+
"descriptionEn": "Hidden column keys, including grouped columns",
|
|
11262
|
+
"type": "string[]",
|
|
11263
|
+
"boolean": false,
|
|
11264
|
+
"documented": true
|
|
11265
|
+
},
|
|
10654
11266
|
{
|
|
10655
11267
|
"name": "selectedKeys",
|
|
10656
11268
|
"description": "Collection of selected keys",
|
|
@@ -10662,9 +11274,9 @@
|
|
|
10662
11274
|
},
|
|
10663
11275
|
{
|
|
10664
11276
|
"name": "disabledKeys",
|
|
10665
|
-
"description": "
|
|
10666
|
-
"descriptionZh": "
|
|
10667
|
-
"descriptionEn": "
|
|
11277
|
+
"description": "Essential columns excluded from the settings UI",
|
|
11278
|
+
"descriptionZh": "不允许在设置面板中切换的关键列",
|
|
11279
|
+
"descriptionEn": "Essential columns excluded from the settings UI",
|
|
10668
11280
|
"type": "TableKey[]",
|
|
10669
11281
|
"boolean": false,
|
|
10670
11282
|
"documented": true
|
|
@@ -10707,9 +11319,9 @@
|
|
|
10707
11319
|
},
|
|
10708
11320
|
{
|
|
10709
11321
|
"name": "scroll",
|
|
10710
|
-
"description": "
|
|
10711
|
-
"descriptionZh": "
|
|
10712
|
-
"descriptionEn": "
|
|
11322
|
+
"description": "Scroll configuration; `x` is the minimum content width and `y` is the vertical viewport height",
|
|
11323
|
+
"descriptionZh": "滚动配置;`x` 为内容最小宽度,`y` 为纵向区域高度",
|
|
11324
|
+
"descriptionEn": "Scroll configuration; `x` is the minimum content width and `y` is the vertical viewport height",
|
|
10713
11325
|
"type": "{ x?: string | number | undefined; y?: string | number | undefined; }",
|
|
10714
11326
|
"boolean": false,
|
|
10715
11327
|
"documented": true
|
|
@@ -10725,9 +11337,9 @@
|
|
|
10725
11337
|
},
|
|
10726
11338
|
{
|
|
10727
11339
|
"name": "size",
|
|
10728
|
-
"description": "
|
|
10729
|
-
"descriptionZh": "
|
|
10730
|
-
"descriptionEn": "
|
|
11340
|
+
"description": "Trigger and checkbox size",
|
|
11341
|
+
"descriptionZh": "触发按钮和选择项尺寸",
|
|
11342
|
+
"descriptionEn": "Trigger and checkbox size",
|
|
10731
11343
|
"type": "SizeType | undefined",
|
|
10732
11344
|
"boolean": false,
|
|
10733
11345
|
"documented": true
|
|
@@ -10900,6 +11512,155 @@
|
|
|
10900
11512
|
"descriptionEn": "Called when expanded keys change"
|
|
10901
11513
|
}
|
|
10902
11514
|
],
|
|
11515
|
+
"slots": [],
|
|
11516
|
+
"examples": [
|
|
11517
|
+
{
|
|
11518
|
+
"title": "基本用法",
|
|
11519
|
+
"file": "components/table/demo/basic.vue",
|
|
11520
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\" @rowClick=\"rowClick\">\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">{{\n tag\n }}</Tag>\n </Space>\n </template>\n <template #gender=\"{ value }\">\n <Icon :type=\"value == 1 ? Sun : Moon\" :color=\"value == 1 ? 'blue' : '#f50cff'\" size=\"15\" />\n </template>\n <template #action=\"{ record, rowIndex }\">\n <Space>\n <Button size=\"small\" @click.stop=\"() => moveUp(rowIndex)\" :icon=\"ArrowUp\"> </Button>\n <Button size=\"small\" @click.stop=\"() => moveDown(rowIndex)\" :icon=\"ArrowDown\"> </Button>\n <Button size=\"small\" @click.stop=\"() => deleteRow(rowIndex)\" :icon=\"Trash2\"> </Button>\n <Button size=\"small\" @click.stop=\"() => show(record)\">more</Button>\n </Space>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport { ArrowDown, ArrowUp, Moon, Sun, Trash2 } from \"kui-icons\";\nimport { message, modal, type Column, type TableRecord } from \"kui-vue\";\nimport { reactive } from \"vue\";\nconst data = reactive([\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n]);\ntype TableRow = (typeof data)[number];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n { title: \"Operate\", key: \"action\" },\n];\nconst moveUp = (rowIndex: number) => {\n if (rowIndex > 0) [data[rowIndex], data[rowIndex - 1]] = [data[rowIndex - 1], data[rowIndex]];\n};\nconst moveDown = (rowIndex: number) => {\n if (rowIndex < data.length - 1)\n [data[rowIndex], data[rowIndex + 1]] = [data[rowIndex + 1], data[rowIndex]];\n};\nconst deleteRow = (rowIndex: number) => {\n data.splice(rowIndex, 1);\n};\nconst show = (record: TableRow) => {\n modal.info({\n title: \"Hi\",\n content: `My name is ${record.name}`,\n });\n};\nconst rowClick = (record: TableRecord) => {\n message.info(\"Test row click: \" + String(record.name));\n};\n</script>"
|
|
11521
|
+
},
|
|
11522
|
+
{
|
|
11523
|
+
"title": "树形数据",
|
|
11524
|
+
"file": "components/table/demo/tree.vue",
|
|
11525
|
+
"source": "<template>\n <Table\n v-model:expanded-keys=\"expandedKeys\"\n bordered\n checkable\n expand-row-by-click\n :data=\"data\"\n :columns=\"columns\"\n >\n <template #status=\"{ value }\">\n <Tag :color=\"value === 'active' ? 'green' : 'gold'\">{{ value }}</Tag>\n </template>\n </Table>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\n\ninterface Department {\n [key: string]: unknown;\n key: string;\n name: string;\n owner: string;\n members: number;\n status: \"active\" | \"planning\";\n children?: Department[];\n}\n\nconst expandedKeys = ref([\"product\"]);\nconst data: Department[] = [\n {\n key: \"product\",\n name: \"Product Center\",\n owner: \"Alice\",\n members: 24,\n status: \"active\",\n children: [\n { key: \"design\", name: \"Design Team\", owner: \"Mia\", members: 8, status: \"active\" },\n {\n key: \"research\",\n name: \"Research Team\",\n owner: \"Leo\",\n members: 6,\n status: \"planning\",\n children: [\n { key: \"ai-lab\", name: \"AI Lab\", owner: \"Noah\", members: 3, status: \"planning\" },\n ],\n },\n ],\n },\n {\n key: \"engineering\",\n name: \"Engineering Center\",\n owner: \"Jack\",\n members: 36,\n status: \"active\",\n children: [\n { key: \"frontend\", name: \"Frontend Team\", owner: \"Emma\", members: 12, status: \"active\" },\n { key: \"backend\", name: \"Backend Team\", owner: \"Ethan\", members: 16, status: \"active\" },\n ],\n },\n];\nconst columns: Column[] = [\n { key: \"name\", title: \"Department\", width: 240 },\n { key: \"owner\", title: \"Owner\" },\n { key: \"members\", title: \"Members\", sorter: true },\n { key: \"status\", title: \"Status\" },\n];\n</script>"
|
|
11526
|
+
},
|
|
11527
|
+
{
|
|
11528
|
+
"title": "基本用法(使用render)",
|
|
11529
|
+
"file": "components/table/demo/base-render.vue",
|
|
11530
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\" />\n</template>\n<script setup lang=\"ts\">\nimport { Moon, Sun } from \"kui-icons\";\nimport { Button, Icon, modal, Space, Tag, type Column } from \"kui-vue\";\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n {\n title: \"Gender\",\n key: \"gender\",\n render: (h, { gender }) => {\n return h(Icon, {\n type: gender == 1 ? Sun : Moon,\n color: gender == 1 ? \"blue\" : \"#f50cff\",\n size: 15,\n });\n },\n },\n { title: \"Address\", key: \"address\" },\n {\n title: \"Tags\",\n key: \"tags\",\n render: (h, record) => {\n const tags = Array.isArray(record.tags)\n ? record.tags.filter((tag): tag is string => typeof tag === \"string\")\n : [];\n return h(\n Space,\n {},\n {\n default: () =>\n tags.map(function (tag) {\n return h(\n Tag,\n {\n color: tag == \"Python\" ? \"green\" : \"blue\",\n },\n { default: () => tag }\n );\n }),\n }\n );\n },\n },\n {\n title: \"Operate\",\n key: \"action\",\n render: (h, record) => {\n return h(\n Button,\n {\n size: \"small\",\n onClick: () => {\n modal.info({\n title: \"More\",\n content: `My name is ${record.name}`,\n });\n },\n },\n { default: () => \"more\" }\n );\n },\n },\n];\n</script>"
|
|
11531
|
+
},
|
|
11532
|
+
{
|
|
11533
|
+
"title": "自定义表头",
|
|
11534
|
+
"file": "components/table/demo/custom-header.vue",
|
|
11535
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\">\n <!-- 通过template 定义表头 ,slot 以 `header-` 开头-->\n <template #header-age=\"{ value }\">\n <Flex size=\"small\">\n {{ value }}\n <Tooltip title=\"How old are you?\">\n <Icon :type=\"CircleAlert\" size=\"18\" color=\"#777\" />\n </Tooltip>\n </Flex>\n </template>\n <template #action=\"{ record }\">\n <Button size=\"small\" @click=\"() => show(record)\">more</Button>\n </template>\n\n <template #header-address=\"{ value }\">\n <Flex size=\"small\">\n {{ value }}\n <Tooltip title=\"Where are you from?\">\n <Icon :type=\"CircleAlert\" size=\"18\" color=\"#777\" />\n </Tooltip>\n </Flex>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport { CircleAlert } from \"kui-icons\";\nimport { modal, type Column } from \"kui-vue\";\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n },\n { key: \"2\", name: \"Hu Cong\", age: 28, address: \"Wu Han Nanhu No. 198\" },\n { key: \"3\", name: \"Qiu\", age: 28, address: \"Wu Han Nanhu No. 188\" },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n {\n title: \"Address\",\n key: \"address\",\n },\n {\n title: \"Operate\",\n key: \"action\",\n width: 90,\n },\n];\nconst show = (record: Record<string, unknown>) => {\n modal.info({\n title: \"More\",\n content: `My name is ${record.name}`,\n });\n};\n</script>"
|
|
11536
|
+
},
|
|
11537
|
+
{
|
|
11538
|
+
"title": "自定义页头和页脚",
|
|
11539
|
+
"file": "components/table/demo/bordered.vue",
|
|
11540
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered>\n <template #fullname=\"{ value }\">\n <a>{{ value }}</a>\n </template>\n <template #price=\"{ value }\">\n <span :class=\"{ 'test-table-price': value > 20000 }\"> ¥{{ value }}/㎡ </span>\n </template>\n <template #header> Header </template>\n <template #footer> Footer </template>\n </Table>\n</template>\n<script>\nexport default {\n data() {\n return {\n data: [\n {\n key: \"0\",\n fullname: \"Li Lei\",\n price: 18990,\n address: \"Wu Han Guanggu No. 328\",\n },\n {\n key: \"1\",\n fullname: \"Liu Hao\",\n price: 23900,\n address: \"Wu Han Hongshan No. 128\",\n },\n {\n key: \"2\",\n fullname: \"Hu Cong\",\n price: 12000,\n address: \"Wu Han Nanhu No. 198\",\n },\n {\n key: \"3\",\n fullname: \"Qiu\",\n price: 28000,\n address: \"Wu Han Nanhu No. 188\",\n },\n ],\n columns: [\n { title: \"Name\", key: \"fullname\" },\n { title: \"Housing price\", key: \"price\" },\n { title: \"Address\", key: \"address\" },\n ],\n };\n },\n};\n</script>"
|
|
11541
|
+
},
|
|
11542
|
+
{
|
|
11543
|
+
"title": "排序",
|
|
11544
|
+
"file": "components/table/demo/table-sorter.vue",
|
|
11545
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\" :loading=\"loading\" @sort=\"sort\"> </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column, SortState } from \"kui-vue\";\nimport { onMounted, ref } from \"vue\";\ninterface TableRow {\n key: string;\n name: string;\n age: number;\n mail: string;\n}\nconst data = ref<TableRow[]>([]);\nconst loading = ref(false);\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\", sorter: true },\n {\n title: \"Age\",\n key: \"age\",\n sorter: true,\n },\n { title: \"Email\", key: \"mail\", sorter: (state) => fetch(\"mail\", state.order) },\n];\n\nonMounted(() => {\n fetch();\n});\n\nconst sort = ({ key, order }: SortState) => {\n console.log(key, order);\n};\n\nconst fetch = (key?: string, order?: SortState[\"order\"]) => {\n console.log(key, order);\n loading.value = true;\n // 模拟异步加载数据排序\n setTimeout(() => {\n loading.value = false;\n let fetchData = [\n { key: \"0\", name: \"Qiu\", age: 32, mail: \"chuchur@qq.com\" },\n { key: \"3\", name: \"Wang Kang\", age: 26, mail: \"wangkang@gmail.com\" },\n { key: \"2\", name: \"Liu Hao\", age: 27, mail: \"liuhao@162.com\" },\n { key: \"1\", name: \"Li Lei\", age: 33, mail: \"hanlin@hotmail.com\" },\n { key: \"4\", name: \"Hu Cong\", age: 25, mail: \"hucong@163.com\" },\n ];\n\n data.value = fetchData;\n }, 2000);\n};\n</script>"
|
|
11546
|
+
},
|
|
11547
|
+
{
|
|
11548
|
+
"title": "表格行/列合并",
|
|
11549
|
+
"file": "components/table/demo/col-row-span.vue",
|
|
11550
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered> </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = [\n { key: \"1\", name: \"Jim\", age: 25, city: \"Beijing\" },\n { key: \"2\", name: \"Allen\", age: 30, city: \"Wuhan\" },\n { key: \"3\", name: \"Qiu\", age: 35, city: \"Wuhan\" },\n { key: \"4\", name: \"Jake\", age: 40, city: \"Shanghai\" },\n { key: \"5\", name: \"Mask\", age: 38, city: \"Wuhan\" },\n];\nconst columns: Column[] = [\n {\n title: \"Name\",\n key: \"name\",\n width: 100,\n // 第三行第一列向下合并一行\n rowSpan: (_, index) => (index == 2 ? 2 : 1),\n },\n {\n title: \"Age\",\n key: \"age\",\n width: 100,\n colSpan: (_, index) => (index == 1 ? 2 : 1),\n },\n {\n title: \"City\",\n key: \"city\",\n width: 100,\n },\n];\n</script>"
|
|
11551
|
+
},
|
|
11552
|
+
{
|
|
11553
|
+
"title": "可编辑单元格",
|
|
11554
|
+
"file": "components/table/demo/table-edit.vue",
|
|
11555
|
+
"source": "<template>\n <Button @click=\"add\">Add</Button>\n <Table :data=\"data\" :columns=\"columns\" bordered>\n <template #name=\"{ value, record }\">\n <Input v-model=\"record.name\" size=\"small\" v-if=\"record.isEdit\" />\n <template v-else>{{ value }}</template>\n </template>\n <template #address=\"{ value, record }\">\n <Input v-model=\"record.address\" size=\"small\" v-if=\"record.isEdit\" />\n <template v-else>{{ value }}</template>\n </template>\n <template #age=\"{ value, record }\">\n <InputNumber v-model=\"record.age\" size=\"small\" v-if=\"record.isEdit\" />\n <template v-else>{{ value }}</template>\n </template>\n <template #action=\"{ record }\">\n <Space>\n <Button size=\"small\" type=\"primary\" v-if=\"!record.isEdit\" @click=\"record.isEdit = true\">\n Edit\n </Button>\n <Button size=\"small\" type=\"primary\" v-if=\"record.isEdit\" @click=\"save(record)\">\n Save\n </Button>\n <Button size=\"small\" v-if=\"record.isEdit\" @click=\"record.isEdit = false\"> Cancel </Button>\n <Popconfirm\n v-if=\"!record.isEdit\"\n title=\"Are you sure delete this content?\"\n @ok=\"() => removeRow(record.key)\"\n >\n <Button size=\"small\" type=\"danger\">Delete</Button>\n </Popconfirm>\n </Space>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport { message, type Column } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst data = ref([\n {\n key: \"0\",\n name: \"Li Lei\",\n age: 28,\n address: \"Wu Han Guanggu No. 328\",\n isEdit: false,\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n age: 30,\n address: \"Wu Han Hongshan No. 128\",\n isEdit: false,\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n isEdit: false,\n },\n {\n key: \"3\",\n name: \"Qiu\",\n age: 32,\n address: \"Wu Han Nanhu No. 188\",\n isEdit: false,\n },\n]);\ntype TableRow = (typeof data.value)[number];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"House price\", key: \"age\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Operate\", key: \"action\" },\n];\nconst count = ref(4);\nconst save = (record: TableRow) => {\n console.log(record);\n record.isEdit = false;\n message.success(\"Save successfully!\");\n};\nconst removeRow = (key: string) => {\n data.value = data.value.filter((item) => item.key != key);\n};\nconst add = () => {\n const key = count.value;\n const record: TableRow = {\n key: String(key),\n name: `Name ${key}`,\n age: 30,\n address: `China Wuhan no.${key}`,\n isEdit: false,\n };\n count.value = key + 1;\n data.value.push(record);\n};\n</script>"
|
|
11556
|
+
},
|
|
11557
|
+
{
|
|
11558
|
+
"title": "固定头/列",
|
|
11559
|
+
"file": "components/table/demo/fixed-col-header.vue",
|
|
11560
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\" :scroll=\"{ y: 300 }\">\n <template #action>\n <Button size=\"small\">test</Button>\n </template>\n <template #action1>\n <Button size=\"small\">test2</Button>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst _columns: Column[] = [],\n dataItem: Record<string, string> = {};\nfor (let i = 0; i < 20; i++) {\n _columns.push({ title: \"Col\" + i, key: \"address\" + i, width: 150 });\n dataItem[\"address\" + i] = \"Hubei Wuhan SoftBase No.128\";\n}\n\nconst data = new Array(10).fill(\"\").map((_, i) => {\n return {\n key: i,\n name: \"Han Mei\",\n age: 28,\n address: \"Hubei Wuhan SoftBase No.128\",\n ...dataItem,\n };\n});\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\", fixed: \"left\" },\n { title: \"Age\", key: \"age\", fixed: \"left\" },\n ..._columns,\n { title: \"Operate\", key: \"action\", fixed: \"right\" },\n { title: \"Operate\", key: \"action1\", fixed: \"right\" },\n];\n</script>"
|
|
11561
|
+
},
|
|
11562
|
+
{
|
|
11563
|
+
"title": "表头分组",
|
|
11564
|
+
"file": "components/table/demo/header-span.vue",
|
|
11565
|
+
"source": "<template>\n <Table :data=\"data\" :columns=\"columns\" bordered :scroll=\"{ y: 300 }\"> </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = [];\nfor (let i = 0; i < 10; i++) {\n data.push({\n key: i,\n name: \"John Brown\",\n age: i + 1,\n street: \"Lake Park\",\n building: \"C\",\n number: 2035,\n companyAddress: \"Lake Street 42\",\n companyName: \"SoftLake Co\",\n gender: \"M\",\n });\n}\nconst columns: Column[] = [\n {\n title: \"Name\",\n key: \"name\",\n width: 120,\n fixed: \"left\",\n },\n {\n title: \"Other\",\n key: \"other\",\n children: [\n {\n title: \"Age\",\n key: \"age\",\n sorter: true,\n },\n {\n title: \"Address\",\n key: \"address\",\n children: [\n {\n title: \"Street\",\n key: \"street\",\n },\n {\n title: \"Block\",\n key: \"block\",\n children: [\n {\n title: \"Building\",\n key: \"building\",\n },\n {\n title: \"Door No.\",\n key: \"number\",\n },\n ],\n },\n ],\n },\n ],\n },\n {\n title: \"Company\",\n key: \"Company\",\n children: [\n {\n title: \"Company Address\",\n key: \"companyAddress\",\n width: 200,\n },\n {\n title: \"Company Name\",\n key: \"companyName\",\n width: 200,\n },\n ],\n },\n {\n title: \"Gender\",\n key: \"gender\",\n width: 100,\n fixed: \"right\",\n },\n];\n</script>"
|
|
11566
|
+
},
|
|
11567
|
+
{
|
|
11568
|
+
"title": "勾选",
|
|
11569
|
+
"file": "components/table/demo/table-check.vue",
|
|
11570
|
+
"source": "<template>\n <code>selectedKeys: {{ selectedKeys }}</code>\n <Table\n :data=\"data\"\n :columns=\"columns\"\n ref=\"selection\"\n checkable\n v-model:selectedKeys=\"selectedKeys\"\n >\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #action>\n <a href=\"javascript:;\">Edit</a>\n <a href=\"javascript:;\">Delete</a>\n </template>\n </Table>\n</template>\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst selectedKeys = ref([]);\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\" },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n];\n</script>"
|
|
11571
|
+
},
|
|
11572
|
+
{
|
|
11573
|
+
"title": "动态控制表格属性",
|
|
11574
|
+
"file": "components/table/demo/control.vue",
|
|
11575
|
+
"source": "<template>\n <div>\n <Space wrap>\n Size:<RadioGroup v-model=\"size\" size=\"small\" type=\"button\">\n <RadioButton value=\"large\" label=\"Large\" />\n <RadioButton value=\"medium\" label=\"Medium\" />\n <RadioButton value=\"small\" label=\"Small\" />\n </RadioGroup>\n Border: <Switch v-model=\"bordered\" />\n Loading:\n <Switch v-model=\"loading\" />\n Checkbox: <Switch v-model=\"checkable\" />\n Empty:\n <Switch v-model=\"empty\" @change=\"setEmpty\" />\n Striped:\n <Switch v-model=\"striped\" />\n </Space>\n <Table\n :data=\"dataSource\"\n :columns=\"columns\"\n :loading=\"loading\"\n :size=\"size\"\n :striped=\"striped\"\n :bordered=\"bordered\"\n :checkable=\"checkable\"\n >\n <template #header> <div>header</div> </template>\n <template #footer> <div>footer</div> </template>\n <template #tags=\"{ value }\">\n <Space>\n <Tag v-for=\"tag in value\" :key=\"tag\" :color=\"tag == 'Python' ? 'green' : 'blue'\">\n {{ tag }}\n </Tag>\n </Space>\n </template>\n <template #gender=\"{ value }\">\n <Icon :type=\"value == 1 ? Moon : Sun\" :color=\"value == 1 ? 'blue' : '#f50cff'\" size=\"15\" />\n </template>\n <template #action>\n <Button size=\"small\">test</Button>\n </template>\n </Table>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { Moon, Sun } from \"kui-icons\";\nimport type { Column, SizeType } from \"kui-vue\";\nimport { ref } from \"vue\";\nconst data = [\n {\n key: \"0\",\n name: \"Li Lei\",\n gender: 0,\n age: 32,\n address: \"Wu Han Guanggu No. 328\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"1\",\n name: \"Liu Hao\",\n gender: 1,\n age: 28,\n address: \"Wu Han Hongshan No. 128\",\n tags: [\"Python\", \"Java\"],\n },\n {\n key: \"2\",\n name: \"Hu Cong\",\n gender: 0,\n age: 28,\n address: \"Wu Han Nanhu No. 198\",\n tags: [\"JS\", \"CSS\"],\n },\n {\n key: \"3\",\n name: \"Qiu\",\n gender: 1,\n age: 28,\n address: \"Wu Han Nanhu No. 188\",\n tags: [\"Go\", \"Python\"],\n },\n];\nconst columns: Column[] = [\n { title: \"Name\", key: \"name\" },\n { title: \"Age\", key: \"age\", sorter: true },\n { title: \"Gender\", key: \"gender\" },\n { title: \"Address\", key: \"address\" },\n { title: \"Tags\", key: \"tags\" },\n { title: \"Operate\", key: \"action\" },\n];\nconst size = ref<SizeType>(\"medium\");\nconst bordered = ref(true);\nconst checkable = ref(false);\nconst loading = ref(false);\nconst empty = ref(false);\nconst dataSource = ref(data);\nconst striped = ref(false);\n\nconst setEmpty = (empty: boolean) => {\n dataSource.value = empty ? [] : data;\n};\n</script>"
|
|
11576
|
+
},
|
|
11577
|
+
{
|
|
11578
|
+
"title": "虚拟滚动",
|
|
11579
|
+
"file": "components/table/demo/virtual.vue",
|
|
11580
|
+
"source": "<template>\n <Table\n virtual\n striped\n :data=\"data\"\n :columns=\"columns\"\n :scroll=\"{ x: 900, y: 360 }\"\n :item-height=\"44\"\n :overscan=\"6\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = Array.from({ length: 10000 }, (_, index) => ({\n key: index + 1,\n name: `User ${index + 1}`,\n email: `user${index + 1}@example.com`,\n status: index % 3 === 0 ? \"Active\" : \"Pending\",\n}));\nconst columns: Column[] = [\n { title: \"ID\", key: \"key\", width: 100 },\n { title: \"Name\", key: \"name\" },\n { title: \"Email\", key: \"email\", width: 200 },\n { title: \"Email1\", key: \"email1\" },\n { title: \"Email2\", key: \"email2\" },\n { title: \"Email3\", key: \"email3\" },\n { title: \"Email4\", key: \"email4\" },\n { title: \"Email5\", key: \"email5\" },\n { title: \"Status\", key: \"status\", width: 140, fixed: \"right\" },\n];\n</script>"
|
|
11581
|
+
},
|
|
11582
|
+
{
|
|
11583
|
+
"title": "列设置",
|
|
11584
|
+
"file": "components/table/demo/column-setting.vue",
|
|
11585
|
+
"source": "<template>\n <Space vertical block>\n <TableColumnSetting\n v-model:hidden-keys=\"hiddenKeys\"\n :columns=\"columns\"\n :disabled-keys=\"['name']\"\n title=\"显示列\"\n reset-text=\"重置\"\n />\n <Table :data=\"data\" :columns=\"columns\" :hidden-column-keys=\"hiddenKeys\" />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\n\nconst hiddenKeys = ref<string[]>([]);\nconst columns: Column[] = [\n { title: \"姓名\", key: \"name\" },\n { title: \"部门\", key: \"department\" },\n { title: \"状态\", key: \"status\" },\n];\nconst data = [{ key: 1, name: \"林晓\", department: \"产品中心\", status: \"正常\" }];\n</script>"
|
|
11586
|
+
}
|
|
11587
|
+
]
|
|
11588
|
+
},
|
|
11589
|
+
{
|
|
11590
|
+
"name": "TableColumnSetting",
|
|
11591
|
+
"tags": [
|
|
11592
|
+
"table-column-setting",
|
|
11593
|
+
"k-table-column-setting"
|
|
11594
|
+
],
|
|
11595
|
+
"children": [],
|
|
11596
|
+
"documentation": "https://k-ui.cn/components/table",
|
|
11597
|
+
"props": [
|
|
11598
|
+
{
|
|
11599
|
+
"name": "columns",
|
|
11600
|
+
"description": "Column definitions shared with Table",
|
|
11601
|
+
"descriptionZh": "与 Table 共用的列配置",
|
|
11602
|
+
"descriptionEn": "Column definitions shared with Table",
|
|
11603
|
+
"type": "Column[]",
|
|
11604
|
+
"boolean": false,
|
|
11605
|
+
"documented": true
|
|
11606
|
+
},
|
|
11607
|
+
{
|
|
11608
|
+
"name": "disabledKeys",
|
|
11609
|
+
"description": "Essential columns excluded from the settings UI",
|
|
11610
|
+
"descriptionZh": "不允许在设置面板中切换的关键列",
|
|
11611
|
+
"descriptionEn": "Essential columns excluded from the settings UI",
|
|
11612
|
+
"type": "string[]",
|
|
11613
|
+
"boolean": false,
|
|
11614
|
+
"documented": true
|
|
11615
|
+
},
|
|
11616
|
+
{
|
|
11617
|
+
"name": "hiddenKeys",
|
|
11618
|
+
"description": "Hidden keys; supports `v-model:hidden-keys`",
|
|
11619
|
+
"descriptionZh": "隐藏列 key,支持 `v-model:hidden-keys`",
|
|
11620
|
+
"descriptionEn": "Hidden keys; supports `v-model:hidden-keys`",
|
|
11621
|
+
"type": "string[]",
|
|
11622
|
+
"boolean": false,
|
|
11623
|
+
"documented": true
|
|
11624
|
+
},
|
|
11625
|
+
{
|
|
11626
|
+
"name": "showReset",
|
|
11627
|
+
"description": "Whether to show the reset action",
|
|
11628
|
+
"descriptionZh": "是否显示重置按钮",
|
|
11629
|
+
"descriptionEn": "Whether to show the reset action",
|
|
11630
|
+
"type": "boolean",
|
|
11631
|
+
"boolean": true,
|
|
11632
|
+
"documented": true
|
|
11633
|
+
},
|
|
11634
|
+
{
|
|
11635
|
+
"name": "size",
|
|
11636
|
+
"description": "Trigger and checkbox size",
|
|
11637
|
+
"descriptionZh": "触发按钮和选择项尺寸",
|
|
11638
|
+
"descriptionEn": "Trigger and checkbox size",
|
|
11639
|
+
"type": "SizeType | undefined",
|
|
11640
|
+
"boolean": false,
|
|
11641
|
+
"documented": true
|
|
11642
|
+
},
|
|
11643
|
+
{
|
|
11644
|
+
"name": "title",
|
|
11645
|
+
"description": "Header display text",
|
|
11646
|
+
"descriptionZh": "列头显示文字",
|
|
11647
|
+
"descriptionEn": "Header display text",
|
|
11648
|
+
"type": "string | undefined",
|
|
11649
|
+
"boolean": false,
|
|
11650
|
+
"documented": true
|
|
11651
|
+
},
|
|
11652
|
+
{
|
|
11653
|
+
"name": "resetText",
|
|
11654
|
+
"description": "Reset button label",
|
|
11655
|
+
"descriptionZh": "重置按钮文字",
|
|
11656
|
+
"descriptionEn": "Reset button label",
|
|
11657
|
+
"type": "string | undefined",
|
|
11658
|
+
"boolean": false,
|
|
11659
|
+
"documented": true
|
|
11660
|
+
}
|
|
11661
|
+
],
|
|
11662
|
+
"events": [],
|
|
11663
|
+
"slots": [],
|
|
10903
11664
|
"examples": [
|
|
10904
11665
|
{
|
|
10905
11666
|
"title": "基本用法",
|
|
@@ -10964,7 +11725,182 @@
|
|
|
10964
11725
|
{
|
|
10965
11726
|
"title": "虚拟滚动",
|
|
10966
11727
|
"file": "components/table/demo/virtual.vue",
|
|
10967
|
-
"source": "<template>\n <Table\n virtual\n striped\n :data=\"data\"\n :columns=\"columns\"\n :scroll=\"{ x: 900, y: 360 }\"\n :item-height=\"44\"\n :overscan=\"6\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = Array.from({ length: 10000 }, (_, index) => ({\n key: index + 1,\n name: `User ${index + 1}`,\n email: `user${index + 1}@example.com`,\n status: index % 3 === 0 ? \"Active\" : \"Pending\",\n}));\nconst columns: Column[] = [\n { title: \"ID\", key: \"key\", width: 100 },\n { title: \"Name\", key: \"name\" },\n { title: \"Email\", key: \"email\" },\n { title: \"Email1\", key: \"email1\" },\n { title: \"Email2\", key: \"email2\" },\n { title: \"Email3\", key: \"email3\" },\n { title: \"Email4\", key: \"email4\" },\n { title: \"Email5\", key: \"email5\" },\n { title: \"Status\", key: \"status\", width: 140, fixed: \"right\" },\n];\n</script>"
|
|
11728
|
+
"source": "<template>\n <Table\n virtual\n striped\n :data=\"data\"\n :columns=\"columns\"\n :scroll=\"{ x: 900, y: 360 }\"\n :item-height=\"44\"\n :overscan=\"6\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\n\nconst data = Array.from({ length: 10000 }, (_, index) => ({\n key: index + 1,\n name: `User ${index + 1}`,\n email: `user${index + 1}@example.com`,\n status: index % 3 === 0 ? \"Active\" : \"Pending\",\n}));\nconst columns: Column[] = [\n { title: \"ID\", key: \"key\", width: 100 },\n { title: \"Name\", key: \"name\" },\n { title: \"Email\", key: \"email\", width: 200 },\n { title: \"Email1\", key: \"email1\" },\n { title: \"Email2\", key: \"email2\" },\n { title: \"Email3\", key: \"email3\" },\n { title: \"Email4\", key: \"email4\" },\n { title: \"Email5\", key: \"email5\" },\n { title: \"Status\", key: \"status\", width: 140, fixed: \"right\" },\n];\n</script>"
|
|
11729
|
+
},
|
|
11730
|
+
{
|
|
11731
|
+
"title": "列设置",
|
|
11732
|
+
"file": "components/table/demo/column-setting.vue",
|
|
11733
|
+
"source": "<template>\n <Space vertical block>\n <TableColumnSetting\n v-model:hidden-keys=\"hiddenKeys\"\n :columns=\"columns\"\n :disabled-keys=\"['name']\"\n title=\"显示列\"\n reset-text=\"重置\"\n />\n <Table :data=\"data\" :columns=\"columns\" :hidden-column-keys=\"hiddenKeys\" />\n </Space>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Column } from \"kui-vue\";\nimport { ref } from \"vue\";\n\nconst hiddenKeys = ref<string[]>([]);\nconst columns: Column[] = [\n { title: \"姓名\", key: \"name\" },\n { title: \"部门\", key: \"department\" },\n { title: \"状态\", key: \"status\" },\n];\nconst data = [{ key: 1, name: \"林晓\", department: \"产品中心\", status: \"正常\" }];\n</script>"
|
|
11734
|
+
}
|
|
11735
|
+
]
|
|
11736
|
+
},
|
|
11737
|
+
{
|
|
11738
|
+
"name": "Kanban",
|
|
11739
|
+
"tags": [
|
|
11740
|
+
"kanban"
|
|
11741
|
+
],
|
|
11742
|
+
"children": [],
|
|
11743
|
+
"documentation": "https://k-ui.cn/components/kanban",
|
|
11744
|
+
"props": [
|
|
11745
|
+
{
|
|
11746
|
+
"name": "theme",
|
|
11747
|
+
"description": "Column appearance",
|
|
11748
|
+
"descriptionZh": "看板列外观",
|
|
11749
|
+
"descriptionEn": "Column appearance",
|
|
11750
|
+
"type": "ThemeType",
|
|
11751
|
+
"boolean": false,
|
|
11752
|
+
"documented": true
|
|
11753
|
+
},
|
|
11754
|
+
{
|
|
11755
|
+
"name": "draggable",
|
|
11756
|
+
"description": "Enable drag and drop",
|
|
11757
|
+
"descriptionZh": "是否允许拖拽",
|
|
11758
|
+
"descriptionEn": "Enable drag and drop",
|
|
11759
|
+
"type": "boolean",
|
|
11760
|
+
"boolean": true,
|
|
11761
|
+
"documented": true
|
|
11762
|
+
},
|
|
11763
|
+
{
|
|
11764
|
+
"name": "emptyText",
|
|
11765
|
+
"description": "Empty column description",
|
|
11766
|
+
"descriptionZh": "空列提示",
|
|
11767
|
+
"descriptionEn": "Empty column description",
|
|
11768
|
+
"type": "string",
|
|
11769
|
+
"boolean": false,
|
|
11770
|
+
"documented": true
|
|
11771
|
+
},
|
|
11772
|
+
{
|
|
11773
|
+
"name": "data",
|
|
11774
|
+
"description": "Kanban items",
|
|
11775
|
+
"descriptionZh": "看板数据",
|
|
11776
|
+
"descriptionEn": "Kanban items",
|
|
11777
|
+
"type": "KanbanItemData[]",
|
|
11778
|
+
"boolean": false,
|
|
11779
|
+
"documented": true
|
|
11780
|
+
},
|
|
11781
|
+
{
|
|
11782
|
+
"name": "columns",
|
|
11783
|
+
"description": "Column definitions",
|
|
11784
|
+
"descriptionZh": "看板列配置",
|
|
11785
|
+
"descriptionEn": "Column definitions",
|
|
11786
|
+
"type": "KanbanColumnData[]",
|
|
11787
|
+
"boolean": false,
|
|
11788
|
+
"documented": true
|
|
11789
|
+
},
|
|
11790
|
+
{
|
|
11791
|
+
"name": "rowKey",
|
|
11792
|
+
"description": "Unique item key field",
|
|
11793
|
+
"descriptionZh": "数据唯一键字段",
|
|
11794
|
+
"descriptionEn": "Unique item key field",
|
|
11795
|
+
"type": "string",
|
|
11796
|
+
"boolean": false,
|
|
11797
|
+
"documented": true
|
|
11798
|
+
},
|
|
11799
|
+
{
|
|
11800
|
+
"name": "statusKey",
|
|
11801
|
+
"description": "Item status field",
|
|
11802
|
+
"descriptionZh": "状态字段",
|
|
11803
|
+
"descriptionEn": "Item status field",
|
|
11804
|
+
"type": "string",
|
|
11805
|
+
"boolean": false,
|
|
11806
|
+
"documented": true
|
|
11807
|
+
},
|
|
11808
|
+
{
|
|
11809
|
+
"name": "minColumnWidth",
|
|
11810
|
+
"description": "Minimum column width",
|
|
11811
|
+
"descriptionZh": "列最小宽度",
|
|
11812
|
+
"descriptionEn": "Minimum column width",
|
|
11813
|
+
"type": "string | number",
|
|
11814
|
+
"boolean": false,
|
|
11815
|
+
"documented": true
|
|
11816
|
+
},
|
|
11817
|
+
{
|
|
11818
|
+
"name": "onMove",
|
|
11819
|
+
"description": "Emitted after a card is dropped into another column; source data is not mutated",
|
|
11820
|
+
"descriptionZh": "卡片拖入其他列时触发;组件不会直接修改原数据",
|
|
11821
|
+
"descriptionEn": "Emitted after a card is dropped into another column; source data is not mutated",
|
|
11822
|
+
"type": "((event: KanbanMoveEvent) => void) | undefined",
|
|
11823
|
+
"eventName": "move",
|
|
11824
|
+
"boolean": false,
|
|
11825
|
+
"documented": true
|
|
11826
|
+
},
|
|
11827
|
+
{
|
|
11828
|
+
"name": "onItemClick",
|
|
11829
|
+
"description": "Emitted when a card is clicked",
|
|
11830
|
+
"descriptionZh": "点击卡片时触发",
|
|
11831
|
+
"descriptionEn": "Emitted when a card is clicked",
|
|
11832
|
+
"type": "((item: KanbanItemData, column: KanbanColumnData) => void) | undefined",
|
|
11833
|
+
"eventName": "itemClick",
|
|
11834
|
+
"boolean": false,
|
|
11835
|
+
"documented": true
|
|
11836
|
+
}
|
|
11837
|
+
],
|
|
11838
|
+
"events": [
|
|
11839
|
+
{
|
|
11840
|
+
"name": "move",
|
|
11841
|
+
"type": "((event: KanbanMoveEvent) => void) | undefined",
|
|
11842
|
+
"description": "Emitted after a card is dropped into another column; source data is not mutated",
|
|
11843
|
+
"descriptionZh": "卡片拖入其他列时触发;组件不会直接修改原数据",
|
|
11844
|
+
"descriptionEn": "Emitted after a card is dropped into another column; source data is not mutated"
|
|
11845
|
+
},
|
|
11846
|
+
{
|
|
11847
|
+
"name": "itemClick",
|
|
11848
|
+
"type": "((item: KanbanItemData, column: KanbanColumnData) => void) | undefined",
|
|
11849
|
+
"description": "Emitted when a card is clicked",
|
|
11850
|
+
"descriptionZh": "点击卡片时触发",
|
|
11851
|
+
"descriptionEn": "Emitted when a card is clicked"
|
|
11852
|
+
}
|
|
11853
|
+
],
|
|
11854
|
+
"slots": [
|
|
11855
|
+
{
|
|
11856
|
+
"name": "columnTitle",
|
|
11857
|
+
"description": "Custom column heading",
|
|
11858
|
+
"descriptionZh": "自定义列头",
|
|
11859
|
+
"descriptionEn": "Custom column heading",
|
|
11860
|
+
"scope": "{ column, items }"
|
|
11861
|
+
},
|
|
11862
|
+
{
|
|
11863
|
+
"name": "item",
|
|
11864
|
+
"description": "Custom card content",
|
|
11865
|
+
"descriptionZh": "自定义卡片内容",
|
|
11866
|
+
"descriptionEn": "Custom card content",
|
|
11867
|
+
"scope": "{ item, column, index }"
|
|
11868
|
+
},
|
|
11869
|
+
{
|
|
11870
|
+
"name": "empty",
|
|
11871
|
+
"description": "Custom empty-column content",
|
|
11872
|
+
"descriptionZh": "自定义空列内容",
|
|
11873
|
+
"descriptionEn": "Custom empty-column content",
|
|
11874
|
+
"scope": "{ column }"
|
|
11875
|
+
},
|
|
11876
|
+
{
|
|
11877
|
+
"name": "footer",
|
|
11878
|
+
"description": "Custom column footer",
|
|
11879
|
+
"descriptionZh": "自定义列底部内容",
|
|
11880
|
+
"descriptionEn": "Custom column footer",
|
|
11881
|
+
"scope": "{ column, items }"
|
|
11882
|
+
}
|
|
11883
|
+
],
|
|
11884
|
+
"examples": [
|
|
11885
|
+
{
|
|
11886
|
+
"title": "基本用法",
|
|
11887
|
+
"file": "components/kanban/demo/basic.vue",
|
|
11888
|
+
"source": "<template>\n <Kanban :columns=\"columns\" :data=\"tasks\" @move=\"move\">\n <template #item=\"{ item }\"\n ><Card size=\"small\" bordered>{{ item.title }}</Card></template\n >\n </Kanban>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { KanbanItemData, KanbanMoveEvent } from \"kui-vue\";\nconst columns = [\n { key: \"todo\", title: \"Todo\", color: \"#87909c\" },\n { key: \"doing\", title: \"Doing\", color: \"#3a95ff\" },\n { key: \"done\", title: \"Done\", color: \"#22a06b\" },\n];\nconst tasks = ref<KanbanItemData[]>([\n { id: 1, status: \"todo\", title: \"Define requirements\" },\n { id: 2, status: \"doing\", title: \"Build component\" },\n]);\nconst move = ({ item, to }: KanbanMoveEvent) => {\n item.status = to;\n};\n</script>"
|
|
11889
|
+
},
|
|
11890
|
+
{
|
|
11891
|
+
"title": "自定义区域",
|
|
11892
|
+
"file": "components/kanban/demo/custom.vue",
|
|
11893
|
+
"source": "<template>\n <Kanban :columns=\"columns\" :data=\"tasks\" :draggable=\"false\">\n <template #columnTitle=\"{ column, items }\">\n <Space><Badge :color=\"column.color\" />{{ column.title }} ({{ items.length }})</Space>\n </template>\n <template #item=\"{ item }\">\n <Card size=\"small\">\n <strong>{{ item.title }}</strong>\n <p>{{ item.owner }}</p>\n </Card>\n </template>\n <template #empty><Empty description=\"当前没有任务\" /></template>\n <template #footer=\"{ column }\"><Button block>添加到 {{ column.title }}</Button></template>\n </Kanban>\n</template>\n<script setup lang=\"ts\">\nconst columns = [\n { key: \"todo\", title: \"待处理\", color: \"#87909c\" },\n { key: \"doing\", title: \"进行中\", color: \"#3a95ff\" },\n { key: \"done\", title: \"已完成\", color: \"#22a06b\" },\n];\nconst tasks = [\n { id: 1, status: \"todo\", title: \"整理需求\", owner: \"Mia\" },\n { id: 2, status: \"todo\", title: \"确认排期\", owner: \"Leo\" },\n { id: 3, status: \"doing\", title: \"开发看板\", owner: \"Alex\" },\n];\n</script>\n<style scoped>p { margin: 8px 0 0; color: var(--kui-color-text-description); }</style>"
|
|
11894
|
+
},
|
|
11895
|
+
{
|
|
11896
|
+
"title": "自定义字段",
|
|
11897
|
+
"file": "components/kanban/demo/fields.vue",
|
|
11898
|
+
"source": "<template>\n <Kanban\n :columns=\"columns\"\n :data=\"tickets\"\n row-key=\"key\"\n status-key=\"stage\"\n min-column-width=\"220px\"\n @item-click=\"onClick\"\n >\n <template #item=\"{ item }\"><Card size=\"small\">{{ item.summary }}</Card></template>\n </Kanban>\n</template>\n<script setup lang=\"ts\">\nimport { message, type KanbanItemData } from \"kui-vue\";\ninterface Ticket extends KanbanItemData { key: string; stage: number; summary: string }\nconst columns = [\n { key: 0, title: \"New\" },\n { key: 1, title: \"Resolved\" },\n];\nconst tickets: Ticket[] = [\n { key: \"K-101\", stage: 0, summary: \"Login page feedback\" },\n { key: \"K-102\", stage: 1, summary: \"Update dependencies\" },\n];\nconst onClick = (item: KanbanItemData) => message.info(String(item.key));\n</script>"
|
|
11899
|
+
},
|
|
11900
|
+
{
|
|
11901
|
+
"title": "外观主题",
|
|
11902
|
+
"file": "components/kanban/demo/theme.vue",
|
|
11903
|
+
"source": "<template>\n <Space vertical block>\n <RadioGroup v-model=\"theme\" type=\"button\" :options=\"themes\" />\n <Kanban :columns=\"columns\" :data=\"tasks\" :theme=\"theme\">\n <template #item=\"{ item }\">\n <Card size=\"small\" :theme=\"theme\">{{ item.title }}</Card>\n </template>\n </Kanban>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport type { ThemeType } from \"kui-vue\";\nimport { ref } from \"vue\";\n\nconst theme = ref<ThemeType>(\"fill\");\nconst themes = [\n { label: \"Fill\", value: \"fill\" },\n { label: \"Outline\", value: \"outline\" },\n];\nconst columns = [\n { key: \"todo\", title: \"Todo\", color: \"#87909c\" },\n { key: \"doing\", title: \"Doing\", color: \"#3a95ff\" },\n { key: \"done\", title: \"Done\", color: \"#22a06b\" },\n];\nconst tasks = [\n { id: 1, status: \"todo\", title: \"Define requirements\" },\n { id: 2, status: \"todo\", title: \"Build component\" },\n];\n</script>"
|
|
10968
11904
|
}
|
|
10969
11905
|
]
|
|
10970
11906
|
},
|
|
@@ -10979,6 +11915,7 @@
|
|
|
10979
11915
|
"documentation": "https://k-ui.cn/components/tooltip-panel",
|
|
10980
11916
|
"props": [],
|
|
10981
11917
|
"events": [],
|
|
11918
|
+
"slots": [],
|
|
10982
11919
|
"examples": []
|
|
10983
11920
|
},
|
|
10984
11921
|
{
|
|
@@ -11057,6 +11994,7 @@
|
|
|
11057
11994
|
}
|
|
11058
11995
|
],
|
|
11059
11996
|
"events": [],
|
|
11997
|
+
"slots": [],
|
|
11060
11998
|
"examples": [
|
|
11061
11999
|
{
|
|
11062
12000
|
"title": "基本用法",
|
|
@@ -11066,7 +12004,7 @@
|
|
|
11066
12004
|
{
|
|
11067
12005
|
"title": "位置",
|
|
11068
12006
|
"file": "components/tooltip/demo/placement.vue",
|
|
11069
|
-
"source": "<template>\n <Flex style=\"width:300px\" vertical align=\"center\">\n <Space compact>\n <Tooltip placement=\"top-left\" :title=\"title\">\n <Button>TL</Button>\n </Tooltip>\n <Tooltip placement=\"top\" :title=\"title\">\n <Button>Top</Button>\n </Tooltip>\n <Tooltip placement=\"top-right\" :title=\"title\">\n <Button>TR</Button>\n </Tooltip>\n </Space>\n <Flex justify=\"space-between\" style=\"width:100%;padding:10px 0\">\n <Space vertical compact>\n <Tooltip placement=\"left-top\" :title=\"title\">\n <Button>LT</Button>\n </Tooltip>\n <Tooltip placement=\"left\" :title=\"title\">\n <Button>Left</Button>\n </Tooltip>\n <Tooltip placement=\"left-bottom\" :title=\"title\">\n <Button>LB</Button>\n </Tooltip>\n </Space>\n <Space vertical compact>\n <Tooltip placement=\"right-top\" :title=\"title\">\n <Button>RT</Button>\n </Tooltip>\n <Tooltip placement=\"right\" :title=\"title\">\n <Button>Right</Button>\n </Tooltip>\n <Tooltip placement=\"right-bottom\" :title=\"title\">\n <Button>RB</Button>\n </Tooltip>\n </Space>\n </Flex>\n <Space compact>\n <Tooltip placement=\"bottom-left\" :title=\"title\">\n <Button>BL</Button>\n </Tooltip>\n <Tooltip placement=\"bottom\" :title=\"title\">\n <Button>Bottom</Button>\n </Tooltip>\n <Tooltip placement=\"bottom-right\" :title=\"title\">\n <Button>BR</Button>\n </Tooltip>\n </Space>\n </Flex>\n</template>\n<script setup lang=\"ts\">\nconst title = \"Title\";\n</script>"
|
|
12007
|
+
"source": "<template>\n <Flex style=\"width: 300px\" vertical align=\"center\">\n <Space compact>\n <Tooltip placement=\"top-left\" :title=\"title\">\n <Button>TL</Button>\n </Tooltip>\n <Tooltip placement=\"top\" :title=\"title\">\n <Button>Top</Button>\n </Tooltip>\n <Tooltip placement=\"top-right\" :title=\"title\">\n <Button>TR</Button>\n </Tooltip>\n </Space>\n <Flex justify=\"space-between\" style=\"width: 100%; padding: 10px 0\">\n <Space vertical compact>\n <Tooltip placement=\"left-top\" :title=\"title\">\n <Button>LT</Button>\n </Tooltip>\n <Tooltip placement=\"left\" :title=\"title\">\n <Button>Left</Button>\n </Tooltip>\n <Tooltip placement=\"left-bottom\" :title=\"title\">\n <Button>LB</Button>\n </Tooltip>\n </Space>\n <Space vertical compact>\n <Tooltip placement=\"right-top\" :title=\"title\">\n <Button>RT</Button>\n </Tooltip>\n <Tooltip placement=\"right\" :title=\"title\">\n <Button>Right</Button>\n </Tooltip>\n <Tooltip placement=\"right-bottom\" :title=\"title\">\n <Button>RB</Button>\n </Tooltip>\n </Space>\n </Flex>\n <Space compact>\n <Tooltip placement=\"bottom-left\" :title=\"title\">\n <Button>BL</Button>\n </Tooltip>\n <Tooltip placement=\"bottom\" :title=\"title\">\n <Button>Bottom</Button>\n </Tooltip>\n <Tooltip placement=\"bottom-right\" :title=\"title\">\n <Button>BR</Button>\n </Tooltip>\n </Space>\n </Flex>\n</template>\n<script setup lang=\"ts\">\nconst title = \"Title\";\n</script>"
|
|
11070
12008
|
},
|
|
11071
12009
|
{
|
|
11072
12010
|
"title": "多彩文字提示",
|
|
@@ -11201,6 +12139,7 @@
|
|
|
11201
12139
|
"descriptionEn": "Tour completed"
|
|
11202
12140
|
}
|
|
11203
12141
|
],
|
|
12142
|
+
"slots": [],
|
|
11204
12143
|
"examples": [
|
|
11205
12144
|
{
|
|
11206
12145
|
"title": "基础用法",
|
|
@@ -11368,6 +12307,7 @@
|
|
|
11368
12307
|
"descriptionEn": "Emitted when selection changes"
|
|
11369
12308
|
}
|
|
11370
12309
|
],
|
|
12310
|
+
"slots": [],
|
|
11371
12311
|
"examples": [
|
|
11372
12312
|
{
|
|
11373
12313
|
"title": "基本用法",
|
|
@@ -11573,6 +12513,7 @@
|
|
|
11573
12513
|
"descriptionEn": "Emitted after copying"
|
|
11574
12514
|
}
|
|
11575
12515
|
],
|
|
12516
|
+
"slots": [],
|
|
11576
12517
|
"examples": [
|
|
11577
12518
|
{
|
|
11578
12519
|
"title": "基本排版",
|
|
@@ -11617,6 +12558,7 @@
|
|
|
11617
12558
|
"documentation": "https://k-ui.cn/components/typography-paragraph",
|
|
11618
12559
|
"props": [],
|
|
11619
12560
|
"events": [],
|
|
12561
|
+
"slots": [],
|
|
11620
12562
|
"examples": []
|
|
11621
12563
|
},
|
|
11622
12564
|
{
|
|
@@ -11630,6 +12572,7 @@
|
|
|
11630
12572
|
"documentation": "https://k-ui.cn/components/typography-text",
|
|
11631
12573
|
"props": [],
|
|
11632
12574
|
"events": [],
|
|
12575
|
+
"slots": [],
|
|
11633
12576
|
"examples": []
|
|
11634
12577
|
},
|
|
11635
12578
|
{
|
|
@@ -11643,6 +12586,7 @@
|
|
|
11643
12586
|
"documentation": "https://k-ui.cn/components/typography-title",
|
|
11644
12587
|
"props": [],
|
|
11645
12588
|
"events": [],
|
|
12589
|
+
"slots": [],
|
|
11646
12590
|
"examples": []
|
|
11647
12591
|
},
|
|
11648
12592
|
{
|
|
@@ -11693,6 +12637,7 @@
|
|
|
11693
12637
|
}
|
|
11694
12638
|
],
|
|
11695
12639
|
"events": [],
|
|
12640
|
+
"slots": [],
|
|
11696
12641
|
"examples": [
|
|
11697
12642
|
{
|
|
11698
12643
|
"title": "基本用法",
|
|
@@ -11846,6 +12791,7 @@
|
|
|
11846
12791
|
"descriptionEn": "Callback when tab is clicked"
|
|
11847
12792
|
}
|
|
11848
12793
|
],
|
|
12794
|
+
"slots": [],
|
|
11849
12795
|
"examples": [
|
|
11850
12796
|
{
|
|
11851
12797
|
"title": "基本用法",
|
|
@@ -11911,6 +12857,7 @@
|
|
|
11911
12857
|
}
|
|
11912
12858
|
],
|
|
11913
12859
|
"events": [],
|
|
12860
|
+
"slots": [],
|
|
11914
12861
|
"examples": [
|
|
11915
12862
|
{
|
|
11916
12863
|
"title": "基本用法",
|
|
@@ -11977,6 +12924,7 @@
|
|
|
11977
12924
|
}
|
|
11978
12925
|
],
|
|
11979
12926
|
"events": [],
|
|
12927
|
+
"slots": [],
|
|
11980
12928
|
"examples": [
|
|
11981
12929
|
{
|
|
11982
12930
|
"title": "基本用法",
|
|
@@ -12296,6 +13244,7 @@
|
|
|
12296
13244
|
"descriptionEn": "Triggered when dragging ends"
|
|
12297
13245
|
}
|
|
12298
13246
|
],
|
|
13247
|
+
"slots": [],
|
|
12299
13248
|
"examples": [
|
|
12300
13249
|
{
|
|
12301
13250
|
"title": "基本用法",
|
|
@@ -12706,6 +13655,7 @@
|
|
|
12706
13655
|
"descriptionEn": "Triggered when a tree node is expanded"
|
|
12707
13656
|
}
|
|
12708
13657
|
],
|
|
13658
|
+
"slots": [],
|
|
12709
13659
|
"examples": [
|
|
12710
13660
|
{
|
|
12711
13661
|
"title": "基本用法",
|
|
@@ -12715,7 +13665,7 @@
|
|
|
12715
13665
|
{
|
|
12716
13666
|
"title": "多选",
|
|
12717
13667
|
"file": "components/tree-select/demo/multiple.vue",
|
|
12718
|
-
"source": "<template>\n <Space vertical>\n <TreeSelect\n v-model=\"value1\"\n :tree-data=\"data\"\n :treeExpandedKeys=\"expandedKeys\"\n multiple\n filterable\n clearable\n block\n />\n <br />\n maxTagCount\n <TreeSelect\n v-model=\"value2\"\n :tree-data=\"data\"\n :treeExpandedKeys=\"expandedKeys\"\n multiple\n :maxTagCount=\"2\"\n style=\"width:100%\"\n filterable\n clearable\n />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst expandedKeys = [\"0-1\", \"1-1\", \"1-1-2\", \"1-2\"];\nconst value1 = ref([\"0-1\", \"1-1\"]);\nconst value2 = ref([\"0-1\", \"1-1-2\", \"1-1-2-1\", \"1-2-1\"]);\nconst data = [\n {\n title: \"tree 1\",\n key: \"0-1\",\n children: [\n {\n title: \"tree 1-1\",\n key: \"1-1\",\n children: [\n { title: \"leaf 1-1-1\", key: \"1-1-1\" },\n {\n title: \"leaf 1-1-2\",\n key: \"1-1-2\",\n children: [\n { title: \"leaf 1-1-2-1\", key: \"1-1-2-1\" },\n { title: \"leaf 1-1-2-2\", key: \"1-1-2-2\" },\n ],\n },\n ],\n },\n {\n title: \"tree 1-2\",\n key: \"1-2\",\n children: [\n { title: \"leaf 1-2-1\", key: \"1-2-1\" },\n { title: \"leaf 1-2-2\", key: \"1-2-2\" },\n ],\n },\n {\n title: \"tree 1-3\",\n key: \"1-3\",\n children: [\n { title: \"leaf 1-3-1\", key: \"1-3-1\" },\n { title: \"leaf 1-3-2\", key: \"1-3-2\" },\n ],\n },\n ],\n },\n];\n</script>"
|
|
13668
|
+
"source": "<template>\n <Space vertical>\n <TreeSelect\n v-model=\"value1\"\n :tree-data=\"data\"\n :treeExpandedKeys=\"expandedKeys\"\n multiple\n filterable\n clearable\n block\n />\n <br />\n maxTagCount\n <TreeSelect\n v-model=\"value2\"\n :tree-data=\"data\"\n :treeExpandedKeys=\"expandedKeys\"\n multiple\n :maxTagCount=\"2\"\n style=\"width: 100%\"\n filterable\n clearable\n />\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst expandedKeys = [\"0-1\", \"1-1\", \"1-1-2\", \"1-2\"];\nconst value1 = ref([\"0-1\", \"1-1\"]);\nconst value2 = ref([\"0-1\", \"1-1-2\", \"1-1-2-1\", \"1-2-1\"]);\nconst data = [\n {\n title: \"tree 1\",\n key: \"0-1\",\n children: [\n {\n title: \"tree 1-1\",\n key: \"1-1\",\n children: [\n { title: \"leaf 1-1-1\", key: \"1-1-1\" },\n {\n title: \"leaf 1-1-2\",\n key: \"1-1-2\",\n children: [\n { title: \"leaf 1-1-2-1\", key: \"1-1-2-1\" },\n { title: \"leaf 1-1-2-2\", key: \"1-1-2-2\" },\n ],\n },\n ],\n },\n {\n title: \"tree 1-2\",\n key: \"1-2\",\n children: [\n { title: \"leaf 1-2-1\", key: \"1-2-1\" },\n { title: \"leaf 1-2-2\", key: \"1-2-2\" },\n ],\n },\n {\n title: \"tree 1-3\",\n key: \"1-3\",\n children: [\n { title: \"leaf 1-3-1\", key: \"1-3-1\" },\n { title: \"leaf 1-3-2\", key: \"1-3-2\" },\n ],\n },\n ],\n },\n];\n</script>"
|
|
12719
13669
|
},
|
|
12720
13670
|
{
|
|
12721
13671
|
"title": "可勾选",
|
|
@@ -12841,6 +13791,7 @@
|
|
|
12841
13791
|
"descriptionEn": "Callback event when tag is closed"
|
|
12842
13792
|
}
|
|
12843
13793
|
],
|
|
13794
|
+
"slots": [],
|
|
12844
13795
|
"examples": [
|
|
12845
13796
|
{
|
|
12846
13797
|
"title": "基本用法",
|
|
@@ -12860,7 +13811,7 @@
|
|
|
12860
13811
|
{
|
|
12861
13812
|
"title": "多彩标签",
|
|
12862
13813
|
"file": "components/tag/demo/color.vue",
|
|
12863
|
-
"source": "<template>\n <div>\n <h4 style=\"margin-bottom: 16px\">Presets:</h4>\n <Space wrap>\n <Tag :color=\"color\" v-for=\"(color, i) in colors\" :key=\"i\">\n {{ color }}\n </Tag>\n </Space>\n <h4 style=\"margin:16px 0\">Custom:</h4>\n <Space>\n <Tag color=\"#c20\">#c20</Tag>\n <Tag color=\"#39f\">#39f</Tag>\n <Tag color=\"#e3f\">#e3f</Tag>\n <Tag color=\"#6c0\">#6c0</Tag>\n </Space>\n </div>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"pink\",\n \"red\",\n \"yellow\",\n \"orange\",\n \"cyan\",\n \"green\",\n \"blue\",\n \"purple\",\n \"magenta\",\n \"volcano\",\n \"gold\",\n \"lime\",\n];\n</script>"
|
|
13814
|
+
"source": "<template>\n <div>\n <h4 style=\"margin-bottom: 16px\">Presets:</h4>\n <Space wrap>\n <Tag :color=\"color\" v-for=\"(color, i) in colors\" :key=\"i\">\n {{ color }}\n </Tag>\n </Space>\n <h4 style=\"margin: 16px 0\">Custom:</h4>\n <Space>\n <Tag color=\"#c20\">#c20</Tag>\n <Tag color=\"#39f\">#39f</Tag>\n <Tag color=\"#e3f\">#e3f</Tag>\n <Tag color=\"#6c0\">#6c0</Tag>\n </Space>\n </div>\n</template>\n<script setup lang=\"ts\">\nconst colors = [\n \"pink\",\n \"red\",\n \"yellow\",\n \"orange\",\n \"cyan\",\n \"green\",\n \"blue\",\n \"purple\",\n \"magenta\",\n \"volcano\",\n \"gold\",\n \"lime\",\n];\n</script>"
|
|
12864
13815
|
},
|
|
12865
13816
|
{
|
|
12866
13817
|
"title": "动态添加和删除",
|
|
@@ -12989,6 +13940,7 @@
|
|
|
12989
13940
|
}
|
|
12990
13941
|
],
|
|
12991
13942
|
"events": [],
|
|
13943
|
+
"slots": [],
|
|
12992
13944
|
"examples": [
|
|
12993
13945
|
{
|
|
12994
13946
|
"title": "基本用法",
|
|
@@ -12998,7 +13950,7 @@
|
|
|
12998
13950
|
{
|
|
12999
13951
|
"title": "分栏间隔",
|
|
13000
13952
|
"file": "components/row-col/demo/gutter.vue",
|
|
13001
|
-
"source": "<template>\n <Space vertical block class=\"demo-grid\">\n <code>gutter = 10</code>\n <Row :gutter=\"10\" class=\"row-gutter\">\n <Col :span=\"12\"><div>col-12</div></Col>\n <Col :span=\"12\"><div>col-12</div></Col>\n </Row>\n <code>Horizontal Gutter (px):{{ h }}</code>\n <div style=\"width:55%;padding:10px
|
|
13953
|
+
"source": "<template>\n <Space vertical block class=\"demo-grid\">\n <code>gutter = 10</code>\n <Row :gutter=\"10\" class=\"row-gutter\">\n <Col :span=\"12\"><div>col-12</div></Col>\n <Col :span=\"12\"><div>col-12</div></Col>\n </Row>\n <code>Horizontal Gutter (px):{{ h }}</code>\n <div style=\"width: 55%; padding: 10px\">\n <Slider\n v-model=\"h\"\n :min=\"8\"\n :marks=\"{ 8: '8', 16: '16', 24: '24', 32: '32', 40: '40' }\"\n :max=\"40\"\n :step=\"null\"\n />\n </div>\n <code>Vertical Gutter (px):{{ v }}</code>\n <div style=\"width: 55%; padding: 10px\">\n <Slider\n v-model=\"v\"\n :min=\"8\"\n :max=\"40\"\n :marks=\"{ 8: '8', 16: '16', 24: '24', 32: '32', 40: '40' }\"\n :step=\"null\"\n />\n </div>\n <code>Column Count:{{ cols }}</code>\n <div style=\"width: 55%; padding: 10px\">\n <Slider\n v-model=\"cols\"\n :min=\"2\"\n :marks=\"{ 2: '2', 3: '3', 4: '4', 6: '6', 8: '8', 12: '12' }\"\n :max=\"12\"\n :step=\"null\"\n />\n </div>\n <Row :gutter=\"[v, h]\" class=\"row-gutter\">\n <Col :span=\"24 / cols\" v-for=\"c in cols\" :key=\"c\">\n <div>col-{{ cols }}</div>\n </Col>\n <Col :span=\"24 / cols\" v-for=\"x in cols\" :key=\"'_' + x\">\n <div>col-{{ cols }}</div>\n </Col>\n </Row>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst h = ref(8);\nconst v = ref(8);\nconst cols = ref(4);\n</script>"
|
|
13002
13954
|
},
|
|
13003
13955
|
{
|
|
13004
13956
|
"title": "栅格偏移",
|
|
@@ -13076,6 +14028,7 @@
|
|
|
13076
14028
|
}
|
|
13077
14029
|
],
|
|
13078
14030
|
"events": [],
|
|
14031
|
+
"slots": [],
|
|
13079
14032
|
"examples": [
|
|
13080
14033
|
{
|
|
13081
14034
|
"title": "基本用法",
|
|
@@ -13085,7 +14038,7 @@
|
|
|
13085
14038
|
{
|
|
13086
14039
|
"title": "分栏间隔",
|
|
13087
14040
|
"file": "components/row-col/demo/gutter.vue",
|
|
13088
|
-
"source": "<template>\n <Space vertical block class=\"demo-grid\">\n <code>gutter = 10</code>\n <Row :gutter=\"10\" class=\"row-gutter\">\n <Col :span=\"12\"><div>col-12</div></Col>\n <Col :span=\"12\"><div>col-12</div></Col>\n </Row>\n <code>Horizontal Gutter (px):{{ h }}</code>\n <div style=\"width:55%;padding:10px
|
|
14041
|
+
"source": "<template>\n <Space vertical block class=\"demo-grid\">\n <code>gutter = 10</code>\n <Row :gutter=\"10\" class=\"row-gutter\">\n <Col :span=\"12\"><div>col-12</div></Col>\n <Col :span=\"12\"><div>col-12</div></Col>\n </Row>\n <code>Horizontal Gutter (px):{{ h }}</code>\n <div style=\"width: 55%; padding: 10px\">\n <Slider\n v-model=\"h\"\n :min=\"8\"\n :marks=\"{ 8: '8', 16: '16', 24: '24', 32: '32', 40: '40' }\"\n :max=\"40\"\n :step=\"null\"\n />\n </div>\n <code>Vertical Gutter (px):{{ v }}</code>\n <div style=\"width: 55%; padding: 10px\">\n <Slider\n v-model=\"v\"\n :min=\"8\"\n :max=\"40\"\n :marks=\"{ 8: '8', 16: '16', 24: '24', 32: '32', 40: '40' }\"\n :step=\"null\"\n />\n </div>\n <code>Column Count:{{ cols }}</code>\n <div style=\"width: 55%; padding: 10px\">\n <Slider\n v-model=\"cols\"\n :min=\"2\"\n :marks=\"{ 2: '2', 3: '3', 4: '4', 6: '6', 8: '8', 12: '12' }\"\n :max=\"12\"\n :step=\"null\"\n />\n </div>\n <Row :gutter=\"[v, h]\" class=\"row-gutter\">\n <Col :span=\"24 / cols\" v-for=\"c in cols\" :key=\"c\">\n <div>col-{{ cols }}</div>\n </Col>\n <Col :span=\"24 / cols\" v-for=\"x in cols\" :key=\"'_' + x\">\n <div>col-{{ cols }}</div>\n </Col>\n </Row>\n </Space>\n</template>\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst h = ref(8);\nconst v = ref(8);\nconst cols = ref(4);\n</script>"
|
|
13089
14042
|
},
|
|
13090
14043
|
{
|
|
13091
14044
|
"title": "栅格偏移",
|
|
@@ -13417,6 +14370,7 @@
|
|
|
13417
14370
|
"descriptionEn": "Callback before upload"
|
|
13418
14371
|
}
|
|
13419
14372
|
],
|
|
14373
|
+
"slots": [],
|
|
13420
14374
|
"examples": [
|
|
13421
14375
|
{
|
|
13422
14376
|
"title": "点击上传",
|
|
@@ -13594,6 +14548,7 @@
|
|
|
13594
14548
|
}
|
|
13595
14549
|
],
|
|
13596
14550
|
"events": [],
|
|
14551
|
+
"slots": [],
|
|
13597
14552
|
"examples": [
|
|
13598
14553
|
{
|
|
13599
14554
|
"title": "基本用法",
|
|
@@ -13678,6 +14633,15 @@
|
|
|
13678
14633
|
}
|
|
13679
14634
|
],
|
|
13680
14635
|
"events": [],
|
|
14636
|
+
"slots": [
|
|
14637
|
+
{
|
|
14638
|
+
"name": "default",
|
|
14639
|
+
"description": "Custom item",
|
|
14640
|
+
"descriptionZh": "自定义项目",
|
|
14641
|
+
"descriptionEn": "Custom item",
|
|
14642
|
+
"scope": "{ item, index }"
|
|
14643
|
+
}
|
|
14644
|
+
],
|
|
13681
14645
|
"examples": [
|
|
13682
14646
|
{
|
|
13683
14647
|
"title": "基本用法",
|