super-page-runtime 0.0.1-tmp2

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 (222) hide show
  1. package/.prettierrc.json +8 -0
  2. package/README.md +61 -0
  3. package/lib/_virtual/_plugin-vue_export-helper.js +9 -0
  4. package/lib/components/index.d.ts +5 -0
  5. package/lib/components/runtime/index.d.ts +3 -0
  6. package/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +24 -0
  7. package/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +35 -0
  8. package/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +26 -0
  9. package/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
  10. package/lib/components/runtime/views/assemblys/object-render.vue.d.ts +17 -0
  11. package/lib/components/runtime/views/super-page.vue.d.ts +91 -0
  12. package/lib/components/super-page-dialog/index.d.ts +3 -0
  13. package/lib/components/super-page-dialog/super-page-dialog.vue.d.ts +36 -0
  14. package/lib/components/wf-editor/index.d.ts +3 -0
  15. package/lib/components/wf-editor/wf-editor.vue.d.ts +2 -0
  16. package/lib/favicon.ico +0 -0
  17. package/lib/index.js +8 -0
  18. package/lib/runtime/index.js +3 -0
  19. package/lib/runtime/utils/assemblys-config.js +258 -0
  20. package/lib/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
  21. package/lib/runtime/views/assemblys/button/button/button-runtime.vue2.js +54 -0
  22. package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +3 -0
  23. package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +35 -0
  24. package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
  25. package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +110 -0
  26. package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +3 -0
  27. package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +53 -0
  28. package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +3 -0
  29. package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +42 -0
  30. package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +3 -0
  31. package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +50 -0
  32. package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +3 -0
  33. package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +50 -0
  34. package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +3 -0
  35. package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +51 -0
  36. package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue.js +141 -0
  37. package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
  38. package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue.js +127 -0
  39. package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
  40. package/lib/runtime/views/assemblys/common/task-informition-dialog.vue.js +104 -0
  41. package/lib/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
  42. package/lib/runtime/views/assemblys/container/card/card-runtime.vue.js +3 -0
  43. package/lib/runtime/views/assemblys/container/card/card-runtime.vue2.js +72 -0
  44. package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
  45. package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +73 -0
  46. package/lib/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
  47. package/lib/runtime/views/assemblys/container/container/container-runtime.vue2.js +78 -0
  48. package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
  49. package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +42 -0
  50. package/lib/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
  51. package/lib/runtime/views/assemblys/container/form/form-runtime.vue2.js +43 -0
  52. package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
  53. package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +29 -0
  54. package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +3 -0
  55. package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +68 -0
  56. package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue.js +3 -0
  57. package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +74 -0
  58. package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue.js +640 -0
  59. package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
  60. package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +452 -0
  61. package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
  62. package/lib/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
  63. package/lib/runtime/views/assemblys/data/table/table-runtime.vue2.js +82 -0
  64. package/lib/runtime/views/assemblys/error-render.vue.js +22 -0
  65. package/lib/runtime/views/assemblys/error-render.vue2.js +3 -0
  66. package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
  67. package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +156 -0
  68. package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
  69. package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +82 -0
  70. package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
  71. package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +59 -0
  72. package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
  73. package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +40 -0
  74. package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
  75. package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +74 -0
  76. package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
  77. package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +63 -0
  78. package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
  79. package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +127 -0
  80. package/lib/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
  81. package/lib/runtime/views/assemblys/form/label/label-runtime.vue2.js +133 -0
  82. package/lib/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
  83. package/lib/runtime/views/assemblys/form/link/link-runtime.vue2.js +77 -0
  84. package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +3 -0
  85. package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +29 -0
  86. package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
  87. package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +157 -0
  88. package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +3 -0
  89. package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +174 -0
  90. package/lib/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
  91. package/lib/runtime/views/assemblys/form/select/select-runtime.vue2.js +201 -0
  92. package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
  93. package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +63 -0
  94. package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
  95. package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +63 -0
  96. package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
  97. package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +65 -0
  98. package/lib/runtime/views/assemblys/object-render.vue.js +142 -0
  99. package/lib/runtime/views/assemblys/object-render.vue2.js +3 -0
  100. package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +3 -0
  101. package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +61 -0
  102. package/lib/runtime/views/super-page.vue.js +479 -0
  103. package/lib/runtime/views/super-page.vue2.js +3 -0
  104. package/lib/src/assets/chart-themes/theme1.js +7 -0
  105. package/lib/src/assets/chart-themes/theme2.js +7 -0
  106. package/lib/src/assets/chart-themes/theme3.js +7 -0
  107. package/lib/src/utils/api/api-util.d.ts +11 -0
  108. package/lib/src/utils/api/api-util.js +128 -0
  109. package/lib/src/utils/charts/chart-util.js +15 -0
  110. package/lib/src/utils/common-util.d.ts +11 -0
  111. package/lib/src/utils/common-util.js +81 -0
  112. package/lib/src/utils/events/event-util.d.ts +48 -0
  113. package/lib/src/utils/events/event-util.js +525 -0
  114. package/lib/src/utils/events/standard-event.d.ts +61 -0
  115. package/lib/src/utils/events/standard-event.js +1623 -0
  116. package/lib/src/utils/events/validator-util.d.ts +4 -0
  117. package/lib/src/utils/events/validator-util.js +389 -0
  118. package/lib/src/utils/global-refs.d.ts +59 -0
  119. package/lib/src/utils/global-refs.js +65 -0
  120. package/lib/src/utils/interfaces/page-design-types.d.ts +221 -0
  121. package/lib/src/utils/interfaces/page-design-types.js +9 -0
  122. package/lib/src/utils/page-helper-util.d.ts +87 -0
  123. package/lib/src/utils/page-helper-util.js +503 -0
  124. package/lib/src/utils/page-init-util.d.ts +38 -0
  125. package/lib/src/utils/page-init-util.js +200 -0
  126. package/lib/src/utils/store-util.d.ts +15 -0
  127. package/lib/src/utils/store-util.js +17 -0
  128. package/lib/src/utils/store.d.ts +2 -0
  129. package/lib/src/utils/store.js +3 -0
  130. package/lib/src/utils/table-utils.js +23 -0
  131. package/lib/super-page-dialog/index.js +3 -0
  132. package/lib/super-page-dialog/super-page-dialog.vue.js +73 -0
  133. package/lib/super-page-dialog/super-page-dialog.vue2.js +3 -0
  134. package/lib/wf-editor/index.js +3 -0
  135. package/lib/wf-editor/wf-editor.css +4 -0
  136. package/lib/wf-editor/wf-editor.vue.js +15 -0
  137. package/package-ws.json +70 -0
  138. package/package.json +67 -0
  139. package/src/assets/base.css +86 -0
  140. package/src/assets/chart-themes/theme1.ts +6 -0
  141. package/src/assets/chart-themes/theme2.ts +6 -0
  142. package/src/assets/chart-themes/theme3.ts +6 -0
  143. package/src/assets/images/button/button-group.png +0 -0
  144. package/src/assets/images/button/button.png +0 -0
  145. package/src/assets/images/chart/chart-column.png +0 -0
  146. package/src/assets/images/chart/chart-gauge.png +0 -0
  147. package/src/assets/images/chart/chart-pie.png +0 -0
  148. package/src/assets/images/chart/chart-radar.png +0 -0
  149. package/src/assets/images/chart/chart-scatter.png +0 -0
  150. package/src/assets/images/container/container-card.png +0 -0
  151. package/src/assets/images/container/container-collapse.png +0 -0
  152. package/src/assets/images/container/container-container.png +0 -0
  153. package/src/assets/images/container/container-flex.png +0 -0
  154. package/src/assets/images/container/container-form.png +0 -0
  155. package/src/assets/images/container/container-iframe.png +0 -0
  156. package/src/assets/images/container/container-normal.png +0 -0
  157. package/src/assets/images/container/container-tabs.png +0 -0
  158. package/src/assets/images/container/container-tools.png +0 -0
  159. package/src/assets/images/data/data-process.png +0 -0
  160. package/src/assets/images/data/data-step.png +0 -0
  161. package/src/assets/images/data/data-table-column.png +0 -0
  162. package/src/assets/images/data/data-table.png +0 -0
  163. package/src/assets/images/data/data-timeline.png +0 -0
  164. package/src/assets/images/data/data-tree.png +0 -0
  165. package/src/assets/images/form/form-cascader.png +0 -0
  166. package/src/assets/images/form/form-check.png +0 -0
  167. package/src/assets/images/form/form-color.png +0 -0
  168. package/src/assets/images/form/form-count.png +0 -0
  169. package/src/assets/images/form/form-custom.png +0 -0
  170. package/src/assets/images/form/form-date.png +0 -0
  171. package/src/assets/images/form/form-dept.png +0 -0
  172. package/src/assets/images/form/form-divider.png +0 -0
  173. package/src/assets/images/form/form-file.png +0 -0
  174. package/src/assets/images/form/form-image-upload.png +0 -0
  175. package/src/assets/images/form/form-img.png +0 -0
  176. package/src/assets/images/form/form-input.png +0 -0
  177. package/src/assets/images/form/form-label.png +0 -0
  178. package/src/assets/images/form/form-link.png +0 -0
  179. package/src/assets/images/form/form-radio.png +0 -0
  180. package/src/assets/images/form/form-scan.png +0 -0
  181. package/src/assets/images/form/form-score.png +0 -0
  182. package/src/assets/images/form/form-select.png +0 -0
  183. package/src/assets/images/form/form-slider.png +0 -0
  184. package/src/assets/images/form/form-space.png +0 -0
  185. package/src/assets/images/form/form-switch.png +0 -0
  186. package/src/assets/images/form/form-text.png +0 -0
  187. package/src/assets/images/form/form-textarea.png +0 -0
  188. package/src/assets/images/form/form-transfer.png +0 -0
  189. package/src/assets/images/form/form-zoom.png +0 -0
  190. package/src/assets/images/group-button.png +0 -0
  191. package/src/assets/images/group-chart.png +0 -0
  192. package/src/assets/images/group-container.png +0 -0
  193. package/src/assets/images/group-data.png +0 -0
  194. package/src/assets/images/group-form.png +0 -0
  195. package/src/assets/images/group-workflow.png +0 -0
  196. package/src/assets/images/workflow/workflow-button.png +0 -0
  197. package/src/assets/images/workflow/workflow-history-texts.png +0 -0
  198. package/src/assets/images/workflow/workflow-history.png +0 -0
  199. package/src/assets/images/workflow/workflow-imagehistory.png +0 -0
  200. package/src/assets/images/workflow/workflow-texthistory .png +0 -0
  201. package/src/assets/logo.svg +1 -0
  202. package/src/assets/main.css +1 -0
  203. package/src/i18n/langs/cn.js +52 -0
  204. package/src/i18n/langs/en.js +52 -0
  205. package/src/stores/counter.ts +12 -0
  206. package/src/utils/api/api-util.ts +176 -0
  207. package/src/utils/charts/chart-util.ts +41 -0
  208. package/src/utils/common-util.ts +96 -0
  209. package/src/utils/container-style-util.ts +237 -0
  210. package/src/utils/eventBus.ts +14 -0
  211. package/src/utils/events/event-util.ts +790 -0
  212. package/src/utils/events/jump-page-util.ts +0 -0
  213. package/src/utils/events/standard-event.ts +2075 -0
  214. package/src/utils/events/validator-util.ts +474 -0
  215. package/src/utils/global-refs.ts +160 -0
  216. package/src/utils/interfaces/page-design-types.ts +259 -0
  217. package/src/utils/page-helper-util.ts +850 -0
  218. package/src/utils/page-init-util.ts +291 -0
  219. package/src/utils/page-permission-util.ts +521 -0
  220. package/src/utils/store-util.ts +41 -0
  221. package/src/utils/store.ts +3 -0
  222. package/src/utils/table-utils.ts +31 -0
