通过dynamic-imports
This commit is contained in:
parent
2aa3ff2148
commit
57c43c21c0
|
@ -72,8 +72,8 @@ export default {
|
||||||
this.searchPool = this.generateRoutes(this.routes)
|
this.searchPool = this.generateRoutes(this.routes)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addPinyinField(list) {
|
async addPinyinField(list) {
|
||||||
const pinyin = require('pinyin')
|
const { default: pinyin } = await import('pinyin')
|
||||||
if (Array.isArray(list)) {
|
if (Array.isArray(list)) {
|
||||||
list.forEach(element => {
|
list.forEach(element => {
|
||||||
const title = element.title
|
const title = element.title
|
||||||
|
|
Loading…
Reference in New Issue