@a2simcode/ui 0.0.45 → 0.0.47
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/.cursor/skills/ui-component-helper/README.md +43 -0
- package/.cursor/skills/ui-component-helper/SKILL.md +81 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/workflow-viewer/index.d.ts +4 -4
- package/dist/simcode-ui.es.js +1 -1
- package/dist/simcode-ui.umd.js +1 -1
- package/dist/stats.html +1 -1
- package/docs/components/autocomplete.md +89 -0
- package/docs/components/barcode.md +101 -0
- package/docs/components/button-select.md +24 -0
- package/docs/components/button.md +117 -0
- package/docs/components/buttons.md +119 -0
- package/docs/components/cascader-select.md +114 -0
- package/docs/components/checkbox.md +114 -0
- package/docs/components/code-mirror.md +85 -0
- package/docs/components/collapse.md +26 -0
- package/docs/components/comp.md +71 -0
- package/docs/components/count-up.md +24 -0
- package/docs/components/count.md +24 -0
- package/docs/components/data-panel.md +24 -0
- package/docs/components/dialog-full.md +112 -0
- package/docs/components/dialog.md +127 -0
- package/docs/components/divider.md +24 -0
- package/docs/components/drawer.md +127 -0
- package/docs/components/dynamic-layer.md +118 -0
- package/docs/components/echarts.md +72 -0
- package/docs/components/editor.md +24 -0
- package/docs/components/form.md +27 -0
- package/docs/components/guid.md +39 -0
- package/docs/components/hpanel.md +24 -0
- package/docs/components/icon.md +56 -0
- package/docs/components/input-button.md +24 -0
- package/docs/components/input-code.md +24 -0
- package/docs/components/input-color.md +114 -0
- package/docs/components/input-layer.md +26 -0
- package/docs/components/input-rows.md +370 -0
- package/docs/components/input-tag.md +50 -0
- package/docs/components/input.md +129 -0
- package/docs/components/layer-form.md +61 -0
- package/docs/components/layer.md +127 -0
- package/docs/components/layout.md +132 -0
- package/docs/components/map.md +24 -0
- package/docs/components/menu.md +121 -0
- package/docs/components/meta/autocomplete.ts +335 -0
- package/docs/components/meta/barcode.ts +216 -0
- package/docs/components/meta/button-select.ts +94 -0
- package/docs/components/meta/button.ts +123 -0
- package/docs/components/meta/buttons.ts +56 -0
- package/docs/components/meta/cascader-select.ts +328 -0
- package/docs/components/meta/checkbox.ts +194 -0
- package/docs/components/meta/code-mirror.ts +108 -0
- package/docs/components/meta/collapse.ts +52 -0
- package/docs/components/meta/comp.ts +224 -0
- package/docs/components/meta/count-up.ts +126 -0
- package/docs/components/meta/count.ts +113 -0
- package/docs/components/meta/data-panel.ts +34 -0
- package/docs/components/meta/dialog-full.ts +133 -0
- package/docs/components/meta/dialog.ts +175 -0
- package/docs/components/meta/divider.ts +66 -0
- package/docs/components/meta/drawer.ts +158 -0
- package/docs/components/meta/dynamic-layer.ts +99 -0
- package/docs/components/meta/echarts.ts +64 -0
- package/docs/components/meta/editor.ts +67 -0
- package/docs/components/meta/form-item.ts +50 -0
- package/docs/components/meta/form.ts +160 -0
- package/docs/components/meta/guid.ts +42 -0
- package/docs/components/meta/hpanel.ts +20 -0
- package/docs/components/meta/icon.ts +68 -0
- package/docs/components/meta/input-button.ts +165 -0
- package/docs/components/meta/input-code.ts +151 -0
- package/docs/components/meta/input-color.ts +243 -0
- package/docs/components/meta/input-layer.ts +336 -0
- package/docs/components/meta/input-rows.ts +113 -0
- package/docs/components/meta/input-tag.ts +112 -0
- package/docs/components/meta/input.ts +411 -0
- package/docs/components/meta/layer-form.ts +56 -0
- package/docs/components/meta/layer.ts +122 -0
- package/docs/components/meta/layout.ts +101 -0
- package/docs/components/meta/map.ts +68 -0
- package/docs/components/meta/menu.ts +43 -0
- package/docs/components/meta/number.ts +296 -0
- package/docs/components/meta/page.ts +67 -0
- package/docs/components/meta/radio.ts +55 -0
- package/docs/components/meta/rate.ts +124 -0
- package/docs/components/meta/select.ts +279 -0
- package/docs/components/meta/slider-captcha.ts +70 -0
- package/docs/components/meta/slider.ts +270 -0
- package/docs/components/meta/switch.ts +272 -0
- package/docs/components/meta/table-panel.ts +154 -0
- package/docs/components/meta/table.ts +328 -0
- package/docs/components/meta/tabs.ts +136 -0
- package/docs/components/meta/title.ts +80 -0
- package/docs/components/meta/tree.ts +242 -0
- package/docs/components/meta/upload.ts +186 -0
- package/docs/components/meta/workflow-viewer.ts +55 -0
- package/docs/components/meta/workflow.ts +113 -0
- package/docs/components/number.md +124 -0
- package/docs/components/page.md +42 -0
- package/docs/components/radio.md +87 -0
- package/docs/components/rate.md +71 -0
- package/docs/components/select.md +133 -0
- package/docs/components/slider-captcha.md +41 -0
- package/docs/components/slider.md +101 -0
- package/docs/components/switch.md +90 -0
- package/docs/components/table-panel.md +199 -0
- package/docs/components/table.md +202 -0
- package/docs/components/tabs.md +26 -0
- package/docs/components/title.md +24 -0
- package/docs/components/tree.md +207 -0
- package/docs/components/upload.md +117 -0
- package/docs/components/workflow-viewer.md +21 -0
- package/docs/components/workflow.md +21 -0
- package/docs/examples/autocomplete/advanced.vue +35 -0
- package/docs/examples/autocomplete/basic.vue +32 -0
- package/docs/examples/autocomplete/clearable.vue +33 -0
- package/docs/examples/autocomplete/custom-template.vue +49 -0
- package/docs/examples/autocomplete/disabled.vue +33 -0
- package/docs/examples/autocomplete/icon.vue +37 -0
- package/docs/examples/barcode/all-types.vue +380 -0
- package/docs/examples/barcode/basic.vue +14 -0
- package/docs/examples/barcode/props-appearance.vue +243 -0
- package/docs/examples/barcode/props-geometry.vue +143 -0
- package/docs/examples/barcode/props-logic.vue +216 -0
- package/docs/examples/barcode/props-symbology.vue +199 -0
- package/docs/examples/barcode/props-text.vue +268 -0
- package/docs/examples/button/basic.vue +7 -0
- package/docs/examples/button/danger-ghost.vue +17 -0
- package/docs/examples/button/disabled.vue +10 -0
- package/docs/examples/button/loading.vue +6 -0
- package/docs/examples/button/shape.vue +7 -0
- package/docs/examples/button/size.vue +14 -0
- package/docs/examples/button/type.vue +9 -0
- package/docs/examples/button-select/basic.vue +19 -0
- package/docs/examples/buttons/basic.vue +45 -0
- package/docs/examples/buttons/disabled.vue +36 -0
- package/docs/examples/buttons/dropdown.vue +63 -0
- package/docs/examples/buttons/group.vue +52 -0
- package/docs/examples/buttons/link.vue +47 -0
- package/docs/examples/buttons/popup.vue +39 -0
- package/docs/examples/buttons/size.vue +45 -0
- package/docs/examples/cascader-select/basic.vue +28 -0
- package/docs/examples/cascader-select/clearable.vue +34 -0
- package/docs/examples/cascader-select/disabled.vue +43 -0
- package/docs/examples/cascader-select/filterable.vue +37 -0
- package/docs/examples/cascader-select/methods.vue +84 -0
- package/docs/examples/cascader-select/multiple.vue +38 -0
- package/docs/examples/cascader-select/slot.vue +45 -0
- package/docs/examples/checkbox/basic.vue +18 -0
- package/docs/examples/checkbox/button.vue +19 -0
- package/docs/examples/checkbox/color.vue +25 -0
- package/docs/examples/checkbox/disabled.vue +17 -0
- package/docs/examples/checkbox/min-max.vue +20 -0
- package/docs/examples/checkbox/mixed.vue +56 -0
- package/docs/examples/checkbox/size.vue +28 -0
- package/docs/examples/code-mirror/basic.vue +11 -0
- package/docs/examples/code-mirror/events.vue +42 -0
- package/docs/examples/code-mirror/height.vue +25 -0
- package/docs/examples/code-mirror/mode.vue +33 -0
- package/docs/examples/code-mirror/readonly.vue +14 -0
- package/docs/examples/collapse/basic.vue +82 -0
- package/docs/examples/comp/basic.vue +7 -0
- package/docs/examples/comp/collapse.vue +38 -0
- package/docs/examples/comp/tabs.vue +38 -0
- package/docs/examples/count/basic.vue +54 -0
- package/docs/examples/count-up/basic.vue +89 -0
- package/docs/examples/data-panel/basic.vue +110 -0
- package/docs/examples/dialog/basic.vue +36 -0
- package/docs/examples/dialog/custom-buttons.vue +44 -0
- package/docs/examples/dialog/fullscreen.vue +23 -0
- package/docs/examples/dialog/no-mask.vue +17 -0
- package/docs/examples/dialog/size.vue +44 -0
- package/docs/examples/dialog/steps.vue +57 -0
- package/docs/examples/dialog-full/basic.vue +29 -0
- package/docs/examples/dialog-full/custom-buttons.vue +45 -0
- package/docs/examples/dialog-full/no-buttons.vue +18 -0
- package/docs/examples/dialog-full/no-header.vue +27 -0
- package/docs/examples/dialog-full/steps.vue +71 -0
- package/docs/examples/divider/basic.vue +52 -0
- package/docs/examples/drawer/basic.vue +35 -0
- package/docs/examples/drawer/custom-buttons.vue +34 -0
- package/docs/examples/drawer/direction.vue +47 -0
- package/docs/examples/drawer/mask.vue +36 -0
- package/docs/examples/drawer/no-buttons.vue +20 -0
- package/docs/examples/drawer/size.vue +28 -0
- package/docs/examples/dynamic-layer/basic.vue +33 -0
- package/docs/examples/dynamic-layer/custom-buttons.vue +43 -0
- package/docs/examples/dynamic-layer/form.vue +73 -0
- package/docs/examples/dynamic-layer/steps.vue +52 -0
- package/docs/examples/dynamic-layer/types.vue +40 -0
- package/docs/examples/echarts/basic.vue +31 -0
- package/docs/examples/echarts/dynamic.vue +43 -0
- package/docs/examples/echarts/line.vue +46 -0
- package/docs/examples/echarts/pie.vue +44 -0
- package/docs/examples/editor/basic.vue +15 -0
- package/docs/examples/form/basic.vue +224 -0
- package/docs/examples/guid/basic.vue +10 -0
- package/docs/examples/guid/size.vue +13 -0
- package/docs/examples/hpanel/basic.vue +79 -0
- package/docs/examples/icon/basic.vue +9 -0
- package/docs/examples/icon/rotate-flip.vue +9 -0
- package/docs/examples/icon/size.vue +7 -0
- package/docs/examples/input/basic.vue +10 -0
- package/docs/examples/input/clearable.vue +12 -0
- package/docs/examples/input/disabled.vue +6 -0
- package/docs/examples/input/icon.vue +23 -0
- package/docs/examples/input/password.vue +18 -0
- package/docs/examples/input/size.vue +13 -0
- package/docs/examples/input/textarea.vue +25 -0
- package/docs/examples/input/word-limit.vue +28 -0
- package/docs/examples/input-button/basic.vue +33 -0
- package/docs/examples/input-code/basic.vue +29 -0
- package/docs/examples/input-color/basic.vue +10 -0
- package/docs/examples/input-color/disabled.vue +13 -0
- package/docs/examples/input-color/format.vue +17 -0
- package/docs/examples/input-color/no-alpha.vue +13 -0
- package/docs/examples/input-color/only-button.vue +15 -0
- package/docs/examples/input-color/predefine.vue +31 -0
- package/docs/examples/input-color/size.vue +15 -0
- package/docs/examples/input-layer/basic.vue +69 -0
- package/docs/examples/input-rows/basic.vue +73 -0
- package/docs/examples/input-rows/drag.vue +48 -0
- package/docs/examples/input-rows/layer-form.vue +85 -0
- package/docs/examples/input-rows/nested.vue +91 -0
- package/docs/examples/input-tag/basic.vue +27 -0
- package/docs/examples/input-tag/colors.vue +23 -0
- package/docs/examples/input-tag/readonly.vue +17 -0
- package/docs/examples/layer/basic.vue +43 -0
- package/docs/examples/layer/custom-buttons.vue +61 -0
- package/docs/examples/layer/drawer.vue +37 -0
- package/docs/examples/layer/full.vue +38 -0
- package/docs/examples/layer/modal.vue +34 -0
- package/docs/examples/layer/steps.vue +46 -0
- package/docs/examples/layer-form/basic.vue +76 -0
- package/docs/examples/layer-form/config.vue +82 -0
- package/docs/examples/layer-form/size.vue +72 -0
- package/docs/examples/layout/basic.vue +36 -0
- package/docs/examples/layout/custom-size.vue +50 -0
- package/docs/examples/layout/disable-move.vue +37 -0
- package/docs/examples/layout/hide-mid-when-narrow.vue +96 -0
- package/docs/examples/layout/min-size.vue +73 -0
- package/docs/examples/layout/percent-size.vue +80 -0
- package/docs/examples/layout/simple.vue +22 -0
- package/docs/examples/layout/top-side.vue +34 -0
- package/docs/examples/map/basic.vue +22 -0
- package/docs/examples/menu/basic.vue +58 -0
- package/docs/examples/menu/collapsed.vue +49 -0
- package/docs/examples/menu/horizontal.vue +44 -0
- package/docs/examples/menu/selection-test.vue +104 -0
- package/docs/examples/menu/theme.vue +46 -0
- package/docs/examples/menu/vertical.vue +46 -0
- package/docs/examples/number/advanced.vue +143 -0
- package/docs/examples/number/basic.vue +63 -0
- package/docs/examples/number/disabled.vue +49 -0
- package/docs/examples/number/size.vue +42 -0
- package/docs/examples/number/slots.vue +123 -0
- package/docs/examples/number/step-strictly.vue +41 -0
- package/docs/examples/number/step.vue +47 -0
- package/docs/examples/page/basic.vue +41 -0
- package/docs/examples/page/init.vue +87 -0
- package/docs/examples/radio/basic.vue +17 -0
- package/docs/examples/radio/button.vue +17 -0
- package/docs/examples/radio/color.vue +18 -0
- package/docs/examples/radio/disabled.vue +17 -0
- package/docs/examples/radio/size.vue +29 -0
- package/docs/examples/rate/basic.vue +24 -0
- package/docs/examples/rate/half.vue +24 -0
- package/docs/examples/rate/readonly.vue +11 -0
- package/docs/examples/rate/text.vue +32 -0
- package/docs/examples/select/basic.vue +16 -0
- package/docs/examples/select/clearable.vue +22 -0
- package/docs/examples/select/disabled.vue +31 -0
- package/docs/examples/select/filterable.vue +24 -0
- package/docs/examples/select/group.vue +23 -0
- package/docs/examples/select/icon.vue +16 -0
- package/docs/examples/select/multiple.vue +18 -0
- package/docs/examples/select/size.vue +39 -0
- package/docs/examples/slider/basic.vue +42 -0
- package/docs/examples/slider/disabled.vue +17 -0
- package/docs/examples/slider/marks.vue +30 -0
- package/docs/examples/slider/size.vue +37 -0
- package/docs/examples/slider/tooltip.vue +36 -0
- package/docs/examples/slider/vertical.vue +26 -0
- package/docs/examples/slider-captcha/basic.vue +44 -0
- package/docs/examples/slider-captcha/custom.vue +48 -0
- package/docs/examples/switch/basic.vue +16 -0
- package/docs/examples/switch/disabled.vue +13 -0
- package/docs/examples/switch/loading.vue +13 -0
- package/docs/examples/switch/size.vue +15 -0
- package/docs/examples/switch/text.vue +13 -0
- package/docs/examples/table/actions.vue +116 -0
- package/docs/examples/table/add-row.vue +103 -0
- package/docs/examples/table/basic.vue +168 -0
- package/docs/examples/table/editable.vue +261 -0
- package/docs/examples/table/field-selection.vue +87 -0
- package/docs/examples/table/frozen-column.vue +140 -0
- package/docs/examples/table/height-mode.vue +99 -0
- package/docs/examples/table/multiple.vue +178 -0
- package/docs/examples/table/pagination.vue +151 -0
- package/docs/examples/table/single-selection.vue +64 -0
- package/docs/examples/table/tree-column.vue +119 -0
- package/docs/examples/table/tree-data.vue +141 -0
- package/docs/examples/table-panel/basic.vue +228 -0
- package/docs/examples/table-panel/batch-operations.vue +285 -0
- package/docs/examples/table-panel/filter.vue +209 -0
- package/docs/examples/table-panel/multiple-selection.vue +243 -0
- package/docs/examples/table-panel/pagination.vue +133 -0
- package/docs/examples/tabs/basic.vue +98 -0
- package/docs/examples/title/basic.vue +80 -0
- package/docs/examples/tree/accordion.vue +46 -0
- package/docs/examples/tree/basic.vue +50 -0
- package/docs/examples/tree/buttons.vue +53 -0
- package/docs/examples/tree/checkable.vue +52 -0
- package/docs/examples/tree/custom-keys.vue +39 -0
- package/docs/examples/tree/default-expanded.vue +52 -0
- package/docs/examples/tree/draggable.vue +29 -0
- package/docs/examples/tree/expand-on-click.vue +39 -0
- package/docs/examples/tree/flat-data.vue +20 -0
- package/docs/examples/tree/icon.vue +40 -0
- package/docs/examples/tree/load-data.vue +37 -0
- package/docs/examples/tree/methods.vue +74 -0
- package/docs/examples/tree/theme.vue +33 -0
- package/docs/examples/upload/accept.vue +31 -0
- package/docs/examples/upload/basic.vue +12 -0
- package/docs/examples/upload/drag.vue +11 -0
- package/docs/examples/upload/image.vue +17 -0
- package/docs/examples/upload/limit.vue +20 -0
- package/docs/examples/upload/multiple.vue +17 -0
- package/docs/examples/upload/readonly.vue +17 -0
- package/docs/examples/utils/cipher.vue +160 -0
- package/docs/examples/utils/common.vue +153 -0
- package/docs/examples/utils/date.vue +56 -0
- package/docs/examples/utils/dom.vue +52 -0
- package/docs/examples/utils/is.vue +70 -0
- package/docs/examples/workflow/basic.vue +265 -0
- package/docs/examples/workflow-viewer/basic.vue +248 -0
- package/package.json +6 -2
- /package/dist/components/workflow-viewer/src/{j-workflow.vue.d.ts → workflow.vue.d.ts} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="collapse-demo">
|
|
3
|
+
<div class="demo-item">
|
|
4
|
+
<p>基础用法</p>
|
|
5
|
+
<j-collapse v-model="activeNames1">
|
|
6
|
+
<el-collapse-item title="一致性 Consistency" name="1">
|
|
7
|
+
<div>与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念;</div>
|
|
8
|
+
<div>
|
|
9
|
+
在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。
|
|
10
|
+
</div>
|
|
11
|
+
</el-collapse-item>
|
|
12
|
+
<el-collapse-item title="反馈 Feedback" name="2">
|
|
13
|
+
<div>控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作;</div>
|
|
14
|
+
<div>页面反馈:操作后,通过页面元素的变化清晰地展现当前状态。</div>
|
|
15
|
+
</el-collapse-item>
|
|
16
|
+
<el-collapse-item title="效率 Efficiency" name="3">
|
|
17
|
+
<div>简化流程:设计简洁直观的操作流程;</div>
|
|
18
|
+
<div>清晰明确:语言表达清晰且表意明确,让用户快速理解进而作出决策;</div>
|
|
19
|
+
<div>帮助用户识别:界面简单直白,让用户快速识别而非回忆,减少用户记忆负担。</div>
|
|
20
|
+
</el-collapse-item>
|
|
21
|
+
<el-collapse-item title="可控 Controllability" name="4">
|
|
22
|
+
<div>用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;</div>
|
|
23
|
+
<div>结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。</div>
|
|
24
|
+
</el-collapse-item>
|
|
25
|
+
</j-collapse>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="demo-item">
|
|
29
|
+
<p>手风琴效果</p>
|
|
30
|
+
<j-collapse v-model="activeName2" accordion>
|
|
31
|
+
<el-collapse-item title="一致性 Consistency" name="1">
|
|
32
|
+
<div>与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念;</div>
|
|
33
|
+
<div>
|
|
34
|
+
在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。
|
|
35
|
+
</div>
|
|
36
|
+
</el-collapse-item>
|
|
37
|
+
<el-collapse-item title="反馈 Feedback" name="2">
|
|
38
|
+
<div>控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作;</div>
|
|
39
|
+
<div>页面反馈:操作后,通过页面元素的变化清晰地展现当前状态。</div>
|
|
40
|
+
</el-collapse-item>
|
|
41
|
+
<el-collapse-item title="效率 Efficiency" name="3">
|
|
42
|
+
<div>简化流程:设计简洁直观的操作流程;</div>
|
|
43
|
+
<div>清晰明确:语言表达清晰且表意明确,让用户快速理解进而作出决策;</div>
|
|
44
|
+
<div>帮助用户识别:界面简单直白,让用户快速识别而非回忆,减少用户记忆负担。</div>
|
|
45
|
+
</el-collapse-item>
|
|
46
|
+
<el-collapse-item title="可控 Controllability" name="4">
|
|
47
|
+
<div>用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;</div>
|
|
48
|
+
<div>结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。</div>
|
|
49
|
+
</el-collapse-item>
|
|
50
|
+
</j-collapse>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script setup lang="ts">
|
|
56
|
+
import { ref } from 'vue'
|
|
57
|
+
|
|
58
|
+
const activeNames1 = ref(['1'])
|
|
59
|
+
const activeName2 = ref('1')
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style scoped>
|
|
63
|
+
.collapse-demo {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 24px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.demo-item p {
|
|
70
|
+
margin: 0 0 12px;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
color: var(--j-color-text-2);
|
|
73
|
+
font-weight: 500;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.demo-item {
|
|
77
|
+
position: relative;
|
|
78
|
+
width: 100%;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<j-comp
|
|
3
|
+
type="j-collapse"
|
|
4
|
+
:children="[
|
|
5
|
+
{
|
|
6
|
+
type: 'el-collapse-item',
|
|
7
|
+
config: {
|
|
8
|
+
label: 'Panel 1',
|
|
9
|
+
},
|
|
10
|
+
children: [
|
|
11
|
+
{
|
|
12
|
+
type: 'j-button',
|
|
13
|
+
config: {
|
|
14
|
+
label: 'Button in Panel 1',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: 'el-collapse-item',
|
|
21
|
+
config: {
|
|
22
|
+
label: 'Panel 2',
|
|
23
|
+
active: true,
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
type: 'j-button',
|
|
28
|
+
config: {
|
|
29
|
+
label: 'Button in Panel 2 (Active by default)',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
]"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script setup lang="ts"></script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<j-comp
|
|
3
|
+
type="j-tabs"
|
|
4
|
+
:children="[
|
|
5
|
+
{
|
|
6
|
+
type: 'el-tab-pane',
|
|
7
|
+
config: {
|
|
8
|
+
label: 'Tab 1',
|
|
9
|
+
},
|
|
10
|
+
children: [
|
|
11
|
+
{
|
|
12
|
+
type: 'j-button',
|
|
13
|
+
config: {
|
|
14
|
+
label: 'Button in Tab 1',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: 'el-tab-pane',
|
|
21
|
+
config: {
|
|
22
|
+
label: 'Tab 2',
|
|
23
|
+
active: true,
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
type: 'j-button',
|
|
28
|
+
config: {
|
|
29
|
+
label: 'Button in Tab 2 (Active by default)',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
]"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script setup lang="ts"></script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="count-demo">
|
|
3
|
+
<div class="demo-item">
|
|
4
|
+
<p>基础计算 (1000 + 200):</p>
|
|
5
|
+
<j-count :format-json="formJSON" />
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div class="demo-item">
|
|
9
|
+
<p>千分位展示:</p>
|
|
10
|
+
<j-count :format-json="formJSON" thousand-separator />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="demo-item">
|
|
14
|
+
<p>人民币大写:</p>
|
|
15
|
+
<j-count :format-json="formJSON" is-chinese />
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="demo-item">
|
|
19
|
+
<p>保留两位小数:</p>
|
|
20
|
+
<j-count :format-json="formJSON" :decimal="2" />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import { provide } from 'vue'
|
|
27
|
+
|
|
28
|
+
// 模拟表单提供者,因为 Count 组件内部依赖注入
|
|
29
|
+
provide('jd_form_provide', {
|
|
30
|
+
getValue: (id: string) => {
|
|
31
|
+
const mockData: Record<string, number> = {
|
|
32
|
+
price: 1250.5,
|
|
33
|
+
quantity: 3,
|
|
34
|
+
}
|
|
35
|
+
return mockData[id] || 0
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const formJSON =
|
|
40
|
+
'[{"value":1,"type":"num"},{"value":0,"type":"num"},{"value":0,"type":"num"},{"value":0,"type":"num"},{"value":"+","type":"num"},{"value":2,"type":"num"},{"value":0,"type":"num"},{"value":0,"type":"num"}]'
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
.count-demo {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: 20px;
|
|
48
|
+
}
|
|
49
|
+
.demo-item p {
|
|
50
|
+
margin-bottom: 8px;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
color: var(--j-color-text-2);
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="count-up-demo">
|
|
3
|
+
<div class="demo-item">
|
|
4
|
+
<p>基础用法(0-1000):</p>
|
|
5
|
+
<j-count-up :end-value="1000" />
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div class="demo-item">
|
|
9
|
+
<p>自定义起始值和小数位:</p>
|
|
10
|
+
<j-count-up :start-value="0" :end-value="99.99" :decimals="2" />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="demo-item">
|
|
14
|
+
<p>自定义动画时间:</p>
|
|
15
|
+
<j-count-up :end-value="5000" :duration="5" />
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="demo-item">
|
|
19
|
+
<p>禁用动画(直接显示值):</p>
|
|
20
|
+
<j-count-up :end-value="2024" :animation="false" />
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="demo-item">
|
|
24
|
+
<p>带回调的动画:</p>
|
|
25
|
+
<j-count-up :end-value="100" :callback="handleAnimationEnd" />
|
|
26
|
+
<p v-if="callbackMessage" style="color: var(--j-color-success); margin-top: 8px">
|
|
27
|
+
{{ callbackMessage }}
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="demo-item">
|
|
32
|
+
<p>动态更新值:</p>
|
|
33
|
+
<div style="display: flex; gap: 10px; align-items: center">
|
|
34
|
+
<j-count-up ref="countUpRef" :end-value="currentValue" :duration="1" />
|
|
35
|
+
<button @click="updateValue(500)">更新到500</button>
|
|
36
|
+
<button @click="updateValue(1500)">更新到1500</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
import { ref } from 'vue'
|
|
44
|
+
|
|
45
|
+
const countUpRef = ref()
|
|
46
|
+
const currentValue = ref(0)
|
|
47
|
+
const callbackMessage = ref('')
|
|
48
|
+
|
|
49
|
+
const handleAnimationEnd = (countUp: any) => {
|
|
50
|
+
callbackMessage.value = `动画完成!最终值为: ${countUp.endVal}`
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
callbackMessage.value = ''
|
|
53
|
+
}, 3000)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const updateValue = (newValue: number) => {
|
|
57
|
+
currentValue.value = newValue
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style scoped>
|
|
62
|
+
.count-up-demo {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: 20px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.demo-item p {
|
|
69
|
+
margin-bottom: 8px;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
color: var(--j-color-text-2);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
button {
|
|
75
|
+
padding: 6px 12px;
|
|
76
|
+
border: 1px solid var(--j-color-border);
|
|
77
|
+
border-radius: 4px;
|
|
78
|
+
background-color: var(--j-color-bg-primary);
|
|
79
|
+
color: var(--j-color-text-1);
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
transition: all 0.3s;
|
|
82
|
+
font-size: 12px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
button:hover {
|
|
86
|
+
border-color: var(--j-color-primary);
|
|
87
|
+
color: var(--j-color-primary);
|
|
88
|
+
}
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="data-panel-demo">
|
|
3
|
+
<div class="demo-item">
|
|
4
|
+
<p>基础用法 - 带标题的面板:</p>
|
|
5
|
+
<j-data-panel title="数据面板">
|
|
6
|
+
<div style="padding: 16px">
|
|
7
|
+
<p>这是一个数据展示面板</p>
|
|
8
|
+
<p>可以在其中放置任何内容</p>
|
|
9
|
+
</div>
|
|
10
|
+
</j-data-panel>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="demo-item">
|
|
14
|
+
<p>无标题面板:</p>
|
|
15
|
+
<j-data-panel>
|
|
16
|
+
<div style="padding: 16px">
|
|
17
|
+
<p>没有标题的面板</p>
|
|
18
|
+
</div>
|
|
19
|
+
</j-data-panel>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="demo-item">
|
|
23
|
+
<p>带标题右侧内容:</p>
|
|
24
|
+
<j-data-panel title="用户数据">
|
|
25
|
+
<template #titleRight>
|
|
26
|
+
<j-button icon="mdi:refresh"></j-button>
|
|
27
|
+
</template>
|
|
28
|
+
<div style="padding: 16px">
|
|
29
|
+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px">
|
|
30
|
+
<div>
|
|
31
|
+
<div style="color: var(--j-color-text-2); font-size: 12px; margin-bottom: 4px">
|
|
32
|
+
用户总数
|
|
33
|
+
</div>
|
|
34
|
+
<div style="font-size: 24px; font-weight: bold; color: var(--j-color-primary)">
|
|
35
|
+
1,234
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div>
|
|
39
|
+
<div style="color: var(--j-color-text-2); font-size: 12px; margin-bottom: 4px">
|
|
40
|
+
活跃用户
|
|
41
|
+
</div>
|
|
42
|
+
<div style="font-size: 24px; font-weight: bold; color: var(--j-color-success)">
|
|
43
|
+
856
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div>
|
|
47
|
+
<div style="color: var(--j-color-text-2); font-size: 12px; margin-bottom: 4px">
|
|
48
|
+
待审核
|
|
49
|
+
</div>
|
|
50
|
+
<div style="font-size: 24px; font-weight: bold; color: var(--j-color-warning)">
|
|
51
|
+
45
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div>
|
|
55
|
+
<div style="color: var(--j-color-text-2); font-size: 12px; margin-bottom: 4px">
|
|
56
|
+
异常
|
|
57
|
+
</div>
|
|
58
|
+
<div style="font-size: 24px; font-weight: bold; color: var(--j-color-danger)">12</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</j-data-panel>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="demo-item">
|
|
66
|
+
<p>多个面板并排显示:</p>
|
|
67
|
+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px">
|
|
68
|
+
<j-data-panel title="收入统计">
|
|
69
|
+
<div style="padding: 16px">
|
|
70
|
+
<div style="font-size: 20px; font-weight: bold; color: var(--j-color-primary)">
|
|
71
|
+
¥ 128,500
|
|
72
|
+
</div>
|
|
73
|
+
<div style="color: var(--j-color-text-2); font-size: 12px; margin-top: 8px">
|
|
74
|
+
本月收入
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</j-data-panel>
|
|
78
|
+
<j-data-panel title="支出统计">
|
|
79
|
+
<div style="padding: 16px">
|
|
80
|
+
<div style="font-size: 20px; font-weight: bold; color: var(--j-color-danger)">
|
|
81
|
+
¥ 32,100
|
|
82
|
+
</div>
|
|
83
|
+
<div style="color: var(--j-color-text-2); font-size: 12px; margin-top: 8px">
|
|
84
|
+
本月支出
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</j-data-panel>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<script setup lang="ts">
|
|
94
|
+
// 示例代码无需额外逻辑
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style scoped>
|
|
98
|
+
.data-panel-demo {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
gap: 20px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.demo-item p {
|
|
105
|
+
margin-bottom: 12px;
|
|
106
|
+
font-size: 14px;
|
|
107
|
+
color: var(--j-color-text-2);
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-button label="打开弹窗" @click="visible = true" />
|
|
4
|
+
<j-dialog
|
|
5
|
+
v-model:visible="visible"
|
|
6
|
+
title="基础弹窗"
|
|
7
|
+
:width="600"
|
|
8
|
+
:height="400"
|
|
9
|
+
@ok="handleOk"
|
|
10
|
+
@cancel="handleCancel"
|
|
11
|
+
>
|
|
12
|
+
<div style="padding: 16px">
|
|
13
|
+
<p>这是一个基础的弹窗示例。</p>
|
|
14
|
+
<p>弹窗支持拖拽、缩放等功能。</p>
|
|
15
|
+
</div>
|
|
16
|
+
</j-dialog>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { ref } from 'vue'
|
|
22
|
+
|
|
23
|
+
const visible = ref(false)
|
|
24
|
+
|
|
25
|
+
const handleOk = (showLoading: any, hideLoading: any) => {
|
|
26
|
+
showLoading('保存中...')
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
hideLoading()
|
|
29
|
+
visible.value = false
|
|
30
|
+
}, 1000)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const handleCancel = () => {
|
|
34
|
+
visible.value = false
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-button label="自定义按钮" @click="visible = true" />
|
|
4
|
+
<j-dialog
|
|
5
|
+
v-model:visible="visible"
|
|
6
|
+
title="自定义按钮弹窗"
|
|
7
|
+
:width="600"
|
|
8
|
+
:height="400"
|
|
9
|
+
:has-save-btn="false"
|
|
10
|
+
:buttons="buttons"
|
|
11
|
+
>
|
|
12
|
+
<div style="padding: 16px">
|
|
13
|
+
<p>这个弹窗使用了自定义按钮配置。</p>
|
|
14
|
+
</div>
|
|
15
|
+
</j-dialog>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import { ref } from 'vue'
|
|
21
|
+
import { ElMessage } from 'element-plus'
|
|
22
|
+
|
|
23
|
+
const visible = ref(false)
|
|
24
|
+
|
|
25
|
+
const buttons = [
|
|
26
|
+
{
|
|
27
|
+
prop: 'confirm',
|
|
28
|
+
label: '确认',
|
|
29
|
+
type: 'primary',
|
|
30
|
+
click: () => {
|
|
31
|
+
ElMessage.success('点击了确认按钮')
|
|
32
|
+
visible.value = false
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
prop: 'delete',
|
|
37
|
+
label: '删除',
|
|
38
|
+
danger: true,
|
|
39
|
+
click: () => {
|
|
40
|
+
ElMessage.warning('点击了删除按钮')
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-button label="可全屏弹窗" @click="visible = true" />
|
|
4
|
+
<j-dialog
|
|
5
|
+
v-model:visible="visible"
|
|
6
|
+
title="全屏弹窗"
|
|
7
|
+
:show-full-screen-btn="true"
|
|
8
|
+
:width="600"
|
|
9
|
+
:height="400"
|
|
10
|
+
>
|
|
11
|
+
<div style="padding: 16px">
|
|
12
|
+
<p>点击右上角的全屏按钮可以切换全屏显示。</p>
|
|
13
|
+
<p>全屏状态下可以再次点击退出全屏。</p>
|
|
14
|
+
</div>
|
|
15
|
+
</j-dialog>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import { ref } from 'vue'
|
|
21
|
+
|
|
22
|
+
const visible = ref(false)
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-button label="无遮罩弹窗" @click="visible = true" />
|
|
4
|
+
<j-dialog v-model:visible="visible" title="无遮罩弹窗" :width="500" :height="350" :mask="false">
|
|
5
|
+
<div style="padding: 16px">
|
|
6
|
+
<p>这个弹窗没有遮罩层。</p>
|
|
7
|
+
<p>你可以与页面其他内容进行交互。</p>
|
|
8
|
+
</div>
|
|
9
|
+
</j-dialog>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
|
|
16
|
+
const visible = ref(false)
|
|
17
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; gap: 8px">
|
|
3
|
+
<j-button label="小弹窗" @click="showDialog('small')" />
|
|
4
|
+
<j-button label="中等弹窗" @click="showDialog('medium')" />
|
|
5
|
+
<j-button label="大弹窗" @click="showDialog('large')" />
|
|
6
|
+
<j-dialog v-model:visible="visible" :title="title" :width="width" :height="height">
|
|
7
|
+
<div style="padding: 16px">
|
|
8
|
+
<p>当前弹窗尺寸:{{ title }}</p>
|
|
9
|
+
<p>宽度:{{ width }}px</p>
|
|
10
|
+
<p>高度:{{ height }}px</p>
|
|
11
|
+
</div>
|
|
12
|
+
</j-dialog>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { ref } from 'vue'
|
|
18
|
+
|
|
19
|
+
const visible = ref(false)
|
|
20
|
+
const title = ref('')
|
|
21
|
+
const width = ref(600)
|
|
22
|
+
const height = ref(400)
|
|
23
|
+
|
|
24
|
+
const showDialog = (size: string) => {
|
|
25
|
+
switch (size) {
|
|
26
|
+
case 'small':
|
|
27
|
+
title.value = '小弹窗'
|
|
28
|
+
width.value = 400
|
|
29
|
+
height.value = 300
|
|
30
|
+
break
|
|
31
|
+
case 'medium':
|
|
32
|
+
title.value = '中等弹窗'
|
|
33
|
+
width.value = 600
|
|
34
|
+
height.value = 400
|
|
35
|
+
break
|
|
36
|
+
case 'large':
|
|
37
|
+
title.value = '大弹窗'
|
|
38
|
+
width.value = 900
|
|
39
|
+
height.value = 600
|
|
40
|
+
break
|
|
41
|
+
}
|
|
42
|
+
visible.value = true
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-button label="步骤弹窗" @click="visible = true" />
|
|
4
|
+
<j-dialog
|
|
5
|
+
v-model:visible="visible"
|
|
6
|
+
v-model:step-active="stepActive"
|
|
7
|
+
title="分步骤表单"
|
|
8
|
+
:width="700"
|
|
9
|
+
:height="450"
|
|
10
|
+
:is-step="true"
|
|
11
|
+
:steps="steps"
|
|
12
|
+
:validate-steps="validateSteps"
|
|
13
|
+
@ok="handleOk"
|
|
14
|
+
>
|
|
15
|
+
<div style="padding: 16px">
|
|
16
|
+
<div v-if="stepActive === 0">
|
|
17
|
+
<h3>步骤一:基本信息</h3>
|
|
18
|
+
<p>请填写基本信息...</p>
|
|
19
|
+
</div>
|
|
20
|
+
<div v-if="stepActive === 1">
|
|
21
|
+
<h3>步骤二:详细配置</h3>
|
|
22
|
+
<p>请完成详细配置...</p>
|
|
23
|
+
</div>
|
|
24
|
+
<div v-if="stepActive === 2">
|
|
25
|
+
<h3>步骤三:确认提交</h3>
|
|
26
|
+
<p>请确认信息后提交...</p>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</j-dialog>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
import { ref } from 'vue'
|
|
35
|
+
import { ElMessage } from 'element-plus'
|
|
36
|
+
|
|
37
|
+
const visible = ref(false)
|
|
38
|
+
const stepActive = ref(0)
|
|
39
|
+
const steps = ['基本信息', '详细配置', '确认提交']
|
|
40
|
+
|
|
41
|
+
const validateSteps = async (step: number) => {
|
|
42
|
+
// 模拟校验
|
|
43
|
+
await new Promise((resolve) => setTimeout(resolve, 500))
|
|
44
|
+
ElMessage.success(`步骤 ${step + 1} 校验通过`)
|
|
45
|
+
return true
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const handleOk = (showLoading: any, hideLoading: any) => {
|
|
49
|
+
showLoading('提交中...')
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
hideLoading()
|
|
52
|
+
ElMessage.success('提交成功')
|
|
53
|
+
visible.value = false
|
|
54
|
+
stepActive.value = 0
|
|
55
|
+
}, 1000)
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-button label="打开全屏弹窗" @click="visible = true" />
|
|
4
|
+
<j-dialog-full v-model:visible="visible" title="全屏弹窗" @ok="handleOk" @cancel="handleCancel">
|
|
5
|
+
<div style="padding: 24px">
|
|
6
|
+
<p>这是一个全屏弹窗示例。</p>
|
|
7
|
+
<p>全屏弹窗占据整个屏幕,适用于复杂的表单或大量内容展示。</p>
|
|
8
|
+
</div>
|
|
9
|
+
</j-dialog-full>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
|
|
16
|
+
const visible = ref(false)
|
|
17
|
+
|
|
18
|
+
const handleOk = (showLoading: any, hideLoading: any) => {
|
|
19
|
+
showLoading('保存中...')
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
hideLoading()
|
|
22
|
+
visible.value = false
|
|
23
|
+
}, 1000)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const handleCancel = () => {
|
|
27
|
+
visible.value = false
|
|
28
|
+
}
|
|
29
|
+
</script>
|