版本更新到2.2.2:

1. 修复选项数据动态加载可能无效的问题。
master
vdpAdmin 2022-02-21 14:53:25 +08:00
parent 844b78e975
commit 9bf3f4ed1b
3 changed files with 5 additions and 7 deletions

View File

@ -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",

View File

@ -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)) {
if (!!keepSelected) {
//this.reloadOptions(this.globalOptionData[this.field.options.name]) /* 异步更新option-data之后不能获取到最新值
// 以下改用provide的getOptionData()方法 */
const newOptionItems = this.getOptionData()
if (!!newOptionItems && newOptionItems.hasOwnProperty(this.field.options.name)) {
if (!!keepSelected) {
this.reloadOptions(newOptionItems[this.field.options.name])
} else {
this.loadOptions( this.globalOptionData[this.field.options.name] )
this.loadOptions(newOptionItems[this.field.options.name])
}
}
}

View File

@ -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/'