import js as a configuration file in vue, but the imported module will not be reloaded when switching between English and Chinese
774274680 opened this issue · 1 comments
774274680 commented
Clear and concise description of the problem
test.vue
<template>
<div>
<el-pagination
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="400"
>
</el-pagination>
<button @click="changeLangue">点击切换语言</button>
<my-form v-bind="formConfig" v-model="formData"></my-form>
</div>
</template>
<script>
import formConfig from './form-config'
export default {
data() {
return {
formConfig,
}
},
</script>
form-config.js
import i18n from '@/language'
const formConfig = {
formItems: [
{
type: 'input',
prop: 'name',
label: i18n.t('name'),
placeholder: i18n.t('nameRequire'),
},
],
labelWidth: '120px',
}
export default formConfig
Suggested solution
js
Alternative
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
appleqzw commented
I'm having the same problem, is there a solution at the moment?