上传代码
This commit is contained in:
34
uniapp04/node_modules/vue-demi/lib/v2/index.cjs
generated
vendored
Normal file
34
uniapp04/node_modules/vue-demi/lib/v2/index.cjs
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
var Vue = require('vue')
|
||||
var VueCompositionAPI = require('@vue/composition-api')
|
||||
|
||||
function install(_vue) {
|
||||
var vueLib = _vue || Vue
|
||||
if (vueLib && 'default' in vueLib) {
|
||||
vueLib = vueLib.default
|
||||
}
|
||||
|
||||
if (vueLib && !vueLib['__composition_api_installed__']) {
|
||||
if (VueCompositionAPI && 'default' in VueCompositionAPI)
|
||||
vueLib.use(VueCompositionAPI.default)
|
||||
else if (VueCompositionAPI)
|
||||
vueLib.use(VueCompositionAPI)
|
||||
}
|
||||
}
|
||||
|
||||
install(Vue)
|
||||
|
||||
Object.keys(VueCompositionAPI).forEach(function(key) {
|
||||
exports[key] = VueCompositionAPI[key]
|
||||
})
|
||||
|
||||
exports.Vue = Vue
|
||||
exports.Vue2 = Vue
|
||||
exports.isVue2 = true
|
||||
exports.isVue3 = false
|
||||
exports.install = install
|
||||
exports.version = Vue.version
|
||||
|
||||
// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()
|
||||
exports.hasInjectionContext = function () {
|
||||
return !!VueCompositionAPI.getCurrentInstance()
|
||||
}
|
Reference in New Issue
Block a user