mirror of
				https://github.com/vform666/variant-form3-vite.git
				synced 2025-10-31 16:51:49 +08:00 
			
		
		
		
	修复多语言切换问题。
This commit is contained in:
		| @@ -10,6 +10,7 @@ | |||||||
|     </vue-editor> |     </vue-editor> | ||||||
|     --> |     --> | ||||||
|  |  | ||||||
|  |     <div> | ||||||
|       <quill-editor |       <quill-editor | ||||||
|               v-model:value="fieldModel" |               v-model:value="fieldModel" | ||||||
|               :options="editorOption" |               :options="editorOption" | ||||||
| @@ -17,8 +18,8 @@ | |||||||
|               @blur="handleRichEditorBlurEvent" |               @blur="handleRichEditorBlurEvent" | ||||||
|               @focus="handleRichEditorFocusEvent" |               @focus="handleRichEditorFocusEvent" | ||||||
|               @change="handleRichEditorChangeEvent" |               @change="handleRichEditorChangeEvent" | ||||||
|             style="height: 200px;" |               style="height: 200px;"></quill-editor> | ||||||
|     /> |     </div> | ||||||
|  |  | ||||||
|   </form-item-wrapper> |   </form-item-wrapper> | ||||||
| </template> | </template> | ||||||
| @@ -30,12 +31,12 @@ | |||||||
|   import {deepClone} from "@/utils/util"; |   import {deepClone} from "@/utils/util"; | ||||||
|   import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin"; |   import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin"; | ||||||
|  |  | ||||||
|   //import { Quill, quillEditor } from 'vue3-quill' |   import { Quill, quillEditor } from 'vue3-quill' | ||||||
|   //const modules = import.meta.glob('../../../../../node_modules/vue3-quill/src/index.js') |   //const modules = import.meta.glob('../../../../../node_modules/vue3-quill/src/index.js') | ||||||
|   //console.log('test=====', modules) |   //console.log('test=====', modules) | ||||||
|  |  | ||||||
|   import { QuillEditor } from '@vueup/vue-quill' |   // import { QuillEditor } from '@vueup/vue-quill' | ||||||
|   import '@vueup/vue-quill/dist/vue-quill.snow.css' |   // import '@vueup/vue-quill/dist/vue-quill.snow.css' | ||||||
|  |  | ||||||
|   export default { |   export default { | ||||||
|     name: "rich-editor-widget", |     name: "rich-editor-widget", | ||||||
| @@ -73,9 +74,9 @@ | |||||||
|       // VueEditor: resolve => { //懒加载!! |       // VueEditor: resolve => { //懒加载!! | ||||||
|       //   require(['vue2-editor'], ({VueEditor}) => resolve(VueEditor)) |       //   require(['vue2-editor'], ({VueEditor}) => resolve(VueEditor)) | ||||||
|       // } |       // } | ||||||
|       //quillEditor, |       quillEditor, | ||||||
|  |  | ||||||
|       QuillEditor, |       // QuillEditor, | ||||||
|     }, |     }, | ||||||
|     inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'], |     inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'], | ||||||
|     data() { |     data() { | ||||||
|   | |||||||
| @@ -832,6 +832,7 @@ export const advancedFields = [ | |||||||
|       placeholder: '', |       placeholder: '', | ||||||
|       labelWidth: null, |       labelWidth: null, | ||||||
|       labelHidden: false, |       labelHidden: false, | ||||||
|  |       contentHeight: '200px', | ||||||
|       disabled: false, |       disabled: false, | ||||||
|       hidden: false, |       hidden: false, | ||||||
|       required: false, |       required: false, | ||||||
|   | |||||||
| @@ -37,7 +37,11 @@ const langResources = { | |||||||
| //locale.i18n((key, value) => i18n.t(key, value)) | //locale.i18n((key, value) => i18n.t(key, value)) | ||||||
|  |  | ||||||
| export const changeLocale = function(langName) { | export const changeLocale = function(langName) { | ||||||
|   i18n.locale = langName |   //console.log('11111', i18n.locale ) | ||||||
|  |   //i18n.locale = langName | ||||||
|  |  | ||||||
|  |   i18n.global.locale = langName | ||||||
|  |   //console.log('22222', i18n.locale ) | ||||||
|   localStorage.setItem('v_form_locale', langName) |   localStorage.setItem('v_form_locale', langName) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user