mirror of
https://github.com/501351981/vue-office.git
synced 2025-06-15 07:00:00 +08:00
15 lines
471 B
JavaScript
15 lines
471 B
JavaScript
const { switchVersion, loadModule } = require('./utils')
|
|
const Vue = loadModule('vue')
|
|
if (!Vue || typeof Vue.version !== 'string') {
|
|
console.warn(
|
|
'[vue-office] Vue is not found. Please run "npm install vue" to install.'
|
|
)
|
|
} else if (Vue.version.startsWith('2.')) {
|
|
switchVersion(2)
|
|
} else if (Vue.version.startsWith('3.')) {
|
|
switchVersion(3)
|
|
} else {
|
|
console.warn(
|
|
`[vue-office] Vue version v${Vue.version} is not supported.`
|
|
)
|
|
} |