From 54e047911e29603727cb506e63083ebfc329d9af Mon Sep 17 00:00:00 2001
From: vdpAdmin <vdpadmin@163.com>
Date: Thu, 19 May 2022 09:39:55 +0800
Subject: [PATCH] =?UTF-8?q?1.=20=E5=A2=9E=E5=8A=A0=E8=AF=AD=E8=A8=80?=
 =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA=E5=BB=B6?=
 =?UTF-8?q?=E6=97=B6=EF=BC=9B=202.=20=E4=BF=AE=E5=A4=8DSFC=E7=94=9F?=
 =?UTF-8?q?=E6=88=90=E5=B0=8Fbug=EF=BC=9B=203.=20=E4=BF=AE=E5=A4=8D?=
 =?UTF-8?q?=E5=BC=82=E6=AD=A5=E5=8A=A0=E8=BD=BD=E8=A1=A8=E5=8D=95=E6=97=B6?=
 =?UTF-8?q?=E5=85=A8=E5=B1=80=E5=87=BD=E6=95=B0=E6=97=A0=E6=B3=95=E6=8F=90?=
 =?UTF-8?q?=E5=89=8D=E5=8A=A0=E8=BD=BD=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

---
 README.md                              | 6 ++++++
 src/components/form-designer/index.vue | 2 +-
 src/components/form-render/index.vue   | 9 ++++++---
 src/utils/sfc-generator.js             | 2 +-
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 18e27d3..0364be9 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,10 @@
 [在线Demo](http://120.92.142.115/)
 
 
+### 立即体验VForm Pro高级版(提供商业支持)
+[Pro Demo](http://120.92.142.115/pro)
+
+
 ### Vue 3正式版已发布
 [立即进入](https://gitee.com/vdpadmin/variant-form3-vite)
 
@@ -180,6 +184,8 @@ VS Code插件:<a href="https://www.vform666.com/pages/plugin/" target="_blank"
 
 更新日志:<a href="https://www.vform666.com/changelog.html" target="_blank">https://www.vform666.com/changelog.html</a>
 
+订阅Pro版:<a href="https://www.vform666.com/pages/pro/" target="_blank">https://www.vform666.com/pages/pro/</a>
+
 技术交流群:扫如下二维码加群
 
 ![image](https://vform2022.ks3-cn-beijing.ksyuncs.com/vchat_qrcode.png)
diff --git a/src/components/form-designer/index.vue b/src/components/form-designer/index.vue
index 84f7d73..4491a56 100644
--- a/src/components/form-designer/index.vue
+++ b/src/components/form-designer/index.vue
@@ -15,7 +15,7 @@
         <img src="../../assets/vform-logo.png" @click="openHome">
         <span class="bold">VForm</span> {{i18nt('application.productTitle')}} <span class="version-span">Ver {{vFormVersion}}</span></div>
       <div class="float-right external-link">
-        <el-dropdown v-if="showLink('languageMenu')" @command="handleLanguageChanged">
+        <el-dropdown v-if="showLink('languageMenu')" :hide-timeout="2000" @command="handleLanguageChanged">
           <span class="el-dropdown-link">{{curLangName}}<i class="el-icon-arrow-down el-icon--right"></i></span>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item command="zh-CN">{{i18nt('application.zh-CN')}}</el-dropdown-item>
diff --git a/src/components/form-render/index.vue b/src/components/form-render/index.vue
index 16bb813..8aa6baf 100644
--- a/src/components/form-render/index.vue
+++ b/src/components/form-render/index.vue
@@ -154,9 +154,11 @@
       this.handleOnMounted()
     },
     methods: {
-      initFormObject() {
+      initFormObject(insertHtmlCodeFlag = true) {
         this.formId = 'vfRender' + generateId()
-        this.insertCustomStyleAndScriptNode()
+        if (!!insertHtmlCodeFlag) {
+          this.insertCustomStyleAndScriptNode()
+        }
         this.addFieldChangeEventHandler()
         this.addFieldValidateEventHandler()
         this.registerFormToRefList()
@@ -422,8 +424,9 @@
             this._provided.formConfig = newFormJsonObj.formConfig  //强制更新provide的formConfig对象
             this.$set(this.formJsonObj, 'widgetList', newFormJsonObj.widgetList)
 
+            this.insertCustomStyleAndScriptNode()  /* 必须先插入表单全局函数,否则VForm内部引用全局函数会报错!!! */
             this.$nextTick(() => {
-              this.initFormObject()
+              this.initFormObject(false)
               this.handleOnMounted()
             })
           } else {
diff --git a/src/utils/sfc-generator.js b/src/utils/sfc-generator.js
index 8476947..314d055 100644
--- a/src/utils/sfc-generator.js
+++ b/src/utils/sfc-generator.js
@@ -210,7 +210,7 @@ function buildCheckboxChildren(widget, formConfig) {
 function buildSelectChildren(widget, formConfig) {
   let wop = widget.options
   const childTag = 'el-option'
-  return `<${childTag} v-for="(item, index) in ${wop.name}Options" :key="index" :label="item.value"
+  return `<${childTag} v-for="(item, index) in ${wop.name}Options" :key="index" :label="item.label"
           :value="item.value" :disabled="item.disabled"></${childTag}>`
 }