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.
- package/.prettierrc.json +8 -0
- package/README.md +61 -0
- package/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/runtime/index.d.ts +3 -0
- package/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +24 -0
- package/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +35 -0
- package/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +26 -0
- package/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
- package/lib/components/runtime/views/assemblys/object-render.vue.d.ts +17 -0
- package/lib/components/runtime/views/super-page.vue.d.ts +91 -0
- package/lib/components/super-page-dialog/index.d.ts +3 -0
- package/lib/components/super-page-dialog/super-page-dialog.vue.d.ts +36 -0
- package/lib/components/wf-editor/index.d.ts +3 -0
- package/lib/components/wf-editor/wf-editor.vue.d.ts +2 -0
- package/lib/favicon.ico +0 -0
- package/lib/index.js +8 -0
- package/lib/runtime/index.js +3 -0
- package/lib/runtime/utils/assemblys-config.js +258 -0
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue2.js +54 -0
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +35 -0
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +110 -0
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +53 -0
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +42 -0
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +50 -0
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +50 -0
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +51 -0
- package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue.js +141 -0
- package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue.js +127 -0
- package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/common/task-informition-dialog.vue.js +104 -0
- package/lib/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/container/card/card-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/card/card-runtime.vue2.js +72 -0
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +73 -0
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue2.js +78 -0
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +42 -0
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue2.js +43 -0
- package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +29 -0
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +68 -0
- package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +74 -0
- package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue.js +640 -0
- package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
- package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +452 -0
- package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
- package/lib/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/data/table/table-runtime.vue2.js +82 -0
- package/lib/runtime/views/assemblys/error-render.vue.js +22 -0
- package/lib/runtime/views/assemblys/error-render.vue2.js +3 -0
- package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +156 -0
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +82 -0
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +59 -0
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +40 -0
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +74 -0
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +127 -0
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue2.js +133 -0
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue2.js +77 -0
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +29 -0
- package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +157 -0
- package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +174 -0
- package/lib/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/select/select-runtime.vue2.js +201 -0
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +65 -0
- package/lib/runtime/views/assemblys/object-render.vue.js +142 -0
- package/lib/runtime/views/assemblys/object-render.vue2.js +3 -0
- package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +61 -0
- package/lib/runtime/views/super-page.vue.js +479 -0
- package/lib/runtime/views/super-page.vue2.js +3 -0
- package/lib/src/assets/chart-themes/theme1.js +7 -0
- package/lib/src/assets/chart-themes/theme2.js +7 -0
- package/lib/src/assets/chart-themes/theme3.js +7 -0
- package/lib/src/utils/api/api-util.d.ts +11 -0
- package/lib/src/utils/api/api-util.js +128 -0
- package/lib/src/utils/charts/chart-util.js +15 -0
- package/lib/src/utils/common-util.d.ts +11 -0
- package/lib/src/utils/common-util.js +81 -0
- package/lib/src/utils/events/event-util.d.ts +48 -0
- package/lib/src/utils/events/event-util.js +525 -0
- package/lib/src/utils/events/standard-event.d.ts +61 -0
- package/lib/src/utils/events/standard-event.js +1623 -0
- package/lib/src/utils/events/validator-util.d.ts +4 -0
- package/lib/src/utils/events/validator-util.js +389 -0
- package/lib/src/utils/global-refs.d.ts +59 -0
- package/lib/src/utils/global-refs.js +65 -0
- package/lib/src/utils/interfaces/page-design-types.d.ts +221 -0
- package/lib/src/utils/interfaces/page-design-types.js +9 -0
- package/lib/src/utils/page-helper-util.d.ts +87 -0
- package/lib/src/utils/page-helper-util.js +503 -0
- package/lib/src/utils/page-init-util.d.ts +38 -0
- package/lib/src/utils/page-init-util.js +200 -0
- package/lib/src/utils/store-util.d.ts +15 -0
- package/lib/src/utils/store-util.js +17 -0
- package/lib/src/utils/store.d.ts +2 -0
- package/lib/src/utils/store.js +3 -0
- package/lib/src/utils/table-utils.js +23 -0
- package/lib/super-page-dialog/index.js +3 -0
- package/lib/super-page-dialog/super-page-dialog.vue.js +73 -0
- package/lib/super-page-dialog/super-page-dialog.vue2.js +3 -0
- package/lib/wf-editor/index.js +3 -0
- package/lib/wf-editor/wf-editor.css +4 -0
- package/lib/wf-editor/wf-editor.vue.js +15 -0
- package/package-ws.json +70 -0
- package/package.json +67 -0
- package/src/assets/base.css +86 -0
- package/src/assets/chart-themes/theme1.ts +6 -0
- package/src/assets/chart-themes/theme2.ts +6 -0
- package/src/assets/chart-themes/theme3.ts +6 -0
- package/src/assets/images/button/button-group.png +0 -0
- package/src/assets/images/button/button.png +0 -0
- package/src/assets/images/chart/chart-column.png +0 -0
- package/src/assets/images/chart/chart-gauge.png +0 -0
- package/src/assets/images/chart/chart-pie.png +0 -0
- package/src/assets/images/chart/chart-radar.png +0 -0
- package/src/assets/images/chart/chart-scatter.png +0 -0
- package/src/assets/images/container/container-card.png +0 -0
- package/src/assets/images/container/container-collapse.png +0 -0
- package/src/assets/images/container/container-container.png +0 -0
- package/src/assets/images/container/container-flex.png +0 -0
- package/src/assets/images/container/container-form.png +0 -0
- package/src/assets/images/container/container-iframe.png +0 -0
- package/src/assets/images/container/container-normal.png +0 -0
- package/src/assets/images/container/container-tabs.png +0 -0
- package/src/assets/images/container/container-tools.png +0 -0
- package/src/assets/images/data/data-process.png +0 -0
- package/src/assets/images/data/data-step.png +0 -0
- package/src/assets/images/data/data-table-column.png +0 -0
- package/src/assets/images/data/data-table.png +0 -0
- package/src/assets/images/data/data-timeline.png +0 -0
- package/src/assets/images/data/data-tree.png +0 -0
- package/src/assets/images/form/form-cascader.png +0 -0
- package/src/assets/images/form/form-check.png +0 -0
- package/src/assets/images/form/form-color.png +0 -0
- package/src/assets/images/form/form-count.png +0 -0
- package/src/assets/images/form/form-custom.png +0 -0
- package/src/assets/images/form/form-date.png +0 -0
- package/src/assets/images/form/form-dept.png +0 -0
- package/src/assets/images/form/form-divider.png +0 -0
- package/src/assets/images/form/form-file.png +0 -0
- package/src/assets/images/form/form-image-upload.png +0 -0
- package/src/assets/images/form/form-img.png +0 -0
- package/src/assets/images/form/form-input.png +0 -0
- package/src/assets/images/form/form-label.png +0 -0
- package/src/assets/images/form/form-link.png +0 -0
- package/src/assets/images/form/form-radio.png +0 -0
- package/src/assets/images/form/form-scan.png +0 -0
- package/src/assets/images/form/form-score.png +0 -0
- package/src/assets/images/form/form-select.png +0 -0
- package/src/assets/images/form/form-slider.png +0 -0
- package/src/assets/images/form/form-space.png +0 -0
- package/src/assets/images/form/form-switch.png +0 -0
- package/src/assets/images/form/form-text.png +0 -0
- package/src/assets/images/form/form-textarea.png +0 -0
- package/src/assets/images/form/form-transfer.png +0 -0
- package/src/assets/images/form/form-zoom.png +0 -0
- package/src/assets/images/group-button.png +0 -0
- package/src/assets/images/group-chart.png +0 -0
- package/src/assets/images/group-container.png +0 -0
- package/src/assets/images/group-data.png +0 -0
- package/src/assets/images/group-form.png +0 -0
- package/src/assets/images/group-workflow.png +0 -0
- package/src/assets/images/workflow/workflow-button.png +0 -0
- package/src/assets/images/workflow/workflow-history-texts.png +0 -0
- package/src/assets/images/workflow/workflow-history.png +0 -0
- package/src/assets/images/workflow/workflow-imagehistory.png +0 -0
- package/src/assets/images/workflow/workflow-texthistory .png +0 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/main.css +1 -0
- package/src/i18n/langs/cn.js +52 -0
- package/src/i18n/langs/en.js +52 -0
- package/src/stores/counter.ts +12 -0
- package/src/utils/api/api-util.ts +176 -0
- package/src/utils/charts/chart-util.ts +41 -0
- package/src/utils/common-util.ts +96 -0
- package/src/utils/container-style-util.ts +237 -0
- package/src/utils/eventBus.ts +14 -0
- package/src/utils/events/event-util.ts +790 -0
- package/src/utils/events/jump-page-util.ts +0 -0
- package/src/utils/events/standard-event.ts +2075 -0
- package/src/utils/events/validator-util.ts +474 -0
- package/src/utils/global-refs.ts +160 -0
- package/src/utils/interfaces/page-design-types.ts +259 -0
- package/src/utils/page-helper-util.ts +850 -0
- package/src/utils/page-init-util.ts +291 -0
- package/src/utils/page-permission-util.ts +521 -0
- package/src/utils/store-util.ts +41 -0
- package/src/utils/store.ts +3 -0
- 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
|
+
}
|