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