cloud-web-corejs 1.0.54-dev.201 → 1.0.54-dev.203

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.201",
4
+ "version": "1.0.54-dev.203",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -762,38 +762,27 @@ modules = {
762
762
  e.value === t && (e.disabled = !1);
763
763
  });
764
764
  },
765
- emitFieldDataChange(e, t) {
766
- if (this.designState) return
767
- this.$emit("field-value-changed", [e, t]),
768
- this.field.options.keyNameEnabled
769
- ? this.getFormRef().broadcast("FieldWidget", "sync-field-value", [
770
- this.field.options.name,
771
- this.field.options.keyName,
772
- this.subFormName,
773
- this.subFormRowId,
774
- e,
775
- this.getObjectName(),
776
- ])
777
- : this.getFormRef().broadcast("FieldWidget", "sync-field-value", [
778
- this.field.options.name,
779
- this.field.options.name,
780
- this.subFormName,
781
- this.subFormRowId,
782
- e,
783
- this.getObjectName(),
784
- ]),
785
- "number" === this.field.type &&
786
- this.getFormRef().broadcast("FieldWidget", "calculate-formula", [
787
- e,
788
- this,
789
- ]),
790
- this.dispatch("VFormRender", "fieldChange", [
791
- this.field.options.name,
792
- e,
793
- t,
794
- this.subFormName,
795
- this.subFormRowIndex,
796
- ]);
765
+ emitFieldDataChange(newValue, oldValue) {
766
+ this.$emit('field-value-changed', [newValue, oldValue])
767
+
768
+ /* 同步更新keyName属性一致的字段组件值!! */
769
+ if (this.field.options.keyNameEnabled) {
770
+ this.getFormRef().broadcast('FieldWidget', 'sync-field-value',
771
+ [this.field.options.name, this.field.options.keyName, this.subFormName, this.subFormRowId,
772
+ newValue, this.getObjectName()])
773
+ } else {
774
+ this.getFormRef().broadcast('FieldWidget', 'sync-field-value',
775
+ [this.field.options.name, this.field.options.name, this.subFormName, this.subFormRowId,
776
+ newValue, this.getObjectName()])
777
+ }
778
+
779
+ if (this.field.type === 'number') {
780
+ this.getFormRef().broadcast('FieldWidget', 'calculate-formula', [newValue, this]) //触发计算公式计算
781
+ }
782
+
783
+ /* 必须用dispatch向指定父组件派发消息!! */
784
+ this.dispatch('VFormRender', 'fieldChange',
785
+ [this.field.options.name, newValue, oldValue, this.subFormName, this.subFormRowIndex])
797
786
  },
798
787
  syncUpdateFormModel: function (e) {
799
788
  if (!this.designState)
@@ -12,7 +12,7 @@
12
12
  :default-first-option="allowDefaultFirstOption"
13
13
  :automatic-dropdown="field.options.automaticDropdown"
14
14
  :multiple="field.options.multiple" :multiple-limit="field.options.multipleLimit"
15
- :collapse-tags="!!field.options.multiple"
15
+ :collapse-tags="!field.options.flatCollapseTags"
16
16
  :placeholder="getI18nLabel(field.options.placeholder || '请选择')"
17
17
  :remote="field.options.remote" :remote-method="remoteQuery"
18
18
  @focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
@@ -1,7 +1,12 @@
1
1
  <template>
2
- <el-form-item :label="i18nt('designer.setting.multiple')">
3
- <el-switch v-model="optionModel.multiple" @change="onMultipleSelected"></el-switch>
4
- </el-form-item>
2
+ <div>
3
+ <el-form-item :label="i18nt('designer.setting.multiple')">
4
+ <el-switch v-model="optionModel.multiple" @change="onMultipleSelected"></el-switch>
5
+ </el-form-item>
6
+ <el-form-item :label="i18nt('平铺选项')">
7
+ <el-switch v-model="optionModel.flatCollapseTags"></el-switch>
8
+ </el-form-item>
9
+ </div>
5
10
  </template>
6
11
 
7
12
  <script>
@@ -1339,6 +1339,8 @@ export const basicFields = [
1339
1339
  commonAttributeEnabled: false,
1340
1340
  commonAttributeCode: "",
1341
1341
 
1342
+ showCollapseTags:false,
1343
+
1342
1344
  showRuleFlag: 1,
1343
1345
  showRuleEnabled: 1,
1344
1346
  showRules: [],