cloud-web-corejs 1.0.281 → 1.1.0-dev.11

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 (175) hide show
  1. package/package.json +6 -2
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +45 -3
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +248 -209
  6. package/src/components/baseTabs/mixins.js +181 -181
  7. package/src/components/bizTab/BizBillActions.vue +129 -0
  8. package/src/components/bizTab/BizTabListPage.vue +391 -0
  9. package/src/components/bizTab/README.md +378 -0
  10. package/src/components/bizTab/billTableUtil.js +48 -0
  11. package/src/components/bizTab/billValidators.js +136 -0
  12. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  13. package/src/components/bizTab/index.js +24 -0
  14. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  15. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  16. package/src/components/excelExport/mixins.js +3 -3
  17. package/src/components/excelImport/index.vue +156 -156
  18. package/src/components/jsonImport/index.vue +1 -1
  19. package/src/components/langImport/index.vue +1 -1
  20. package/src/components/mobile/statusTag/mixins.js +1 -61
  21. package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
  22. package/src/components/mobile/wf/content.vue +1705 -1556
  23. package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
  24. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  25. package/src/components/mobile/wf/selectUserDialog.vue +118 -0
  26. package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
  27. package/src/components/mobile/wf/urgingDialog.vue +26 -3
  28. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  29. package/src/components/obsUpload/index.vue +1 -1
  30. package/src/components/table/config.js +78 -78
  31. package/src/components/table/index.js +1276 -1276
  32. package/src/components/table/plugins/cell-area/index.js +1055 -0
  33. package/src/components/table/plugins/cell-area/index.scss +77 -0
  34. package/src/components/table/plugins/cell-area/util.js +224 -0
  35. package/src/components/table/tableForm.vue +330 -330
  36. package/src/components/table/tableFormMixin.js +318 -318
  37. package/src/components/table/vxeFilter/index.js +163 -163
  38. package/src/components/table/vxeFilter/mixin.js +316 -316
  39. package/src/components/wf/content.vue +1188 -1188
  40. package/src/components/wf/wf.js +40 -20
  41. package/src/components/wf/wfActionDropdown.vue +1 -1
  42. package/src/components/wf/wfActionItems.js +1 -1
  43. package/src/components/xform/form-designer/designer.js +51 -52
  44. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  45. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
  46. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  47. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  48. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
  49. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
  50. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  51. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  52. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  53. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  54. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  55. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  56. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  57. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  58. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  59. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  60. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  61. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  62. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  63. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  64. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  65. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  66. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
  67. package/src/components/xform/form-designer/indexMixin.js +35 -1
  68. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  69. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  70. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  71. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  72. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  73. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  74. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
  75. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  76. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  77. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  78. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  79. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  80. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  81. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  82. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  83. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  84. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  85. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  86. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  87. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  88. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  89. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  90. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
  91. package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
  92. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
  93. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  94. package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
  95. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
  96. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  97. package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
  98. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  99. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  100. package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
  101. package/src/components/xform/form-render/index.vue +153 -147
  102. package/src/components/xform/form-render/indexMixin.js +35 -3
  103. package/src/components/xform/lang/en-US.js +14 -0
  104. package/src/components/xform/lang/zh-CN.js +17 -0
  105. package/src/components/xform/mixins/defaultHandle.js +707 -707
  106. package/src/components/xform/styles/h5.scss +2262 -0
  107. package/src/components/xform/utils/textMaskUtil.js +182 -179
  108. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  109. package/src/components/xform/utils/util.js +56 -11
  110. package/src/directive/append-to-body/index.js +48 -0
  111. package/src/index.js +13 -4
  112. package/src/layout/components/Sidebar/default.vue +1655 -1655
  113. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  114. package/src/router/index.js +48 -27
  115. package/src/router/modules/customer.js +71 -14
  116. package/src/store/modules/permission.js +17 -18
  117. package/src/utils/assetUrl.js +19 -0
  118. package/src/utils/pdfUtil.js +429 -429
  119. package/src/utils/resolveViewComponent.js +142 -16
  120. package/src/utils/vab.js +1283 -1279
  121. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  122. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  123. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  124. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  125. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  126. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  127. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  128. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  129. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  130. package/src/views/bd/project/common/form_script/list.vue +16 -0
  131. package/src/views/bd/project/common/form_template/list.vue +15 -0
  132. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  133. package/src/views/bd/project/core/branchContext.js +100 -0
  134. package/src/views/bd/project/core/branchPage.js +78 -0
  135. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  136. package/src/views/bd/project/core/branchScope.js +44 -0
  137. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  138. package/src/views/bd/project/core/branchSelect.vue +85 -0
  139. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  140. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  141. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  142. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  143. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  144. package/src/views/bd/setting/form_template/edit.vue +378 -356
  145. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  146. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  147. package/src/views/bd/setting/form_template/list.vue +304 -303
  148. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  149. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  150. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  151. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  152. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  153. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  154. package/src/views/support/form-dialog-demo/index.vue +537 -0
  155. package/src/views/user/file_view_ins/list.vue +970 -970
  156. package/src/views/user/form/vform/designer.vue +823 -821
  157. package/src/views/user/home/default.vue +1117 -1117
  158. package/src/views/user/home/default2.vue +1 -1
  159. package/src/views/user/home/index.vue +103 -101
  160. package/src/views/user/notify_message/dialog.vue +139 -137
  161. package/src/views/user/outLink/form_view.vue +202 -202
  162. package/src/views/user/outLink/index.vue +110 -110
  163. package/src/views/user/outLink/view.vue +3 -3
  164. package/src/views/user/role/edit.vue +632 -632
  165. package/src/views/user/role/list.vue +260 -260
  166. package/src/views/user/wf/iframe/index.vue +51 -51
  167. package/src/views/user/wf/iframe/index2.vue +64 -64
  168. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  169. package/src/views/user/wf/wf_manage/list2.vue +871 -875
  170. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
  171. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
  172. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  173. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  174. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  175. package/src/utils/wf.js +0 -766
