增加语言切换菜单显示延时。

This commit is contained in:
vdpAdmin 2022-05-19 09:36:44 +08:00
parent 75f08c4065
commit fb10ee4ee3
3 changed files with 7 additions and 5 deletions

View File

@ -15,7 +15,7 @@
<img src="../../assets/vform-logo.png" @click="openHome"> <img src="../../assets/vform-logo.png" @click="openHome">
<span class="bold">VForm 3</span> {{i18nt('application.productTitle')}} <span class="version-span">Ver {{vFormVersion}}</span></div> <span class="bold">VForm 3</span> {{i18nt('application.productTitle')}} <span class="version-span">Ver {{vFormVersion}}</span></div>
<div class="float-right external-link"> <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}}<svg-icon icon-class="el-arrow-down" /></span> <span class="el-dropdown-link">{{curLangName}}<svg-icon icon-class="el-arrow-down" /></span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>

View File

@ -152,9 +152,11 @@
this.handleOnMounted() this.handleOnMounted()
}, },
methods: { methods: {
initFormObject() { initFormObject(insertHtmlCodeFlag = true) {
this.formId = 'vfRender' + generateId() this.formId = 'vfRender' + generateId()
if (!!insertHtmlCodeFlag) {
this.insertCustomStyleAndScriptNode() this.insertCustomStyleAndScriptNode()
}
this.addFieldChangeEventHandler() this.addFieldChangeEventHandler()
this.addFieldValidateEventHandler() this.addFieldValidateEventHandler()
this.registerFormToRefList() this.registerFormToRefList()
@ -418,8 +420,9 @@
this.formJsonObj['formConfig'] = newFormJsonObj.formConfig this.formJsonObj['formConfig'] = newFormJsonObj.formConfig
this.formJsonObj['widgetList'] = newFormJsonObj.widgetList this.formJsonObj['widgetList'] = newFormJsonObj.widgetList
this.insertCustomStyleAndScriptNode() /* 必须先插入表单全局函数否则VForm内部引用全局函数会报错 */
this.$nextTick(() => { this.$nextTick(() => {
this.initFormObject() this.initFormObject(false)
this.handleOnMounted() this.handleOnMounted()
}) })
} else { } else {

View File

@ -6,7 +6,6 @@ import 'element-plus/dist/index.css'
import '@/styles/index.scss' import '@/styles/index.scss'
import '@/iconfont/iconfont.css' import '@/iconfont/iconfont.css'
import Draggable from '@/../lib/vuedraggable/dist/vuedraggable.umd.js' import Draggable from '@/../lib/vuedraggable/dist/vuedraggable.umd.js'
//import Draggable from 'vuedraggable'
import {registerIcon} from '@/utils/el-icons' import {registerIcon} from '@/utils/el-icons'
import SvgIcon from '@/components/svg-icon' //svg组件 import SvgIcon from '@/components/svg-icon' //svg组件
import 'virtual:svg-icons-register' import 'virtual:svg-icons-register'