@zhangqingcq/vgce 0.0.13 → 0.0.15

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.
Files changed (135) hide show
  1. package/README.md +16 -2
  2. package/dist/style.css +1 -1
  3. package/dist/vgce.js +28 -34
  4. package/dist/vgce.umd.cjs +5 -5
  5. package/package.json +3 -2
  6. package/src/App.vue +11 -0
  7. package/src/assets/base.less +49 -0
  8. package/src/assets/icons/add.svg +1 -0
  9. package/src/assets/icons/delete.svg +12 -0
  10. package/src/assets/icons/export.svg +1 -0
  11. package/src/assets/icons/group.svg +13 -0
  12. package/src/assets/icons/import.svg +1 -0
  13. package/src/assets/icons/lock.svg +7 -0
  14. package/src/assets/icons/menu-fold.svg +9 -0
  15. package/src/assets/icons/menu-unfold.svg +9 -0
  16. package/src/assets/icons/preview.svg +6 -0
  17. package/src/assets/icons/redo.svg +8 -0
  18. package/src/assets/icons/return.svg +8 -0
  19. package/src/assets/icons/rotate.svg +1 -0
  20. package/src/assets/icons/save.svg +9 -0
  21. package/src/assets/icons/setting.svg +6 -0
  22. package/src/assets/icons/undo.svg +7 -0
  23. package/src/assets/icons/ungroup.svg +16 -0
  24. package/src/assets/icons/unlock.svg +7 -0
  25. package/src/assets/main.less +6 -0
  26. package/src/assets/svgs/alternator.svg +8 -0
  27. package/src/assets/svgs/bot-12.svg +1 -0
  28. package/src/assets/svgs/bot-2.svg +1 -0
  29. package/src/assets/svgs/bot-3.svg +1 -0
  30. package/src/assets/svgs/bot-7.svg +1 -0
  31. package/src/assets/svgs/bot-9.svg +94 -0
  32. package/src/assets/svgs/car.svg +1 -0
  33. package/src/assets/svgs/circuit-breaker.svg +11 -0
  34. package/src/assets/svgs/clock-a.svg +23 -0
  35. package/src/assets/svgs/common-table.svg +7 -0
  36. package/src/assets/svgs/el-button.svg +10 -0
  37. package/src/assets/svgs/el-tag.svg +13 -0
  38. package/src/assets/svgs/hospital.svg +1 -0
  39. package/src/assets/svgs/house.svg +1 -0
  40. package/src/assets/svgs/light.svg +24 -0
  41. package/src/assets/svgs/now-time.svg +9 -0
  42. package/src/assets/svgs/package.svg +1 -0
  43. package/src/assets/svgs/pie-charts.svg +10 -0
  44. package/src/assets/svgs/progress-a.svg +1 -0
  45. package/src/assets/svgs/reservoir.svg +10 -0
  46. package/src/assets/svgs/svg-text.svg +5 -0
  47. package/src/assets/svgs/switch-a.svg +5 -0
  48. package/src/assets/svgs/traction-transformer.svg +11 -0
  49. package/src/components/ace-edit/index.ts +27 -0
  50. package/src/components/config/index.ts +450 -0
  51. package/src/components/config/types.ts +25 -0
  52. package/src/components/svg-analysis/index.vue +11 -0
  53. package/src/components/svg-editor/center-panel/index.vue +867 -0
  54. package/src/components/svg-editor/center-panel/types.ts +11 -0
  55. package/src/components/svg-editor/component-tree/index.vue +33 -0
  56. package/src/components/svg-editor/connection-line/index.vue +125 -0
  57. package/src/components/svg-editor/connection-panel/index.vue +198 -0
  58. package/src/components/svg-editor/export-json/index.vue +37 -0
  59. package/src/components/svg-editor/handle-panel/index.vue +342 -0
  60. package/src/components/svg-editor/import-json/index.vue +37 -0
  61. package/src/components/svg-editor/index.vue +280 -0
  62. package/src/components/svg-editor/left-panel/index.vue +83 -0
  63. package/src/components/svg-editor/right-panel/code-edit-modal.vue +50 -0
  64. package/src/components/svg-editor/right-panel/common-animate.vue +96 -0
  65. package/src/components/svg-editor/right-panel/condition.vue +101 -0
  66. package/src/components/svg-editor/right-panel/dynamic-el-form-item.vue +97 -0
  67. package/src/components/svg-editor/right-panel/index.vue +304 -0
  68. package/src/components/svg-editor/right-panel/list.vue +86 -0
  69. package/src/components/svg-editor/top-panel/index.vue +139 -0
  70. package/src/components/svg-editor/types.ts +22 -0
  71. package/src/components/svg-viewer/index.vue +340 -0
  72. package/src/components/vue3-ruler-tool/index.vue +506 -0
  73. package/src/config/files/clock-a.vue +66 -0
  74. package/src/config/files/common-table.vue +49 -0
  75. package/src/config/files/light-a.vue +72 -0
  76. package/src/config/files/now-time.vue +53 -0
  77. package/src/config/files/pie-charts.vue +72 -0
  78. package/src/config/files/progress.vue +40 -0
  79. package/src/config/files/svg-text.vue +39 -0
  80. package/src/config/files/switch-a.vue +45 -0
  81. package/src/config/index.ts +28 -0
  82. package/src/config/svg/animation/index.ts +8 -0
  83. package/src/config/svg/animation/reservoir.ts +32 -0
  84. package/src/config/svg/custom/clock-a.ts +23 -0
  85. package/src/config/svg/custom/index.ts +11 -0
  86. package/src/config/svg/custom/light.ts +29 -0
  87. package/src/config/svg/custom/svg-text.ts +54 -0
  88. package/src/config/svg/custom/switch-a.ts +29 -0
  89. package/src/config/svg/index.ts +12 -0
  90. package/src/config/svg/stateful/circuit-breaker.ts +38 -0
  91. package/src/config/svg/stateful/index.ts +8 -0
  92. package/src/config/svg/stateless/alternator.ts +28 -0
  93. package/src/config/svg/stateless/bot-12.ts +22 -0
  94. package/src/config/svg/stateless/bot-2.ts +22 -0
  95. package/src/config/svg/stateless/bot-3.ts +22 -0
  96. package/src/config/svg/stateless/bot-7.ts +22 -0
  97. package/src/config/svg/stateless/bot-9.ts +22 -0
  98. package/src/config/svg/stateless/car.ts +22 -0
  99. package/src/config/svg/stateless/hospital.ts +22 -0
  100. package/src/config/svg/stateless/house.ts +22 -0
  101. package/src/config/svg/stateless/index.ts +30 -0
  102. package/src/config/svg/stateless/package.ts +22 -0
  103. package/src/config/svg/stateless/traction-transformer.ts +28 -0
  104. package/src/config/types.ts +126 -0
  105. package/src/config/vue/component/button.ts +57 -0
  106. package/src/config/vue/component/common-table.ts +124 -0
  107. package/src/config/vue/component/index.ts +13 -0
  108. package/src/config/vue/component/now-time.ts +29 -0
  109. package/src/config/vue/component/progress.ts +29 -0
  110. package/src/config/vue/component/tag.ts +46 -0
  111. package/src/config/vue/echarts/index.ts +8 -0
  112. package/src/config/vue/echarts/pie-charts.ts +60 -0
  113. package/src/config/vue/index.ts +5 -0
  114. package/src/hooks.ts +47 -0
  115. package/src/index.ts +14 -0
  116. package/src/main.ts +15 -0
  117. package/src/router.ts +24 -0
  118. package/src/stores/config/index.ts +44 -0
  119. package/src/stores/config/types.ts +27 -0
  120. package/src/stores/global/index.ts +109 -0
  121. package/src/stores/global/types.ts +115 -0
  122. package/src/stores/main.ts +10 -0
  123. package/src/stores/svg-edit-layout/index.ts +17 -0
  124. package/src/stores/svg-edit-layout/types.ts +8 -0
  125. package/src/stores/system/index.ts +174 -0
  126. package/src/stores/system/types.ts +43 -0
  127. package/src/utils/fetch.ts +351 -0
  128. package/src/utils/file-read-write.ts +26 -0
  129. package/src/utils/index.ts +397 -0
  130. package/src/utils/mqtt-net.ts +48 -0
  131. package/src/utils/proxy.ts +7 -0
  132. package/src/utils/scale-core.ts +214 -0
  133. package/src/utils/types.ts +13 -0
  134. package/src/views/EditorS.vue +18 -0
  135. package/src/views/Preview.vue +12 -0
