From 9bf3f4ed1b64ad8a82ace3c21d8b7397f4b50b06 Mon Sep 17 00:00:00 2001 From: vdpAdmin Date: Mon, 21 Feb 2022 14:53:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0=E5=88=B02.?= =?UTF-8?q?2.2=EF=BC=9A=201.=20=E4=BF=AE=E5=A4=8D=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A8=E6=80=81=E5=8A=A0=E8=BD=BD=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../form-designer/form-widget/field-widget/fieldMixin.js | 8 +++----- src/utils/config.js | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 162b1f2..cb7478d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "variant-form", - "version": "2.2.1", + "version": "2.2.2", "private": false, "scripts": { "serve": "vue-cli-service serve --open src/main.js", diff --git a/src/components/form-designer/form-widget/field-widget/fieldMixin.js b/src/components/form-designer/form-widget/field-widget/fieldMixin.js index 2008d50..b4731ee 100644 --- a/src/components/form-designer/form-widget/field-widget/fieldMixin.js +++ b/src/components/form-designer/form-widget/field-widget/fieldMixin.js @@ -162,14 +162,12 @@ export default { if ((this.field.type === 'radio') || (this.field.type === 'checkbox') || (this.field.type === 'select') || (this.field.type === 'cascader')) { - if (!!this.globalOptionData && this.globalOptionData.hasOwnProperty(this.field.options.name)) { + const newOptionItems = this.getOptionData() + if (!!newOptionItems && newOptionItems.hasOwnProperty(this.field.options.name)) { if (!!keepSelected) { - //this.reloadOptions(this.globalOptionData[this.field.options.name]) /* 异步更新option-data之后不能获取到最新值, - // 以下改用provide的getOptionData()方法 */ - const newOptionItems = this.getOptionData() this.reloadOptions(newOptionItems[this.field.options.name]) } else { - this.loadOptions( this.globalOptionData[this.field.options.name] ) + this.loadOptions(newOptionItems[this.field.options.name]) } } } diff --git a/src/utils/config.js b/src/utils/config.js index 3569bf5..a0b1c36 100644 --- a/src/utils/config.js +++ b/src/utils/config.js @@ -8,7 +8,7 @@ export const DESIGNER_OPTIONS = { } -export const VARIANT_FORM_VERSION = '2.2.1' +export const VARIANT_FORM_VERSION = '2.2.2' //export const MOCK_CASE_URL = 'https://www.fastmock.site/mock/2de212e0dc4b8e0885fea44ab9f2e1d0/vform/' export const MOCK_CASE_URL = 'https://ks3-cn-beijing.ksyuncs.com/vform-static/vcase/'