cloud-web-corejs 1.0.54-dev.687 → 1.0.54-dev.689

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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/components/fileLibrary/index.vue +113 -33
  3. package/src/components/table/CellSlot.vue +12 -10
  4. package/src/components/xform/docs//345/220/216/345/217/260/345/255/227/346/256/265/357/274/210/345/212/250/346/200/201/347/224/237/346/210/220/357/274/211JSON /350/257/264/346/230/216.md" +1261 -0
  5. package/src/components/xform/docs//346/225/260/346/215/256/350/241/250/346/240/274/345/212/250/346/200/201/345/210/227 JSON /350/257/264/346/230/216.md" +657 -0
  6. package/src/components/xform/form-designer/designer.js +1 -1
  7. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +157 -105
  8. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +98 -18
  9. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +18 -13
  10. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +11 -8
  11. package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +143 -0
  12. package/src/components/xform/form-designer/indexMixin.js +837 -13
  13. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +69 -21
  14. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +87 -25
  15. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +5 -0
  16. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +80 -34
  17. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/checkStrictly-editor.vue +11 -13
  18. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/showAllLevels-editor.vue +21 -0
  19. package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +54 -0
  20. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +15 -4
  21. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
  22. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +117 -2
  23. package/src/components/xform/form-render/container-item/data-table-mixin.js +296 -118
  24. package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +50 -36
  25. package/src/components/xform/form-render/container-item/list-h5-item.vue +5 -1
  26. package/src/components/xform/form-render/indexMixin.js +197 -12
  27. package/src/components/xform/lang/en-US.js +1 -0
  28. package/src/components/xform/lang/zh-CN.js +86 -99
  29. package/src/components/xform/utils/dynamicSchemaUtil.js +312 -0
  30. package/src/components/xform/utils/tableCellValidateUtil.js +148 -0
  31. package/src/components/xform/utils/tableColumnHelper.js +21 -1
  32. package/src/components/xform/utils/util.js +126 -0
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <div class="option-items-pane">
3
3
  <el-form-item label="选项值类型">
4
- <el-radio-group v-model="optionModel.optionItemValueType" @change="changeValueType">
4
+ <el-radio-group
5
+ v-model="optionModel.optionItemValueType"
6
+ @change="changeValueType"
7
+ >
5
8
  <el-radio :label="0">文本</el-radio>
6
9
  <el-radio :label="1">数值</el-radio>
7
10
  <el-radio :label="2">布尔值</el-radio>
@@ -54,7 +57,9 @@
54
57
  type="text"
55
58
  v-model="optionModel.labelKey"
56
59
  placeholder="默认label"
57
- :disabled="optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled"
60
+ :disabled="
61
+ optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled
62
+ "
58
63
  ></el-input>
59
64
  </el-form-item>
60
65
  <el-form-item :label="i18nt('关联字段')">
@@ -62,11 +67,21 @@
62
67
  type="text"
63
68
  v-model="optionModel.valueKey"
64
69
  placeholder="默认value"
65
- :disabled="optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled"
70
+ :disabled="
71
+ optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled
72
+ "
66
73
  ></el-input>
67
74
  </el-form-item>
75
+ <el-form-item
76
+ v-if="hasConfig('childrenKey')"
77
+ :label="i18nt('designer.setting.childrenKeyName')"
78
+ >
79
+ <el-input v-model="optionModel.childrenKey"></el-input>
80
+ </el-form-item>
68
81
  <template
69
- v-if="!optionModel.commonAttributeEnabled && !optionModel.formScriptEnabled"
82
+ v-if="
83
+ !optionModel.commonAttributeEnabled && !optionModel.formScriptEnabled
84
+ "
70
85
  >
71
86
  <el-radio-group
72
87
  v-if="
@@ -80,7 +95,11 @@
80
95
  tag="ul"
81
96
  class="draggable-box"
82
97
  :list="optionModel.optionItems"
83
- v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }"
98
+ v-bind="{
99
+ group: 'optionsGroup',
100
+ ghostClass: 'ghost',
101
+ handle: '.drag-option',
102
+ }"
84
103
  >
85
104
  <li v-for="(option, idx) in optionModel.optionItems" :key="idx">
86
105
  <el-radio :label="option.value">