@@ -0,0 +1,22 @@
1
+ import { EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const svg_car: IConfigItem = {
5
+ name: 'car',
6
+ title: '轿车',
7
+ type: EDoneJsonType.File,
8
+ display: true,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ props: {},
15
+ common_animations: {
16
+ val: '',
17
+ delay: 'delay-0s',
18
+ speed: 'slow',
19
+ repeat: 'infinite'
20
+ },
21
+ events: []
22
+ }
@@ -0,0 +1,22 @@
1
+ import { EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const svg_hospital: IConfigItem = {
5
+ name: 'hospital',
6
+ title: '医院',
7
+ type: EDoneJsonType.File,
8
+ display: true,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ props: {},
15
+ common_animations: {
16
+ val: '',
17
+ delay: 'delay-0s',
18
+ speed: 'slow',
19
+ repeat: 'infinite'
20
+ },
21
+ events: []
22
+ }
@@ -0,0 +1,22 @@
1
+ import { EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const svg_house: IConfigItem = {
5
+ name: 'house',
6
+ title: '房子',
7
+ type: EDoneJsonType.File,
8
+ display: true,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ props: {},
15
+ common_animations: {
16
+ val: '',
17
+ delay: 'delay-0s',
18
+ speed: 'slow',
19
+ repeat: 'infinite'
20
+ },
21
+ events: []
22
+ }
@@ -0,0 +1,30 @@
1
+ import type { IConfigComponentGroup } from '@/config/types'
2
+ import { alternator_svg_file } from './alternator'
3
+ import { traction_transformer_svg_file } from './traction-transformer'
4
+ import { svg_house } from './house'
5
+ import { svg_car } from './car'
6
+ import { svg_hospital } from './hospital'
7
+ import { svg_package } from './package'
8
+ import { svg_bot_2 } from './bot-2'
9
+ import { svg_bot_3 } from './bot-3'
10
+ import { svg_bot_7 } from './bot-7'
11
+ import { svg_bot_9 } from './bot-9'
12
+ import { svg_bot_12 } from './bot-12'
13
+
14
+ export const stateless_group: IConfigComponentGroup = {
15
+ groupType: 'stateless',
16
+ title: '静态图标',
17
+ list: [
18
+ alternator_svg_file,
19
+ traction_transformer_svg_file,
20
+ svg_house,
21
+ svg_car,
22
+ svg_hospital,
23
+ svg_package,
24
+ svg_bot_2,
25
+ svg_bot_3,
26
+ svg_bot_7,
27
+ svg_bot_9,
28
+ svg_bot_12
29
+ ]
30
+ }
@@ -0,0 +1,22 @@
1
+ import { EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const svg_package: IConfigItem = {
5
+ name: 'package',
6
+ title: '组装线',
7
+ type: EDoneJsonType.File,
8
+ display: true,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ props: {},
15
+ common_animations: {
16
+ val: '',
17
+ delay: 'delay-0s',
18
+ speed: 'slow',
19
+ repeat: 'infinite'
20
+ },
21
+ events: []
22
+ }
@@ -0,0 +1,28 @@
1
+ import { EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const traction_transformer_svg_file: IConfigItem = {
5
+ name: 'traction-transformer',
6
+ title: '牵引变',
7
+ type: EDoneJsonType.File,
8
+ config: {
9
+ can_zoom: true,
10
+ have_anchor: true,
11
+ actual_rect: true
12
+ },
13
+ display: true,
14
+ props: {
15
+ fill: {
16
+ title: '填充色',
17
+ type: EConfigItemPropsType.Color,
18
+ val: '#ff0000'
19
+ }
20
+ },
21
+ common_animations: {
22
+ val: '',
23
+ delay: 'delay-0s',
24
+ speed: 'slow',
25
+ repeat: 'infinite'
26
+ },
27
+ events: []
28
+ }
@@ -0,0 +1,126 @@
1
+ /**
2
+ * 组件分组数据格式
3
+ * @property {string} groupType 组件分组类型
4
+ * @property {string} title 组件分组标题
5
+ * @property {Array} list 分组包含的组件项列表
6
+ * @export
7
+ * @interface IConfigComponentGroup
8
+ */
9
+ export interface IConfigComponentGroup {
10
+ groupType: string
11
+ title: string
12
+ list: Array<IConfigItem>
13
+ }
14
+
15
+ export type IConfig = IConfigComponentGroup[]
16
+
17
+ export interface IConfigItem {
18
+ name: string
19
+ title: string
20
+ display: boolean
21
+ props: IConfigItemProps
22
+ type: EDoneJsonType
23
+ config: IDoneJsonConfig
24
+ common_animations?: IAnimations
25
+ animations?: IConfigItemProps //自定义动画效果
26
+ tag?: any
27
+ state?: IConfigItemState //通过一个属性去控制多个属性就是有状态组件
28
+ tag_slot?: string
29
+ events: Array<IEventsItem>
30
+ }
31
+
32
+ export interface IAnimations {
33
+ val: string
34
+ delay: string
35
+ speed: string
36
+ repeat: string
37
+ }
38
+
39
+ export interface IConfigItemProps {
40
+ [key: string]: {
41
+ title: string
42
+ type: EConfigItemPropsType
43
+ val: any
44
+ options?: any
45
+ disabled?: boolean
46
+ }
47
+ }
48
+
49
+ export enum EConfigAnimationsType {
50
+ None = 'None',
51
+ Electricity = 'Electricity', //电流效果
52
+ WaterDrop = 'WaterDrop', //水珠
53
+ Track = 'Track' //轨迹
54
+ }
55
+
56
+ export enum EConfigItemPropsType {
57
+ Input = 'Input',
58
+ Color = 'Color',
59
+ InputNumber = 'InputNumber',
60
+ Switch = 'Switch', //此类型option默认索引0为关闭
61
+ JsonEdit = 'JsonEdit',
62
+ Select = 'Select'
63
+ }
64
+
65
+ export enum EDoneJsonType {
66
+ File = 'File',
67
+ StraightLine = 'StraightLine',
68
+ ConnectionLine = 'ConnectionLine',
69
+ CustomSvg = 'CustomSvg',
70
+ Vue = 'Vue'
71
+ }
72
+
73
+ interface IDoneJsonConfig {
74
+ can_zoom: boolean
75
+ have_anchor: boolean
76
+ actual_rect: boolean
77
+ }
78
+
79
+ export interface IConfigItemState {
80
+ OnOff?: {
81
+ title: string
82
+ default: false
83
+ props: { [key: string]: { openVal: any; closeVal: any } }
84
+ }
85
+ }
86
+
87
+ export enum EEventType {
88
+ Click = 'Click',
89
+ Change = 'Change',
90
+ Null = ''
91
+ }
92
+
93
+ export enum EEventAction {
94
+ ChangeAttr = 'ChangeAttr',
95
+ JavaScript = 'JavaScript',
96
+ Null = ''
97
+ }
98
+
99
+ export enum EConditionType {
100
+ None = 'None',
101
+ Relation = 'Relation'
102
+ }
103
+
104
+ export interface IAttrItem {
105
+ key: string
106
+ val: string
107
+ }
108
+
109
+ export interface ICondition {
110
+ type: EConditionType
111
+ Relation?: {
112
+ key: string
113
+ relation: string
114
+ val: string
115
+ val2?: string
116
+ }
117
+ }
118
+
119
+ export interface IEventsItem {
120
+ type: EEventType
121
+ action: EEventAction
122
+ target: string
123
+ attrs?: IAttrItem[]
124
+ scripts: string
125
+ condition?: ICondition
126
+ }
@@ -0,0 +1,57 @@
1
+ import { EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const el_button: IConfigItem = {
5
+ name: 'el-button',
6
+ tag: 'el-button',
7
+ title: '按钮',
8
+ type: EDoneJsonType.Vue,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ display: true,
15
+ props: {
16
+ size: {
17
+ title: '尺寸',
18
+ type: EConfigItemPropsType.Select,
19
+ val: 'default',
20
+ options: [
21
+ { label: '大', value: 'large' },
22
+ { label: '默认', value: 'default' },
23
+ { label: '小', value: 'small' }
24
+ ]
25
+ },
26
+ type: {
27
+ title: '类型',
28
+ type: EConfigItemPropsType.Select,
29
+ val: 'primary',
30
+ options: [
31
+ { label: '主要按钮', value: 'primary' },
32
+ { label: '成功按钮', value: 'success' },
33
+ { label: '警告按钮', value: 'warning' },
34
+ { label: '危险按钮', value: 'danger' },
35
+ { label: '信息按钮', value: 'info' }
36
+ ]
37
+ },
38
+ plain: {
39
+ title: '朴素按钮',
40
+ type: EConfigItemPropsType.Switch,
41
+ val: false
42
+ },
43
+ text: {
44
+ title: '文字按钮',
45
+ type: EConfigItemPropsType.Switch,
46
+ val: false
47
+ }
48
+ },
49
+ tag_slot: '按钮',
50
+ common_animations: {
51
+ val: '',
52
+ delay: 'delay-0s',
53
+ speed: 'slow',
54
+ repeat: 'infinite'
55
+ },
56
+ events: []
57
+ }
@@ -0,0 +1,124 @@
1
+ import { EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const common_table: IConfigItem = {
5
+ name: 'common-table',
6
+ title: '通用表格',
7
+ tag: 'common-table',
8
+ type: EDoneJsonType.Vue,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ display: true,
15
+ props: {
16
+ 'col-config': {
17
+ title: '列配置',
18
+ type: EConfigItemPropsType.JsonEdit,
19
+ val: [
20
+ {
21
+ prop: 'date',
22
+ label: '第一列',
23
+ width: '120px',
24
+ fixed: false,
25
+ sortable: false,
26
+ 'show-overflow-tooltip': false
27
+ },
28
+ {
29
+ prop: 'name',
30
+ label: '第二列',
31
+ width: '120px',
32
+ fixed: false,
33
+ sortable: false,
34
+ 'show-overflow-tooltip': false
35
+ },
36
+ {
37
+ prop: 'address',
38
+ label: '第三列测试',
39
+ width: '280px',
40
+ fixed: false,
41
+ sortable: false,
42
+ 'show-overflow-tooltip': false
43
+ }
44
+ ]
45
+ },
46
+ data: {
47
+ title: '表格数据',
48
+ type: EConfigItemPropsType.JsonEdit,
49
+ val: [
50
+ {
51
+ date: '2016-05-03',
52
+ name: 'Tom',
53
+ address: 'No. 189, Grove St, Los Angeles'
54
+ },
55
+ {
56
+ date: '2016-05-02',
57
+ name: 'Tom',
58
+ address: 'No. 189, Grove St, Los Angeles'
59
+ },
60
+ {
61
+ date: '2016-05-04',
62
+ name: 'Tom',
63
+ address: 'No. 189, Grove St, Los Angeles'
64
+ },
65
+ {
66
+ date: '2016-05-01',
67
+ name: 'Tom',
68
+ address: 'No. 189, Grove St, Los Angeles'
69
+ }
70
+ ]
71
+ },
72
+ height: {
73
+ title: '高度',
74
+ type: EConfigItemPropsType.InputNumber,
75
+ val: null
76
+ },
77
+ 'max-height': {
78
+ title: '最大高度',
79
+ type: EConfigItemPropsType.InputNumber,
80
+ val: null
81
+ },
82
+ stripe: {
83
+ title: '斑马纹',
84
+ type: EConfigItemPropsType.Switch,
85
+ val: false
86
+ },
87
+ border: {
88
+ title: '纵向边框',
89
+ type: EConfigItemPropsType.Switch,
90
+ val: false
91
+ },
92
+ size: {
93
+ title: '尺寸',
94
+ type: EConfigItemPropsType.Select,
95
+ val: 'default',
96
+ options: [
97
+ {
98
+ label: '大',
99
+ value: 'large'
100
+ },
101
+ {
102
+ label: '默认',
103
+ value: 'default'
104
+ },
105
+ {
106
+ label: '小',
107
+ value: 'small'
108
+ }
109
+ ]
110
+ },
111
+ fit: {
112
+ title: '列宽自撑开',
113
+ type: EConfigItemPropsType.Switch,
114
+ val: false
115
+ }
116
+ },
117
+ common_animations: {
118
+ val: '',
119
+ delay: 'delay-0s',
120
+ speed: 'slow',
121
+ repeat: 'infinite'
122
+ },
123
+ events: []
124
+ }
@@ -0,0 +1,13 @@
1
+ import type { IConfigComponentGroup } from '@/config/types'
2
+
3
+ import { el_button } from './button'
4
+ import { common_table } from './common-table'
5
+ import { now_time } from './now-time'
6
+ import { el_tag } from './tag'
7
+ import { progress_a } from './progress'
8
+
9
+ export const components: IConfigComponentGroup = {
10
+ groupType: 'custom-vue',
11
+ title: 'VUE组件',
12
+ list: [el_button, progress_a, common_table, now_time, el_tag]
13
+ }
@@ -0,0 +1,29 @@
1
+ import { EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const now_time: IConfigItem = {
5
+ name: 'now-time',
6
+ title: '当前时间',
7
+ tag: 'now-time',
8
+ type: EDoneJsonType.Vue,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: false,
12
+ actual_rect: true
13
+ },
14
+ display: true,
15
+ props: {
16
+ fontColor: {
17
+ title: '文字颜色',
18
+ type: EConfigItemPropsType.Color,
19
+ val: '#000000'
20
+ }
21
+ },
22
+ common_animations: {
23
+ val: '',
24
+ delay: 'delay-0s',
25
+ speed: 'slow',
26
+ repeat: 'infinite'
27
+ },
28
+ events: []
29
+ }
@@ -0,0 +1,29 @@
1
+ import { EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const progress_a: IConfigItem = {
5
+ name: 'progress-a',
6
+ tag: 'progress-a',
7
+ title: '进度条',
8
+ type: EDoneJsonType.Vue,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ display: true,
15
+ props: {
16
+ percentage: {
17
+ title: '进度',
18
+ type: EConfigItemPropsType.InputNumber,
19
+ val: 10
20
+ }
21
+ },
22
+ common_animations: {
23
+ val: '',
24
+ delay: 'delay-0s',
25
+ speed: 'slow',
26
+ repeat: 'infinite'
27
+ },
28
+ events: []
29
+ }
@@ -0,0 +1,46 @@
1
+ import { EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const el_tag: IConfigItem = {
5
+ name: 'el-tag',
6
+ tag: 'el-tag',
7
+ title: '标签',
8
+ type: EDoneJsonType.Vue,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ display: true,
15
+ props: {
16
+ type: {
17
+ title: '类型',
18
+ type: EConfigItemPropsType.Select,
19
+ val: 'success',
20
+ options: [
21
+ { label: '成功', value: 'success' },
22
+ { label: '警告', value: 'warning' },
23
+ { label: '危险', value: 'danger' },
24
+ { label: '信息', value: 'info' }
25
+ ]
26
+ },
27
+ closable: {
28
+ title: '可关闭',
29
+ type: EConfigItemPropsType.Switch,
30
+ val: true
31
+ },
32
+ 'disable-transitions': {
33
+ title: '渐变',
34
+ type: EConfigItemPropsType.Switch,
35
+ val: false
36
+ }
37
+ },
38
+ tag_slot: '标签',
39
+ common_animations: {
40
+ val: '',
41
+ delay: 'delay-0s',
42
+ speed: 'slow',
43
+ repeat: 'infinite'
44
+ },
45
+ events: []
46
+ }
@@ -0,0 +1,8 @@
1
+ import type { IConfigComponentGroup } from '@/config/types'
2
+ import { pie_charts } from './pie-charts'
3
+
4
+ export const echarts_group: IConfigComponentGroup = {
5
+ groupType: 'echarts',
6
+ title: '图表',
7
+ list: [pie_charts]
8
+ }
@@ -0,0 +1,60 @@
1
+ import { EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { IConfigItem } from '@/config/types'
3
+
4
+ export const pie_charts: IConfigItem = {
5
+ name: 'pie-charts',
6
+ tag: 'pie-charts',
7
+ title: '饼图',
8
+ type: EDoneJsonType.Vue,
9
+ config: {
10
+ can_zoom: true,
11
+ have_anchor: true,
12
+ actual_rect: true
13
+ },
14
+ display: true,
15
+ props: {
16
+ title: {
17
+ title: '标题',
18
+ type: EConfigItemPropsType.Input,
19
+ val: '默认标题'
20
+ },
21
+ seriesName: {
22
+ title: '详情',
23
+ type: EConfigItemPropsType.Input,
24
+ val: '详情标题'
25
+ },
26
+ seriesData: {
27
+ title: 'legendData',
28
+ type: EConfigItemPropsType.JsonEdit,
29
+ val: [
30
+ {
31
+ value: 1048,
32
+ name: '办公楼A'
33
+ },
34
+ {
35
+ value: 735,
36
+ name: '办公楼B'
37
+ },
38
+ {
39
+ value: 580,
40
+ name: '保安室'
41
+ },
42
+ {
43
+ value: 484,
44
+ name: '地下车库'
45
+ },
46
+ {
47
+ value: 300,
48
+ name: '食堂'
49
+ }
50
+ ]
51
+ }
52
+ },
53
+ common_animations: {
54
+ val: '',
55
+ delay: 'delay-0s',
56
+ speed: 'slow',
57
+ repeat: 'infinite'
58
+ },
59
+ events: []
60
+ }
@@ -0,0 +1,5 @@
1
+ import type { IConfigComponentGroup } from '../types'
2
+ import { components } from './component'
3
+ import { echarts_group } from './echarts'
4
+
5
+ export const vue_config: IConfigComponentGroup[] = Object.seal([components, echarts_group])