@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,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 100%; height: 400px">
|
|
3
|
+
<j-echarts :option="option" @click="handleClick" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { ref } from 'vue'
|
|
9
|
+
|
|
10
|
+
const option = ref({
|
|
11
|
+
title: {
|
|
12
|
+
text: 'ECharts 基础示例',
|
|
13
|
+
},
|
|
14
|
+
tooltip: {},
|
|
15
|
+
xAxis: {
|
|
16
|
+
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'],
|
|
17
|
+
},
|
|
18
|
+
yAxis: {},
|
|
19
|
+
series: [
|
|
20
|
+
{
|
|
21
|
+
name: '销量',
|
|
22
|
+
type: 'bar',
|
|
23
|
+
data: [5, 20, 36, 10, 10, 20],
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const handleClick = (params: any) => {
|
|
29
|
+
console.log('点击了图表', params)
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-button label="更新数据" style="margin-bottom: 16px" @click="updateData" />
|
|
4
|
+
<div style="width: 100%; height: 400px">
|
|
5
|
+
<j-echarts :option="option" />
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { ref } from 'vue'
|
|
12
|
+
|
|
13
|
+
const option = ref({
|
|
14
|
+
title: {
|
|
15
|
+
text: '动态数据更新',
|
|
16
|
+
},
|
|
17
|
+
tooltip: {},
|
|
18
|
+
xAxis: {
|
|
19
|
+
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'],
|
|
20
|
+
},
|
|
21
|
+
yAxis: {},
|
|
22
|
+
series: [
|
|
23
|
+
{
|
|
24
|
+
name: '销量',
|
|
25
|
+
type: 'bar',
|
|
26
|
+
data: [5, 20, 36, 10, 10, 20],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const updateData = () => {
|
|
32
|
+
option.value = {
|
|
33
|
+
...option.value,
|
|
34
|
+
series: [
|
|
35
|
+
{
|
|
36
|
+
name: '销量',
|
|
37
|
+
type: 'bar',
|
|
38
|
+
data: option.value.series[0].data.map(() => Math.floor(Math.random() * 100)),
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 100%; height: 400px">
|
|
3
|
+
<j-echarts :option="option" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { ref } from 'vue'
|
|
9
|
+
|
|
10
|
+
const option = ref({
|
|
11
|
+
title: {
|
|
12
|
+
text: '折线图示例',
|
|
13
|
+
},
|
|
14
|
+
tooltip: {
|
|
15
|
+
trigger: 'axis',
|
|
16
|
+
},
|
|
17
|
+
legend: {
|
|
18
|
+
data: ['邮件营销', '联盟广告', '视频广告'],
|
|
19
|
+
},
|
|
20
|
+
xAxis: {
|
|
21
|
+
type: 'category',
|
|
22
|
+
boundaryGap: false,
|
|
23
|
+
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
|
24
|
+
},
|
|
25
|
+
yAxis: {
|
|
26
|
+
type: 'value',
|
|
27
|
+
},
|
|
28
|
+
series: [
|
|
29
|
+
{
|
|
30
|
+
name: '邮件营销',
|
|
31
|
+
type: 'line',
|
|
32
|
+
data: [120, 132, 101, 134, 90, 230, 210],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: '联盟广告',
|
|
36
|
+
type: 'line',
|
|
37
|
+
data: [220, 182, 191, 234, 290, 330, 310],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: '视频广告',
|
|
41
|
+
type: 'line',
|
|
42
|
+
data: [150, 232, 201, 154, 190, 330, 410],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
})
|
|
46
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 100%; height: 400px">
|
|
3
|
+
<j-echarts :option="option" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { ref } from 'vue'
|
|
9
|
+
|
|
10
|
+
const option = ref({
|
|
11
|
+
title: {
|
|
12
|
+
text: '饼图示例',
|
|
13
|
+
left: 'center',
|
|
14
|
+
},
|
|
15
|
+
tooltip: {
|
|
16
|
+
trigger: 'item',
|
|
17
|
+
},
|
|
18
|
+
legend: {
|
|
19
|
+
orient: 'vertical',
|
|
20
|
+
left: 'left',
|
|
21
|
+
},
|
|
22
|
+
series: [
|
|
23
|
+
{
|
|
24
|
+
name: '访问来源',
|
|
25
|
+
type: 'pie',
|
|
26
|
+
radius: '50%',
|
|
27
|
+
data: [
|
|
28
|
+
{ value: 1048, name: '搜索引擎' },
|
|
29
|
+
{ value: 735, name: '直接访问' },
|
|
30
|
+
{ value: 580, name: '邮件营销' },
|
|
31
|
+
{ value: 484, name: '联盟广告' },
|
|
32
|
+
{ value: 300, name: '视频广告' },
|
|
33
|
+
],
|
|
34
|
+
emphasis: {
|
|
35
|
+
itemStyle: {
|
|
36
|
+
shadowBlur: 10,
|
|
37
|
+
shadowOffsetX: 0,
|
|
38
|
+
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
})
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-editor v-model:value="content" height="300" placeholder="请输入内容..." />
|
|
4
|
+
<div style="margin-top: 20px;">
|
|
5
|
+
<h3>Content:</h3>
|
|
6
|
+
<div>{{ content }}</div>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts" setup>
|
|
12
|
+
import { ref } from 'vue'
|
|
13
|
+
|
|
14
|
+
const content = ref('<p>Hello <b>SimCode UI</b>!</p>')
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<j-form ref="formRef" :schema="schema" :config="formConfig" />
|
|
4
|
+
<div style="margin-top: 16px; padding-left: 100px">
|
|
5
|
+
<j-button type="primary" label="提交" @click="handleSubmit"></j-button>
|
|
6
|
+
<j-button style="margin-left: 8px" label="重置" @click="handleReset"></j-button>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { ref, reactive } from 'vue'
|
|
13
|
+
|
|
14
|
+
const formRef = ref()
|
|
15
|
+
|
|
16
|
+
const formConfig = reactive({
|
|
17
|
+
labelWidth: 100,
|
|
18
|
+
labelPosition: 'right',
|
|
19
|
+
size: 'default',
|
|
20
|
+
gutter: 16,
|
|
21
|
+
span: 24,
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const schema = [
|
|
25
|
+
{
|
|
26
|
+
type: 'j-input',
|
|
27
|
+
config: {
|
|
28
|
+
label: '用户名',
|
|
29
|
+
field: 'username',
|
|
30
|
+
placeholder: '请输入用户名',
|
|
31
|
+
rule: [{ required: true, message: '请输入用户名' }],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'j-input',
|
|
36
|
+
config: {
|
|
37
|
+
label: '邮箱',
|
|
38
|
+
field: 'email',
|
|
39
|
+
placeholder: '请输入邮箱',
|
|
40
|
+
rule: [
|
|
41
|
+
{ required: true, message: '请输入邮箱' },
|
|
42
|
+
{ type: 'email', message: '请输入正确的邮箱格式' },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'j-number',
|
|
48
|
+
config: {
|
|
49
|
+
label: '年龄',
|
|
50
|
+
field: 'age',
|
|
51
|
+
placeholder: '请输入年龄',
|
|
52
|
+
min: 0,
|
|
53
|
+
max: 150,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'j-select',
|
|
58
|
+
config: {
|
|
59
|
+
label: '选择器',
|
|
60
|
+
field: 'select',
|
|
61
|
+
placeholder: '请选择',
|
|
62
|
+
options: [
|
|
63
|
+
{ label: '选项1', value: '1' },
|
|
64
|
+
{ label: '选项2', value: '2' },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: 'j-radio',
|
|
70
|
+
config: {
|
|
71
|
+
label: '单选框',
|
|
72
|
+
field: 'radio',
|
|
73
|
+
options: [
|
|
74
|
+
{ label: '选项1', value: '1' },
|
|
75
|
+
{ label: '选项2', value: '2' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'j-checkbox',
|
|
81
|
+
config: {
|
|
82
|
+
label: '多选框',
|
|
83
|
+
field: 'checkbox',
|
|
84
|
+
options: [
|
|
85
|
+
{ label: '选项1', value: '1' },
|
|
86
|
+
{ label: '选项2', value: '2' },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'j-switch',
|
|
92
|
+
config: {
|
|
93
|
+
label: '开关',
|
|
94
|
+
field: 'switch',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
type: 'j-slider',
|
|
99
|
+
config: {
|
|
100
|
+
label: '滑块',
|
|
101
|
+
field: 'slider',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'j-rate',
|
|
106
|
+
config: {
|
|
107
|
+
label: '评分',
|
|
108
|
+
field: 'rate',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'j-cascader-select',
|
|
113
|
+
config: {
|
|
114
|
+
label: '级联选择',
|
|
115
|
+
field: 'cascader',
|
|
116
|
+
options: [
|
|
117
|
+
{
|
|
118
|
+
label: '指南',
|
|
119
|
+
value: 'guide',
|
|
120
|
+
children: [
|
|
121
|
+
{ label: '设计原则', value: 'design' },
|
|
122
|
+
{ label: '导航', value: 'navigation' },
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'j-input-tag',
|
|
130
|
+
config: {
|
|
131
|
+
label: '标签输入',
|
|
132
|
+
field: 'tags',
|
|
133
|
+
placeholder: '请输入标签',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'j-input-color',
|
|
138
|
+
config: {
|
|
139
|
+
label: '颜色选择',
|
|
140
|
+
field: 'color',
|
|
141
|
+
placeholder: '请选择颜色',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'j-autocomplete',
|
|
146
|
+
config: {
|
|
147
|
+
label: '自动补全',
|
|
148
|
+
field: 'autocomplete',
|
|
149
|
+
placeholder: '请输入内容',
|
|
150
|
+
options: [
|
|
151
|
+
{ value: 'Vue', link: 'https://github.com/vuejs/vue' },
|
|
152
|
+
{ value: 'React', link: 'https://github.com/facebook/react' },
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'j-upload',
|
|
158
|
+
config: {
|
|
159
|
+
label: '上传',
|
|
160
|
+
field: 'upload',
|
|
161
|
+
placeholder: '点击上传',
|
|
162
|
+
isNotApi: true,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'j-code-mirror',
|
|
167
|
+
config: {
|
|
168
|
+
label: '代码编辑',
|
|
169
|
+
field: 'code',
|
|
170
|
+
height: 200,
|
|
171
|
+
style: { 'margin-bottom': '18px' },
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'j-tabs',
|
|
176
|
+
config: {
|
|
177
|
+
field: 'f_Type',
|
|
178
|
+
},
|
|
179
|
+
children: [
|
|
180
|
+
{
|
|
181
|
+
config: {
|
|
182
|
+
label: '常规',
|
|
183
|
+
},
|
|
184
|
+
children: [
|
|
185
|
+
{
|
|
186
|
+
type: 'j-input',
|
|
187
|
+
config: {
|
|
188
|
+
label: '主机',
|
|
189
|
+
field: 'f_Server',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
config: {
|
|
196
|
+
label: '高级',
|
|
197
|
+
},
|
|
198
|
+
children: [
|
|
199
|
+
{
|
|
200
|
+
type: 'j-input',
|
|
201
|
+
config: {
|
|
202
|
+
label: '连接串',
|
|
203
|
+
field: 'f_DbConnection',
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
]
|
|
211
|
+
|
|
212
|
+
const handleSubmit = async () => {
|
|
213
|
+
const valid = await formRef.value.validate()
|
|
214
|
+
if (valid) {
|
|
215
|
+
const formData = formRef.value.getFormData()
|
|
216
|
+
console.log('表单数据:', formData)
|
|
217
|
+
alert('提交成功!')
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const handleReset = () => {
|
|
222
|
+
formRef.value.reset()
|
|
223
|
+
}
|
|
224
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex-direction: column; gap: 12px">
|
|
3
|
+
<j-guid v-model="value" size="large" style="width: 300px" />
|
|
4
|
+
<j-guid v-model="value" style="width: 300px" />
|
|
5
|
+
<j-guid v-model="value" size="small" style="width: 300px" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import { ref } from 'vue'
|
|
11
|
+
|
|
12
|
+
const value = ref('')
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hpanel-demo">
|
|
3
|
+
<div class="demo-item">
|
|
4
|
+
<p>基础用法</p>
|
|
5
|
+
<j-hpanel class="custom-panel">
|
|
6
|
+
<template #left>
|
|
7
|
+
<div class="side-content">Left Slot</div>
|
|
8
|
+
</template>
|
|
9
|
+
<div class="main-content">Default Slot (Main Content)</div>
|
|
10
|
+
<template #right>
|
|
11
|
+
<div class="side-content">Right Slot</div>
|
|
12
|
+
</template>
|
|
13
|
+
</j-hpanel>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="demo-item">
|
|
17
|
+
<p>仅左侧和内容</p>
|
|
18
|
+
<j-hpanel class="custom-panel">
|
|
19
|
+
<template #left>
|
|
20
|
+
<div class="side-content">Left</div>
|
|
21
|
+
</template>
|
|
22
|
+
<div class="main-content">Main Content</div>
|
|
23
|
+
</j-hpanel>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="demo-item">
|
|
27
|
+
<p>仅内容和右侧</p>
|
|
28
|
+
<j-hpanel class="custom-panel">
|
|
29
|
+
<div class="main-content">Main Content</div>
|
|
30
|
+
<template #right>
|
|
31
|
+
<div class="side-content">Right</div>
|
|
32
|
+
</template>
|
|
33
|
+
</j-hpanel>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script setup lang="ts">
|
|
39
|
+
// 示例代码无需额外逻辑
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style scoped>
|
|
43
|
+
.hpanel-demo {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: 24px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.demo-item p {
|
|
50
|
+
margin: 0 0 12px;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
color: var(--j-color-text-2);
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.custom-panel {
|
|
57
|
+
border: 1px solid var(--j-color-border);
|
|
58
|
+
border-radius: 4px;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.side-content {
|
|
63
|
+
background-color: var(--j-color-fill-2);
|
|
64
|
+
padding: 12px 20px;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
min-width: 100px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.main-content {
|
|
72
|
+
background-color: var(--j-color-bg-2);
|
|
73
|
+
padding: 12px 20px;
|
|
74
|
+
height: 60px;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; gap: 20px; align-items: center">
|
|
3
|
+
<j-icon icon="mdi:home" />
|
|
4
|
+
<j-icon icon="mdi:account" color="#409eff" />
|
|
5
|
+
<j-icon icon="mdi:check-circle" color="#67c23a" />
|
|
6
|
+
<j-icon icon="mdi:alert-circle" color="#f56c6c" />
|
|
7
|
+
<j-icon icon="mdi:information" color="#909399" />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; gap: 20px; align-items: center; font-size: 24px">
|
|
3
|
+
<j-icon icon="mdi:send" :rotate="45" />
|
|
4
|
+
<j-icon icon="mdi:send" :rotate="90" />
|
|
5
|
+
<j-icon icon="mdi:send" :rotate="180" />
|
|
6
|
+
<j-icon icon="mdi:send" flip="horizontal" />
|
|
7
|
+
<j-icon icon="mdi:send" flip="vertical" />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<j-input v-model="value" placeholder="请输入内容" style="width: 300px" />
|
|
3
|
+
<p v-if="value" style="margin-top: 12px; color: #606266">输入的内容: {{ value }}</p>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import { ref } from 'vue'
|
|
8
|
+
|
|
9
|
+
const value = ref('')
|
|
10
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex-direction: column; gap: 12px">
|
|
3
|
+
<j-input v-model="value1" clearable placeholder="可清除的输入框" style="width: 300px" />
|
|
4
|
+
<p v-if="value1" style="color: #606266">输入的内容: {{ value1 }}</p>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { ref } from 'vue'
|
|
10
|
+
|
|
11
|
+
const value1 = ref('')
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex-direction: column; gap: 12px">
|
|
3
|
+
<j-input
|
|
4
|
+
v-model="value1"
|
|
5
|
+
prefix-icon="mdi:search"
|
|
6
|
+
placeholder="带前缀图标的输入框"
|
|
7
|
+
style="width: 300px"
|
|
8
|
+
/>
|
|
9
|
+
<j-input
|
|
10
|
+
v-model="value2"
|
|
11
|
+
suffix-icon="mdi:calendar"
|
|
12
|
+
placeholder="带后缀图标的输入框"
|
|
13
|
+
style="width: 300px"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup lang="ts">
|
|
19
|
+
import { ref } from 'vue'
|
|
20
|
+
|
|
21
|
+
const value1 = ref('')
|
|
22
|
+
const value2 = ref('')
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex-direction: column; gap: 12px">
|
|
3
|
+
<j-input
|
|
4
|
+
v-model="password"
|
|
5
|
+
type="password"
|
|
6
|
+
show-password
|
|
7
|
+
placeholder="请输入密码"
|
|
8
|
+
style="width: 300px"
|
|
9
|
+
/>
|
|
10
|
+
<p v-if="password" style="color: #606266">密码: {{ password }}</p>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { ref } from 'vue'
|
|
16
|
+
|
|
17
|
+
const password = ref('')
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex-direction: column; gap: 12px">
|
|
3
|
+
<j-input v-model="value" size="large" placeholder="大型输入框" style="width: 300px" />
|
|
4
|
+
<j-input v-model="value" placeholder="默认输入框" style="width: 300px" />
|
|
5
|
+
<j-input v-model="value" size="small" placeholder="小型输入框" style="width: 300px" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import { ref } from 'vue'
|
|
11
|
+
|
|
12
|
+
const value = ref('')
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex-direction: column; gap: 12px">
|
|
3
|
+
<j-input
|
|
4
|
+
v-model="value1"
|
|
5
|
+
type="textarea"
|
|
6
|
+
:rows="4"
|
|
7
|
+
placeholder="固定行数的文本域"
|
|
8
|
+
style="width: 300px"
|
|
9
|
+
/>
|
|
10
|
+
<j-input
|
|
11
|
+
v-model="value2"
|
|
12
|
+
type="textarea"
|
|
13
|
+
:autosize="{ minRows: 2, maxRows: 6 }"
|
|
14
|
+
placeholder="自适应高度的文本域"
|
|
15
|
+
style="width: 300px"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { ref } from 'vue'
|
|
22
|
+
|
|
23
|
+
const value1 = ref('')
|
|
24
|
+
const value2 = ref('')
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex-direction: column; gap: 12px">
|
|
3
|
+
<j-input
|
|
4
|
+
v-model="value1"
|
|
5
|
+
type="text"
|
|
6
|
+
:maxlength="10"
|
|
7
|
+
show-word-limit
|
|
8
|
+
placeholder="最多输入10个字符"
|
|
9
|
+
style="width: 300px"
|
|
10
|
+
/>
|
|
11
|
+
<j-input
|
|
12
|
+
v-model="value2"
|
|
13
|
+
type="textarea"
|
|
14
|
+
:maxlength="20"
|
|
15
|
+
show-word-limit
|
|
16
|
+
word-limit-position="outside"
|
|
17
|
+
placeholder="字数统计在外部"
|
|
18
|
+
style="width: 300px"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { ref } from 'vue'
|
|
25
|
+
|
|
26
|
+
const value1 = ref('')
|
|
27
|
+
const value2 = ref('')
|
|
28
|
+
</script>
|