@@ -136,7 +155,11 @@
136
155
  tag="ul"
137
156
  class="draggable-box"
138
157
  :list="optionModel.optionItems"
139
- v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }"
158
+ v-bind="{
159
+ group: 'optionsGroup',
160
+ ghostClass: 'ghost',
161
+ handle: '.drag-option',
162
+ }"
140
163
  >
141
164
  <li v-for="(option, idx) in optionModel.optionItems" :key="idx">
142
165
  <el-checkbox :label="option.value">
@@ -185,7 +208,8 @@
185
208
  @change="emitDefaultValueChange"
186
209
  :placeholder="i18nt('render.hint.selectPlaceholder')"
187
210
  style="width: 100%"
188
- ></el-cascader>
211
+ >
212
+ </el-cascader>
189
213
  <div v-if="selectedWidget.type === 'cascader'">
190
214
  <el-button type="text" @click="importCascaderOptions">{{
191
215
  i18nt("designer.setting.importOptions")
@@ -248,22 +272,29 @@
248
272
  v-if="showImportCascaderDialogFlag"
249
273
  :show-close="true"
250
274
  class="small-padding-dialog"
275
+ append-to-body
251
276
  :close-on-click-modal="false"
252
277
  :close-on-press-escape="false"
253
278
  :destroy-on-close="true"
254
- :append-to-body="true"
255
- :modal-append-to-body="true"
256
279
  >
257
- <code-editor v-model="cascaderOptions" mode="json" :readonly="false"></code-editor>
280
+ <code-editor
281
+ v-model="cascaderOptions"
282
+ mode="json"
283
+ :readonly="false"
284
+ ></code-editor>
258
285
  <div slot="footer" class="dialog-footer">
259
286
  <el-button size="large" type="primary" @click="saveCascaderOptions">{{
260
287
  i18nt("designer.hint.confirm")
261
288
  }}</el-button>
262
- <el-button size="large" type="" @click="showImportCascaderDialogFlag = false">{{
263
- i18nt("designer.hint.cancel")
264
- }}</el-button>
289
+ <el-button
290
+ size="large"
291
+ type=""
292
+ @click="showImportCascaderDialogFlag = false"
293
+ >{{ i18nt("designer.hint.cancel") }}</el-button
294
+ >
265
295
  </div>
266
296
  </el-dialog>
297
+
267
298
  <el-dialog
268
299
  v-if="dataDialogVisible"
269
300
  custom-class="dialog-style list-dialog"
@@ -297,7 +328,11 @@
297
328
  </el-button>
298
329
  </div>
299
330
  </template>
300
- <code-editor mode="json" :readonly="!1" v-model="tableDataOptions"></code-editor>
331
+ <code-editor
332
+ mode="json"
333
+ :readonly="!1"
334
+ v-model="tableDataOptions"
335
+ ></code-editor>
301
336
  </el-dialog>
302
337
  </div>
303
338
  </template>
@@ -305,11 +340,12 @@
305
340
  <script>
306
341
  import Draggable from "vuedraggable";
307
342
  import i18n from "../../../../components/xform/utils/i18n";
343
+ import propertyMixin from "../../../../components/xform/form-designer/setting-panel/property-editor/propertyMixin";
308
344
 
309
345
  export default {
310
346
  name: "OptionItemsSetting",
311
347
  componentName: "PropertyEditor",
312
- mixins: [i18n],
348
+ mixins: [i18n, propertyMixin],
313
349
  components: {
314
350
  Draggable,
315
351
  },
@@ -406,13 +442,16 @@ export default {
406
442
  let lineArray = this.optionLines.split("\n");
407
443
  //console.log('test', lineArray)
408
444
  if (lineArray.length > 0) {
409
- let isNumericOptionItemValue = this.optionModel.optionItemValueType === 1;
445
+ let isNumericOptionItemValue =
446
+ this.optionModel.optionItemValueType === 1;
410
447
  this.optionModel.optionItems = [];
411
448
  lineArray.forEach((optLine) => {
412
449
  if (!!optLine && !!optLine.trim()) {
413
450
  if (optLine.indexOf(this.separator) !== -1) {
414
451
  let valueStr = optLine.split(this.separator)[0];
415
- let value = isNumericOptionItemValue ? Number(valueStr) : valueStr;
452
+ let value = isNumericOptionItemValue
453
+ ? Number(valueStr)
454
+ : valueStr;
416
455
  this.optionModel.optionItems.push({
417
456
  value: value,
418
457
  label: optLine.split(this.separator)[1],
@@ -436,7 +475,8 @@ export default {
436
475
  resetDefault() {
437
476
  if (
438
477
  this.selectedWidget.type === "checkbox" ||
439
- (this.selectedWidget.type === "select" && this.selectedWidget.options.multiple)
478
+ (this.selectedWidget.type === "select" &&
479
+ this.selectedWidget.options.multiple)
440
480
  ) {
441
481
  this.optionModel.defaultValue = [];
442
482
  } else {
@@ -447,7 +487,11 @@ export default {
447
487
  },
448
488
 
449
489
  importCascaderOptions() {
450
- this.cascaderOptions = JSON.stringify(this.optionModel.optionItems, null, " ");
490
+ this.cascaderOptions = JSON.stringify(
491
+ this.optionModel.optionItems,
492
+ null,
493
+ " "
494
+ );
451
495
  this.showImportCascaderDialogFlag = true;
452
496
  },
453
497
 
@@ -459,7 +503,9 @@ export default {
459
503
 
460
504
  this.showImportCascaderDialogFlag = false;
461
505
  } catch (ex) {
462
- this.$message.error(this.i18nt("designer.hint.invalidOptionsData") + ex.message);
506
+ this.$message.error(
507
+ this.i18nt("designer.hint.invalidOptionsData") + ex.message
508
+ );
463
509
  }
464
510
  },
465
511
  changeValueType(val) {
@@ -496,7 +542,9 @@ export default {
496
542
  (this.optionModel.defaultValue = JSON.parse(this.tableDataOptions)),
497
543
  (this.dataDialogVisible = !1);
498
544
  } catch (e) {
499
- this.$message.error(this.i18nt("designer.hint.invalidOptionsData") + e.message);
545
+ this.$message.error(
546
+ this.i18nt("designer.hint.invalidOptionsData") + e.message
547
+ );
500
548
  }
501
549
  },
502
550
  getDefaultValue() {
@@ -1,5 +1,21 @@
1
1
  <template>
2
2
  <div>
3
+ <!-- <el-form-item label-width="0">
4
+ <el-divider class="custom-divider-margin-top">数据集</el-divider>
5
+ </el-form-item>
6
+ <el-form-item :label="i18nt('designer.setting.required')">
7
+ <el-switch v-model="optionModel.required"></el-switch>
8
+ </el-form-item>
9
+ <el-form-item :label="i18nt('designer.setting.requiredHint')">
10
+ <el-input
11
+ v-model="optionModel.requiredHint"
12
+ clearable
13
+ placeholder="留空则使用默认提示"
14
+ ></el-input>
15
+ </el-form-item> -->
16
+ <el-form-item label-width="0">
17
+ <el-divider class="custom-divider-margin-top">表格布局</el-divider>
18
+ </el-form-item>
3
19
  <el-form-item :label="i18nt('designer.setting.tableWidth')">
4
20
  <el-input v-model="optionModel.tableWidth"></el-input>
5
21
  </el-form-item>
@@ -135,9 +151,19 @@
135
151
  <el-radio label="api">接口动态列</el-radio>
136
152
  </el-radio-group>
137
153
  </el-form-item>
138
- <div v-if="optionModel.dynamicColumnSourceType === 'script'" class="dynamic-column-block">
139
- <div class="form-section-label">前端列脚本</div>
140
- <div class="form-section-desc">不调接口,脚本直接 return 列配置</div>
154
+ <div
155
+ v-if="optionModel.dynamicColumnSourceType === 'script'"
156
+ class="dynamic-column-block"
157
+ >
158
+ <div class="form-section-label">
159
+ 前端列脚本
160
+ <el-tooltip effect="light" placement="top">
161
+ <div slot="content" class="field-tip-content">
162
+ 不调接口,脚本直接 return 列配置
163
+ </div>
164
+ <i class="el-icon-info label-tip-icon"></i>
165
+ </el-tooltip>
166
+ </div>
141
167
  <div class="data-table-editor-subsection">
142
168
  <el-form-item label="列脚本">
143
169
  <a
@@ -153,18 +179,38 @@
153
179
  </el-form-item>
154
180
  </div>
155
181
  </div>
156
- <div v-if="optionModel.dynamicColumnSourceType === 'api'" class="dynamic-column-block">
157
- <div class="form-section-label">接口动态列</div>
158
- <div class="form-section-desc">打开表单时请求后端脚本,返回列配置</div>
182
+ <div
183
+ v-if="optionModel.dynamicColumnSourceType === 'api'"
184
+ class="dynamic-column-block"
185
+ >
186
+ <div class="form-section-label">
187
+ 接口动态列
188
+ <el-tooltip effect="light" placement="top">
189
+ <div slot="content" class="field-tip-content">
190
+ 打开表单时请求后台脚本,返回字段/列定义(格式与「表头后台字段」一致,详见
191
+ docs/数据表格动态列 JSON 说明.md)
192
+ </div>
193
+ <i class="el-icon-info label-tip-icon"></i>
194
+ </el-tooltip>
195
+ </div>
159
196
  <div class="data-table-editor-subsection">
160
197
  <el-form-item label="脚本编码">
161
198
  <el-input
162
199
  v-model="optionModel.dynamicColumnScriptCode"
163
200
  clearable
164
- placeholder=" getDynamicColumns"
201
+ placeholder="scriptCode 或 formCode/scriptCode"
165
202
  ></el-input>
166
203
  </el-form-item>
167
- <el-form-item label="请求参数">
204
+ <el-form-item>
205
+ <span slot="label">
206
+ 额外参数
207
+ <el-tooltip effect="light" placement="top">
208
+ <div slot="content" class="field-tip-content">
209
+ 格式: return { bizType: this.formModel.type }
210
+ </div>
211
+ <i class="el-icon-info label-tip-icon"></i>
212
+ </el-tooltip>
213
+ </span>
168
214
  <a
169
215
  href="javascript:void(0);"
170
216
  class="a-link link-oneLind"
@@ -178,37 +224,40 @@
178
224
  </el-form-item>
179
225
  <el-form-item>
180
226
  <span slot="label">
181
- 响应转换
227
+ 转换脚本
182
228
  <el-tooltip effect="light" placement="top">
183
- <div slot="content" style="line-height: 1.4; max-width: 320px">
184
- 将接口返回的
185
- <code>res</code> 转为列数组;不配置则按平台默认结构解析。
229
+ <div slot="content" class="field-tip-content">
230
+ 可选。入参 res,返回标准定义数组;不填时默认取
231
+ res.objx(数组)或 res.objx.fields / res.objx.columns
186
232
  </div>
187
- <i class="el-icon-info"></i>
233
+ <i class="el-icon-info label-tip-icon"></i>
188
234
  </el-tooltip>
189
235
  </span>
190
236
  <a
191
237
  href="javascript:void(0);"
192
238
  class="a-link link-oneLind"
193
- @click="editEventHandler('onDynamicColumnsConvert', ['res'])"
239
+ @click="editDynamicSchemaConvert"
194
240
  >
195
- <span>{{ optionModel.onDynamicColumnsConvert }}</span>
241
+ <span>{{ dynamicSchemaConvertDisplay }}</span>
196
242
  <i class="el-icon-edit"></i>
197
243
  </a>
198
244
  </el-form-item>
199
245
  </div>
200
246
  </div>
201
- <div v-if="optionModel.dynamicColumnSourceType !== 'none'" class="dynamic-column-block">
247
+ <div
248
+ v-if="optionModel.dynamicColumnSourceType !== 'none'"
249
+ class="dynamic-column-block"
250
+ >
202
251
  <div class="data-table-editor-subsection">
203
252
  <el-form-item>
204
253
  <span slot="label">
205
254
  加载条件
206
255
  <el-tooltip effect="light" placement="top">
207
- <div slot="content" style="line-height: 1.4; max-width: 320px">
256
+ <div slot="content" class="field-tip-content">
208
257
  表格初始化加载动态列前执行。<br />
209
258
  <code>return false</code> 时不加载;不配置则默认加载。
210
259
  </div>
211
- <i class="el-icon-info"></i>
260
+ <i class="el-icon-info label-tip-icon"></i>
212
261
  </el-tooltip>
213
262
  </span>
214
263
  <a
@@ -224,15 +273,15 @@
224
273
  </el-form-item>
225
274
  </div>
226
275
  </div>
227
- <el-form-item v-if="optionModel.dynamicColumnSourceType !== 'none'" label="动态列模式">
276
+ <el-form-item v-if="optionModel.dynamicColumnSourceType !== 'none'">
228
277
  <span slot="label">
229
278
  动态列模式
230
279
  <el-tooltip effect="light" placement="top">
231
- <div slot="content" style="line-height: 1.4; max-width: 320px">
280
+ <div slot="content" class="field-tip-content">
232
281
  对<strong>生效的动态列</strong>与静态列的合并方式:<br />
233
282
  追加 — 静态列 + 动态列;替换 — 仅动态列。
234
283
  </div>
235
- <i class="el-icon-info"></i>
284
+ <i class="el-icon-info label-tip-icon"></i>
236
285
  </el-tooltip>
237
286
  </span>
238
287
  <el-select v-model="optionModel.dynamicColumnMode" style="width: 100%">
@@ -700,6 +749,9 @@ export default {
700
749
  this.optionModel.isNotShowQueryButton = !val;
701
750
  },
702
751
  },
752
+ dynamicSchemaConvertDisplay() {
753
+ return this.optionModel.dynamicSchemaConvert || "";
754
+ },
703
755
  },
704
756
  created: function () {
705
757
  // this.reportTemplate = this.getReportTemplate();
@@ -724,6 +776,9 @@ export default {
724
776
  }
725
777
  },
726
778
  methods: {
779
+ editDynamicSchemaConvert() {
780
+ this.editEventHandler("dynamicSchemaConvert", ["res"]);
781
+ },
727
782
  dragSort: function () {
728
783
  var e = this.$refs.singleTable.$el.querySelectorAll(
729
784
  ".el-table__body-wrapper > table > tbody"
@@ -1063,13 +1118,20 @@ export default {
1063
1118
  font-weight: 500;
1064
1119
  color: #303133;
1065
1120
  line-height: 22px;
1121
+ margin-bottom: 8px;
1066
1122
  }
1067
1123
 
1068
- .form-section-desc {
1069
- font-size: 12px;
1124
+ .label-tip-icon {
1125
+ margin-left: 4px;
1070
1126
  color: #909399;
1071
- line-height: 18px;
1072
- margin: 2px 0 8px 8px;
1127
+ cursor: pointer;
1128
+ font-size: 14px;
1129
+ vertical-align: middle;
1130
+ }
1131
+
1132
+ .field-tip-content {
1133
+ line-height: 1.4;
1134
+ max-width: 320px;
1073
1135
  }
1074
1136
 
1075
1137
  .dynamic-column-hint {
@@ -771,6 +771,10 @@ export default {
771
771
  value: "textarea",
772
772
  label: "多行文本输入框",
773
773
  },
774
+ {
775
+ value: "editScriptInput",
776
+ label: "脚本输入框",
777
+ },
774
778
  {
775
779
  value: "editSelect",
776
780
  label: "下拉框",
@@ -1590,6 +1594,7 @@ export default {
1590
1594
  row.prop = null;
1591
1595
  row.label = null;
1592
1596
  row.sortable = false;
1597
+ row.filterable = false;
1593
1598
  } else {
1594
1599
  let tmpId = "column" + generateId();
1595
1600
  if (!row.width || row.width == 47) row.width = 150;
@@ -1,11 +1,28 @@
1
1
  <template>
2
2
  <div class="table-dynamic-field-editor">
3
3
  <!-- 后台字段(动态生成):字段定义本身由后台查询下发 -->
4
- <el-divider class="custom-divider">后台字段(动态生成)</el-divider>
4
+ <el-divider class="custom-divider">
5
+ 后台字段
6
+ <el-tooltip effect="light" placement="top">
7
+ <div slot="content" class="field-tip-content">
8
+ 字段「显隐/必填/只读/禁用/取值」等动态规则请到「表单设置 -
9
+ 动态字段规则」统一配置
10
+ </div>
11
+ <i class="el-icon-info label-tip-icon"></i>
12
+ </el-tooltip>
13
+ </el-divider>
5
14
 
6
- <el-form-item label="启用后台字段">
15
+ <el-form-item>
16
+ <span slot="label">
17
+ 启用后台字段
18
+ <el-tooltip effect="light" placement="top">
19
+ <div slot="content" class="field-tip-content">
20
+ 字段由后台查询下发,无需在设计器预先配置
21
+ </div>
22
+ <i class="el-icon-info label-tip-icon"></i>
23
+ </el-tooltip>
24
+ </span>
7
25
  <el-switch v-model="optionModel.dynamicSchemaEnabled"></el-switch>
8
- <div class="tip-text">字段由后台查询下发,无需在设计器预先配置</div>
9
26
  </el-form-item>
10
27
 
11
28
  <template v-if="optionModel.dynamicSchemaEnabled">
@@ -16,7 +33,17 @@
16
33
  placeholder="scriptCode 或 formCode/scriptCode"
17
34
  ></el-input>
18
35
  </el-form-item>
19
- <el-form-item label="额外参数">
36
+ <el-form-item>
37
+ <span slot="label">
38
+ 额外参数
39
+ <el-tooltip effect="light" placement="top">
40
+ <div slot="content" class="field-tip-content">
41
+ 与数据表格动态列一致:return { bizType: this.formModel.type },固定附带
42
+ formData
43
+ </div>
44
+ <i class="el-icon-info label-tip-icon"></i>
45
+ </el-tooltip>
46
+ </span>
20
47
  <a
21
48
  href="javascript:void(0);"
22
49
  class="a-link link-oneLind"
@@ -25,12 +52,18 @@
25
52
  <span>{{ optionModel.dynamicSchemaScriptParam }}</span>
26
53
  <i class="el-icon-edit"></i>
27
54
  </a>
28
- <div class="tip-text">
29
- 格式: return { bizType:
30
- formModel.type }
31
- </div>
32
55
  </el-form-item>
33
- <el-form-item label="转换脚本">
56
+ <el-form-item>
57
+ <span slot="label">
58
+ 转换脚本
59
+ <el-tooltip effect="light" placement="top">
60
+ <div slot="content" class="field-tip-content">
61
+ 可选。入参 res,返回标准定义数组或 { fields/columns: [...] };不填时默认取
62
+ res.objx(数组)或 res.objx.fields / res.objx.columns
63
+ </div>
64
+ <i class="el-icon-info label-tip-icon"></i>
65
+ </el-tooltip>
66
+ </span>
34
67
  <a
35
68
  href="javascript:void(0);"
36
69
  class="a-link link-oneLind"
@@ -39,24 +72,35 @@
39
72
  <span>{{ optionModel.dynamicSchemaConvert }}</span>
40
73
  <i class="el-icon-edit"></i>
41
74
  </a>
42
- <div class="tip-text">
43
- 可选。入参 res,返回标准字段定义数组;不填时默认取 res.objx(数组)或
44
- res.objx.fields / res.objx.columns
45
- </div>
46
75
  </el-form-item>
47
- <el-form-item label="生成模式">
76
+ <el-form-item>
77
+ <span slot="label">
78
+ 生成模式
79
+ <el-tooltip effect="light" placement="top">
80
+ <div slot="content" class="field-tip-content">
81
+ 追加=保留已配字段并在其后生成;替换=清空已配行后全部由后台生成;锚点插入=插到设计期某占位行位置
82
+ </div>
83
+ <i class="el-icon-info label-tip-icon"></i>
84
+ </el-tooltip>
85
+ </span>
48
86
  <el-radio-group v-model="optionModel.dynamicSchemaMode" size="mini">
49
87
  <el-radio-button label="append">追加</el-radio-button>
50
88
  <el-radio-button label="replace">替换</el-radio-button>
51
89
  <el-radio-button label="anchor">锚点插入</el-radio-button>
52
90
  </el-radio-group>
53
- <div class="tip-text">
54
- 追加=保留已配字段并在其后生成;替换=清空已配行后全部由后台生成;锚点插入=插到设计期某占位行位置
55
- </div>
56
91
  </el-form-item>
57
92
 
58
93
  <template v-if="optionModel.dynamicSchemaMode === 'anchor'">
59
- <el-form-item label="占位锚点行">
94
+ <el-form-item>
95
+ <span slot="label">
96
+ 占位锚点行
97
+ <el-tooltip effect="light" placement="top">
98
+ <div slot="content" class="field-tip-content">
99
+ 建议预留一个空行作为占位锚点
100
+ </div>
101
+ <i class="el-icon-info label-tip-icon"></i>
102
+ </el-tooltip>
103
+ </span>
60
104
  <el-select
61
105
  v-model="optionModel.dynamicSchemaAnchorRowId"
62
106
  size="mini"
@@ -70,7 +114,6 @@
70
114
  :value="r.value"
71
115
  ></el-option>
72
116
  </el-select>
73
- <div class="tip-text">建议预留一个空行作为占位锚点</div>
74
117
  </el-form-item>
75
118
  <el-form-item label="插入位置">
76
119
  <el-radio-group
@@ -82,13 +125,19 @@
82
125
  <el-radio-button label="after">之后</el-radio-button>
83
126
  </el-radio-group>
84
127
  </el-form-item>
85
- <el-form-item label="继承行布局">
128
+ <el-form-item>
129
+ <span slot="label">
130
+ 继承行布局
131
+ <el-tooltip effect="light" placement="top">
132
+ <div slot="content" class="field-tip-content">
133
+ 开启后生成行沿用占位行的单元格数量/宽度/跨列,否则按"每行列数"平铺
134
+ </div>
135
+ <i class="el-icon-info label-tip-icon"></i>
136
+ </el-tooltip>
137
+ </span>
86
138
  <el-switch
87
139
  v-model="optionModel.dynamicSchemaInheritLayout"
88
140
  ></el-switch>
89
- <div class="tip-text">
90
- 开启后生成行沿用占位行的单元格数量/宽度/跨列,否则按"每行列数"平铺
91
- </div>
92
141
  </el-form-item>
93
142
  </template>
94
143
 
@@ -108,11 +157,6 @@
108
157
  </el-form-item>
109
158
  </template>
110
159
 
111
- <div class="tip-text scope-tip">
112
- 字段「显隐/必填/只读/禁用/取值」等动态规则请到「表单设置 -
113
- 动态字段规则」统一配置
114
- </div>
115
-
116
160
  <el-dialog
117
161
  title="额外参数"
118
162
  :visible.sync="scriptParamDialogVisible"
@@ -293,14 +337,16 @@ export default {
293
337
  </script>
294
338
 
295
339
  <style lang="scss" scoped>
296
- .tip-text {
297
- font-size: 12px;
340
+ .label-tip-icon {
341
+ margin-left: 4px;
298
342
  color: #909399;
299
- line-height: 1.4;
300
- margin-top: 2px;
343
+ cursor: pointer;
344
+ font-size: 14px;
345
+ vertical-align: middle;
301
346
  }
302
347
 
303
- .scope-tip {
304
- margin-top: 10px;
348
+ .field-tip-content {
349
+ line-height: 1.4;
350
+ max-width: 320px;
305
351
  }
306
352
  </style>
@@ -5,19 +5,17 @@
5
5
  </template>
6
6
 
7
7
  <script>
8
- import i18n from "../../../../../../components/xform/utils/i18n"
8
+ import i18n from "../../../../../../components/xform/utils/i18n";
9
9
 
10
- export default {
11
- name: "checkStrictly-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
17
- },
18
- }
10
+ export default {
11
+ name: "checkStrictly-editor",
12
+ mixins: [i18n],
13
+ props: {
14
+ designer: Object,
15
+ selectedWidget: Object,
16
+ optionModel: Object,
17
+ },
18
+ };
19
19
  </script>
20
20
 
21
- <style scoped>
22
-
23
- </style>
21
+ <style scoped></style>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <el-form-item :label="i18nt('designer.setting.showAllLevels')">
3
+ <el-switch v-model="optionModel.showAllLevels"></el-switch>
4
+ </el-form-item>
5
+ </template>
6
+
7
+ <script>
8
+ import i18n from "../../../../../../components/xform/utils/i18n";
9
+
10
+ export default {
11
+ name: "showAllLevels-editor",
12
+ mixins: [i18n],
13
+ props: {
14
+ designer: Object,
15
+ selectedWidget: Object,
16
+ optionModel: Object,
17
+ },
18
+ };
19
+ </script>
20
+
21
+ <style scoped></style>