@@ -0,0 +1,110 @@
1
+ <!--
2
+ /**
3
+ * author: vformAdmin
4
+ * email: vdpadmin@163.com
5
+ * website: https://www.vform666.com
6
+ * date: 2021.08.18
7
+ * remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
8
+ */
9
+ -->
10
+ <template>
11
+ <container-item-wrapper :widget="widget">
12
+ <div class="detail-temp-wrap" :class="[customClass]" :ref="widget.id">
13
+ <div class="detail-temp-box" v-for="(paneWidget, index) in widget.panes" :key="paneWidget.id || index" :class="widget.options.styleTempClass">
14
+ <div class="detail-temp-header">
15
+ <span class="detail-temp-label">{{ getI18nLabel(paneWidget.options.label) || '模块' }}</span>
16
+ </div>
17
+ <div class="detail-temp-body">
18
+ <template v-for="(subWidget, swIdx) in paneWidget.widgetList">
19
+ <template v-if="'container' === subWidget.category">
20
+ <component
21
+ :is="subWidget.type + '-item'"
22
+ :widget="subWidget"
23
+ :key="subWidget.id || swIdx"
24
+ :parent-list="paneWidget.widgetList"
25
+ :index-of-parent-list="swIdx"
26
+ :parent-widget="paneWidget"
27
+ >
28
+ <!-- 递归传递插槽 -->
29
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
30
+ <slot :name="slot" v-bind="scope" />
31
+ </template>
32
+ </component>
33
+ </template>
34
+ <template v-else>
35
+ <component
36
+ :is="subWidget.type + '-widget'"
37
+ :field="subWidget"
38
+ :designer="null"
39
+ :key="subWidget.id || swIdx"
40
+ :parent-list="paneWidget.widgetList"
41
+ :index-of-parent-list="swIdx"
42
+ :parent-widget="paneWidget"
43
+ >
44
+ <!-- 递归传递插槽 -->
45
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
46
+ <slot :name="slot" v-bind="scope" />
47
+ </template>
48
+ </component>
49
+ </template>
50
+ </template>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </container-item-wrapper>
55
+ </template>
56
+
57
+ <script>
58
+ import emitter from '../../../../components/xform/utils/emitter'
59
+ import i18n from "../../../../components/xform/utils/i18n"
60
+ import refMixin from "../../../../components/xform/form-render/refMixin"
61
+ import containerItemMixin from "./containerItemMixin"
62
+ import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
63
+
64
+ export default {
65
+ name: "detail-temp-item",
66
+ componentName: 'ContainerItem',
67
+ mixins: [emitter, i18n, refMixin, containerItemMixin],
68
+ components: {
69
+ ...FieldComponents,
70
+ },
71
+ props: {
72
+ widget: Object,
73
+ parentWidget: Object,
74
+ parentList: Array,
75
+ indexOfParentList: Number,
76
+ },
77
+ inject: ['refList', 'globalModel', 'previewState'],
78
+ computed: {
79
+ customClass() {
80
+ return this.widget.options.customClass || ''
81
+ }
82
+ },
83
+ watch: {
84
+ //
85
+ },
86
+ created() {
87
+ this.initRefList()
88
+ this.handleOnCreated();
89
+ },
90
+ mounted() {
91
+ this.handleOnMounted();
92
+ },
93
+ data() {
94
+ return {
95
+ showStatus: true,
96
+ }
97
+ },
98
+ methods: {
99
+ opeaShowCont() {
100
+ this.showStatus = !this.showStatus
101
+ }
102
+ }
103
+ }
104
+ </script>
105
+
106
+ <style lang="scss" scoped>
107
+ .detail-temp-wrap {
108
+ min-height: 50px;
109
+ }
110
+ </style>
@@ -1,140 +1,160 @@
1
- <template>
2
- <div class="h5-item">
3
- <div class="h5-title">
4
- <b>{{ widget.options.label }}</b>
5
- <div class="btns">
6
- <template v-for="(subWidget, swIdx) in widget.buttonWidgetList">
7
- <template v-if="'container' === subWidget.category">
8
- <component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
9
- :parent-list="widget.buttonWidgetList"
10
- :index-of-parent-list="swIdx" :parent-widget="widget">
11
- <!-- 递归传递插槽!!! -->
12
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
13
- <slot :name="slot" v-bind="scope"/>
14
- </template>
15
- </component>
16
- </template>
17
- <template v-else>
18
- <component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
19
- :parent-list="widget.buttonWidgetList"
20
- :index-of-parent-list="swIdx" :parent-widget="widget">
21
- <!-- 递归传递插槽!!! -->
22
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
23
- <slot :name="slot" v-bind="scope"/>
24
- </template>
25
- </component>
26
- </template>
27
- </template>
28
- </div>
29
- </div>
30
- <div class="h5-form-box">
31
- <transition-group name="fade" tag="div" class="form-widget-list">
32
- <template v-if="!!widget.widgetList && (widget.widgetList.length > 0)">
33
- <template v-for="(subWidget, swIdx) in widget.widgetList">
34
- <template v-if="'container' === subWidget.category">
35
- <component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
36
- :parent-list="widget.widgetList"
37
- :index-of-parent-list="swIdx" :parent-widget="widget">
38
- <!-- 递归传递插槽!!! -->
39
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
40
- <slot :name="slot" v-bind="scope"/>
41
- </template>
42
- </component>
43
- </template>
44
- <template v-else>
45
- <component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
46
- :parent-list="widget.widgetList"
47
- :index-of-parent-list="swIdx" :parent-widget="widget">
48
- <!-- 递归传递插槽!!! -->
49
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
50
- <slot :name="slot" v-bind="scope"/>
51
- </template>
52
- </component>
53
- </template>
54
- </template>
55
- </template>
56
- </transition-group>
57
- </div>
58
- </div>
59
- </template>
60
-
61
- <script>
62
- import emitter from '../../../../components/xform/utils/emitter'
63
- import i18n from "../../../../components/xform/utils/i18n"
64
- import refMixin from "../../../../components/xform/form-render/refMixin"
65
- import containerItemMixin from "./containerItemMixin"
66
- import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
67
-
68
- export default {
69
- name: "h5-card-pane-item",
70
- componentName: 'ContainerItem',
71
- mixins: [emitter, i18n, refMixin, containerItemMixin],
72
- components: {
73
- ...FieldComponents,
74
- },
75
- props: {
76
- widget: Object,
77
- parentWidget: Object,
78
- parentList: Array,
79
- indexOfParentList: Number,
80
- },
81
- inject: ['refList', 'globalModel', 'previewState'],
82
- computed: {
83
- customClass() {
84
- return this.widget.options.customClass || ''
85
- }
86
- },
87
- watch: {
88
- //
89
- },
90
- created() {
91
- this.initRefList()
92
- this.handleOnCreated();
93
- },
94
- mounted() {
95
- this.handleOnMounted();
96
- },
97
- methods: {}
98
- }
99
- </script>
100
-
101
- <style lang="scss" scoped>
102
- .grid-container {
103
- min-height: 50px;
104
- //line-height: 48px;
105
- //padding: 6px;
106
- outline: 1px dashed #336699;
107
-
108
- > div {
109
- height: 100%;
110
- }
111
-
112
- .form-widget-list {
113
- // min-height: 28px;
114
- height: 100%;
115
- }
116
-
117
- }
118
-
119
- .grid-container.selected, .grid-cell.selected {
120
- outline: 2px solid $--color-primary !important;
121
- }
122
-
123
- .grid-cell {
124
- min-height: 80px;
125
- //margin: 6px 0; /* 设置了margin,栅格列的offset、push、pull会失效!! */
126
- padding: 3px;
127
- outline: 1px dashed #336699;
128
- position: relative;
129
-
130
- > div {
131
- height: 100%;
132
- }
133
-
134
- .form-widget-list {
135
- min-height: 28px;
136
- height: 100%
137
- }
138
-
139
- }
140
- </style>
1
+ <template>
2
+ <!-- customClass 必须绑上:设计器侧 h5-card-pane-widget 是绑了的,
3
+ 这里漏绑会导致设计器里配的 class 到运行期丢失 -->
4
+ <div class="h5-item" :class="[customClass]">
5
+ <!-- 标题栏整条可点来折叠,与流程信息卡片(mobile/h5Card/h5CardPane.vue)同交互。
6
+ 标题里的按钮区要 @click.stop,否则点按钮会连带把卡片折起来。 -->
7
+ <div class="h5-title" @click="toggleFold">
8
+ <b>{{ widget.options.label }}</b>
9
+ <i class="arrow" :class="foldClass"></i>
10
+ <div class="btns" @click.stop>
11
+ <template v-for="(subWidget, swIdx) in widget.buttonWidgetList">
12
+ <template v-if="'container' === subWidget.category">
13
+ <component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
14
+ :parent-list="widget.buttonWidgetList"
15
+ :index-of-parent-list="swIdx" :parent-widget="widget">
16
+ <!-- 递归传递插槽!!! -->
17
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
18
+ <slot :name="slot" v-bind="scope"/>
19
+ </template>
20
+ </component>
21
+ </template>
22
+ <template v-else>
23
+ <component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
24
+ :parent-list="widget.buttonWidgetList"
25
+ :index-of-parent-list="swIdx" :parent-widget="widget">
26
+ <!-- 递归传递插槽!!! -->
27
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
28
+ <slot :name="slot" v-bind="scope"/>
29
+ </template>
30
+ </component>
31
+ </template>
32
+ </template>
33
+ </div>
34
+ </div>
35
+ <!-- 折叠必须用 v-show 而不是 v-if:里面的字段组件挂着 el-form-item
36
+ prop/rules,v-if 销毁重建会打断校验链、丢掉组件内部状态 -->
37
+ <div class="h5-form-box" v-show="showContent">
38
+ <transition-group name="fade" tag="div" class="form-widget-list">
39
+ <template v-if="!!widget.widgetList && (widget.widgetList.length > 0)">
40
+ <template v-for="(subWidget, swIdx) in widget.widgetList">
41
+ <template v-if="'container' === subWidget.category">
42
+ <component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
43
+ :parent-list="widget.widgetList"
44
+ :index-of-parent-list="swIdx" :parent-widget="widget">
45
+ <!-- 递归传递插槽!!! -->
46
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
47
+ <slot :name="slot" v-bind="scope"/>
48
+ </template>
49
+ </component>
50
+ </template>
51
+ <template v-else>
52
+ <component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
53
+ :parent-list="widget.widgetList"
54
+ :index-of-parent-list="swIdx" :parent-widget="widget">
55
+ <!-- 递归传递插槽!!! -->
56
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
57
+ <slot :name="slot" v-bind="scope"/>
58
+ </template>
59
+ </component>
60
+ </template>
61
+ </template>
62
+ </template>
63
+ </transition-group>
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <script>
69
+ import emitter from '../../../../components/xform/utils/emitter'
70
+ import i18n from "../../../../components/xform/utils/i18n"
71
+ import refMixin from "../../../../components/xform/form-render/refMixin"
72
+ import containerItemMixin from "./containerItemMixin"
73
+ import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
74
+
75
+ export default {
76
+ name: "h5-card-pane-item",
77
+ componentName: 'ContainerItem',
78
+ mixins: [emitter, i18n, refMixin, containerItemMixin],
79
+ components: {
80
+ ...FieldComponents,
81
+ },
82
+ props: {
83
+ widget: Object,
84
+ parentWidget: Object,
85
+ parentList: Array,
86
+ indexOfParentList: Number,
87
+ },
88
+ inject: ['refList', 'globalModel', 'previewState'],
89
+ data() {
90
+ return {
91
+ // 展开/收起,默认展开
92
+ showContent: true,
93
+ }
94
+ },
95
+ computed: {
96
+ customClass() {
97
+ return this.widget.options.customClass || ''
98
+ },
99
+ foldClass() {
100
+ return this.showContent ? 'el-icon-arrow-up' : 'el-icon-arrow-down'
101
+ }
102
+ },
103
+ watch: {
104
+ //
105
+ },
106
+ created() {
107
+ this.initRefList()
108
+ this.handleOnCreated();
109
+ },
110
+ mounted() {
111
+ this.handleOnMounted();
112
+ },
113
+ methods: {
114
+ toggleFold() {
115
+ this.showContent = !this.showContent;
116
+ }
117
+ }
118
+ }
119
+ </script>
120
+
121
+ <style lang="scss" scoped>
122
+ .grid-container {
123
+ min-height: 50px;
124
+ //line-height: 48px;
125
+ //padding: 6px;
126
+ outline: 1px dashed #336699;
127
+
128
+ > div {
129
+ height: 100%;
130
+ }
131
+
132
+ .form-widget-list {
133
+ // min-height: 28px;
134
+ height: 100%;
135
+ }
136
+
137
+ }
138
+
139
+ .grid-container.selected, .grid-cell.selected {
140
+ outline: 2px solid $--color-primary !important;
141
+ }
142
+
143
+ .grid-cell {
144
+ min-height: 80px;
145
+ //margin: 6px 0; /* 设置了margin,栅格列的offset、push、pull会失效!! */
146
+ padding: 3px;
147
+ outline: 1px dashed #336699;
148
+ position: relative;
149
+
150
+ > div {
151
+ height: 100%;
152
+ }
153
+
154
+ .form-widget-list {
155
+ min-height: 28px;
156
+ height: 100%
157
+ }
158
+
159
+ }
160
+ </style>