@@ -0,0 +1,237 @@
1
+ import type { Component } from '../../../src/utils/interfaces/page-design-types'
2
+ /**
3
+ * 生成通用的样式和Class
4
+ */
5
+ export function caculateCommonStyle(
6
+ configure: Component,
7
+ commonStyle: any,
8
+ commonClass: any
9
+ ): void {
10
+ //清空设置
11
+ const tempStyle: any = {}
12
+ let tempClass = ''
13
+ const thisProps = configure.props ? configure.props : {}
14
+ const thisStyle = configure.style ? configure.style : {}
15
+ const thisSize = thisProps.size ? thisProps.size : {}
16
+ //宽度
17
+ //固定
18
+ //默认按100
19
+ if (thisSize.widthType == 'fix' && thisSize.fixWidth) {
20
+ tempStyle['width'] = thisSize.fixWidth
21
+ if (!tempStyle['width'].indexOf || tempStyle['width'].indexOf('px') == -1) {
22
+ tempStyle['width'] = tempStyle['width'] + 'px'
23
+ }
24
+ } else {
25
+ if (thisSize.flexSpan) {
26
+ tempClass += ' el-col-' + thisSize.flexSpan
27
+ } else {
28
+ tempClass += ' el-col-24'
29
+ }
30
+ }
31
+ //margin
32
+ //外边距 设计有套一层,在此设置外部的边距
33
+ if (thisStyle.marginTop) {
34
+ tempStyle['margin-top'] = thisStyle.marginTop + 'px'
35
+ }
36
+ if (thisStyle.marginRight) {
37
+ tempStyle['margin-right'] = thisStyle.marginRight + 'px'
38
+ }
39
+ if (thisStyle.marginBottom) {
40
+ tempStyle['margin-bottom'] = thisStyle.marginBottom + 'px'
41
+ }
42
+ if (thisStyle.marginLeft) {
43
+ tempStyle['margin-left'] = thisStyle.marginLeft + 'px'
44
+ }
45
+ //高度
46
+ if (thisSize.fixHeight) {
47
+ tempStyle['height'] = thisSize.fixHeight
48
+ if (!tempStyle['height'].indexOf || tempStyle['height'].indexOf('px') == -1) {
49
+ tempStyle['height'] = tempStyle['height'] + 'px'
50
+ }
51
+ }
52
+ //检查是否固定位置
53
+ const position = thisProps.position
54
+ //工具栏位置
55
+ if (position == 'top' || position == 'bottom') {
56
+ //position: -webkit-sticky
57
+ tempStyle['position'] = 'fixed !important'
58
+ tempStyle['z-index'] = '1'
59
+ //找展示容器的位置
60
+ //const contentObj = document.getElementsByClassName("amb-design-board");
61
+ const contentObj = [thisRef.value.parentNode]
62
+ if (contentObj && contentObj.length > 0) {
63
+ const contentRec = contentObj[0].getBoundingClientRect()
64
+ if (position == 'top') {
65
+ tempStyle['top'] = contentRec.top + 'px'
66
+ }
67
+ if (position == 'bottom') {
68
+ tempStyle['bottom'] = '10px'
69
+ }
70
+ }
71
+ //宽
72
+ const thisRec = thisRef.value.getBoundingClientRect()
73
+ tempStyle['width'] = thisRec.width + 'px'
74
+ } else if (thisStyle.position) {
75
+ //按定位设置
76
+ tempStyle['position'] = thisStyle.position
77
+ if (thisStyle.position != 'relative') {
78
+ //其余需要默认当前的宽度
79
+ if (!tempStyle['width']) {
80
+ const thisRec = thisRef.value.getBoundingClientRect()
81
+ tempStyle['width'] = thisRec.width + 'px'
82
+ }
83
+ if (thisStyle.left) {
84
+ tempStyle['left'] = thisStyle.left + 'px'
85
+ }
86
+ if (thisStyle.top) {
87
+ tempStyle['top'] = thisStyle.top + 'px'
88
+ }
89
+ }
90
+ }
91
+ commonStyle.value = tempStyle
92
+ commonClass.value = tempClass
93
+ }
94
+
95
+ /**
96
+ * 样式转换
97
+ * @param configure
98
+ * @param designStyle 动态样式名
99
+ * @param designClass 动态class
100
+ */
101
+ export function caculateComponentStyle(
102
+ configure: any,
103
+ designStyle: any,
104
+ designClass: any,
105
+ designHeaderStyle: any
106
+ ): void {
107
+ //清空设置
108
+ const tempStyle: any = {}
109
+ const tempHeaderStyle: any = {}
110
+ let tempClass = ''
111
+ //从默认值中获取
112
+ let defineStyle: any = {}
113
+ if (configure.default && configure.default.style) {
114
+ Object.assign(defineStyle, configure.default.style)
115
+ }
116
+ //设计内容覆盖
117
+ if (configure.style) {
118
+ for (let pro in configure.style) {
119
+ const proValue = configure.style[pro]
120
+ if (proValue != undefined && proValue != null && proValue != '') {
121
+ defineStyle[pro] = proValue
122
+ }
123
+ }
124
+ }
125
+
126
+ //加粗
127
+ if (defineStyle.fontWeight) {
128
+ tempStyle['font-weight'] = 'bold'
129
+ }
130
+ //倾斜
131
+ if (defineStyle.incline) {
132
+ tempStyle['font-style'] = 'italic'
133
+ }
134
+ //字号
135
+ if (defineStyle.fontSize) {
136
+ tempStyle['font-size'] = defineStyle.fontSize
137
+ }
138
+ //颜色
139
+ if (defineStyle.color) {
140
+ tempStyle['color'] = defineStyle.color
141
+ }
142
+ if (defineStyle.textAlign) {
143
+ tempStyle['text-align'] = defineStyle.textAlign
144
+ }
145
+ //背景颜色
146
+ if (defineStyle.backgroundColor) {
147
+ tempStyle['background-color'] = defineStyle.backgroundColor
148
+ }
149
+ //背景图片 待设置
150
+ //内边距
151
+ if (defineStyle.paddingTop) {
152
+ tempStyle['padding-top'] = defineStyle.paddingTop + 'px'
153
+ }
154
+ if (defineStyle.paddingRight) {
155
+ tempStyle['padding-right'] = defineStyle.paddingRight + 'px'
156
+ }
157
+ if (defineStyle.paddingBottom) {
158
+ tempStyle['padding-bottom'] = defineStyle.paddingBottom + 'px'
159
+ }
160
+ if (defineStyle.paddingLeft) {
161
+ tempStyle['padding-left'] = defineStyle.paddingLeft + 'px'
162
+ }
163
+ //线宽
164
+ if (defineStyle.borderWidth && defineStyle.borderColor) {
165
+ tempStyle['border'] =
166
+ defineStyle.borderWidth +
167
+ 'px ' +
168
+ (defineStyle.borderType ? defineStyle.borderType : 'solid') +
169
+ ' ' +
170
+ defineStyle.borderColor
171
+ //线框圆角
172
+ if (defineStyle.radius) {
173
+ tempStyle['border-radius'] = defineStyle.radius + 'px'
174
+ }
175
+ }
176
+
177
+ //阴影
178
+ if (defineStyle.shadowColor) {
179
+ let shadow = (defineStyle.shadowTop ? defineStyle.shadowTop : '0') + 'px '
180
+ shadow += (defineStyle.shadowRight ? defineStyle.shadowRight : '0') + 'px '
181
+ shadow += (defineStyle.shadowBottom ? defineStyle.shadowBottom : '0') + 'px '
182
+ shadow += (defineStyle.shadowLeft ? defineStyle.shadowLeft : '0') + 'px '
183
+ shadow += defineStyle.shadowColor
184
+ tempStyle['box-shadow'] = shadow
185
+ }
186
+
187
+ //自定义class
188
+ if (defineStyle.customClass) {
189
+ tempClass += ' ' + defineStyle.customClass.replace(/;/g, ' ')
190
+ }
191
+
192
+ //自定义样式
193
+ if (defineStyle.customStyle) {
194
+ const strs = defineStyle.customStyle.replace(/[\r\n]/g, '').split(';')
195
+ for (let index = 0; index < strs.length; index++) {
196
+ const ss = strs[index].split(':')
197
+ if (ss.length > 1 && ss[0] && ss[1]) {
198
+ if (!isNaN(ss[0])) {
199
+ continue
200
+ }
201
+ tempStyle[ss[0]] = ss[1]
202
+ }
203
+ }
204
+ }
205
+ //标题的样式
206
+ //加粗
207
+ if (defineStyle.headerFontWeight) {
208
+ tempHeaderStyle['font-weight'] = 'bold'
209
+ }
210
+ //倾斜
211
+ if (defineStyle.headerIncline) {
212
+ tempHeaderStyle['font-style'] = 'italic'
213
+ }
214
+ //字号
215
+ if (defineStyle.headerFontSize) {
216
+ tempHeaderStyle['font-size'] = defineStyle.headerFontSize
217
+ }
218
+ //颜色
219
+ if (defineStyle.headerColor) {
220
+ tempHeaderStyle['color'] = defineStyle.headerColor
221
+ }
222
+ if (defineStyle.headerTextAlign) {
223
+ tempHeaderStyle['text-align'] = defineStyle.headerTextAlign
224
+ } else {
225
+ tempHeaderStyle['text-align'] = 'left'
226
+ }
227
+ //背景颜色
228
+ if (defineStyle.headerBackgroundColor) {
229
+ tempHeaderStyle['background-color'] = defineStyle.headerBackgroundColor
230
+ }
231
+
232
+ designStyle.value = tempStyle
233
+ designClass.value = tempClass
234
+ if (designHeaderStyle) {
235
+ designHeaderStyle.value = tempHeaderStyle
236
+ }
237
+ }
@@ -0,0 +1,14 @@
1
+ import mitt from 'mitt'
2
+
3
+ const emitter = mitt()
4
+ interface eventBus {
5
+ $on: any
6
+ $emit: any
7
+ $off: any
8
+ }
9
+ const bus: eventBus = {
10
+ $on: emitter.on,
11
+ $emit: emitter.emit,
12
+ $off: emitter.off
13
+ }
14
+ export default bus