init
This commit is contained in:
32
node_modules/vue-demi/lib/index.cjs
generated
vendored
Normal file
32
node_modules/vue-demi/lib/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
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 = () => !!VueCompositionAPI.getCurrentInstance()
|
33
node_modules/vue-demi/lib/index.d.ts
generated
vendored
Normal file
33
node_modules/vue-demi/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import Vue from 'vue'
|
||||
import type { PluginFunction, PluginObject } from 'vue'
|
||||
declare const isVue2: boolean
|
||||
declare const isVue3: boolean
|
||||
declare const Vue2: typeof Vue | undefined
|
||||
declare const version: string
|
||||
declare const install: (vue?: typeof Vue) => void
|
||||
/**
|
||||
* @deprecated To avoid bringing in all the tree-shakable modules, this API has been deprecated. Use `Vue2` or named exports instead.
|
||||
* Refer to https://github.com/vueuse/vue-demi/issues/41
|
||||
*/
|
||||
declare const V: typeof Vue
|
||||
|
||||
/**
|
||||
* DebuggerEvent is a Vue 3 development only feature. This type cannot exist in Vue 2.
|
||||
*/
|
||||
export declare type DebuggerEvent = never
|
||||
|
||||
// accept no generic because Vue 3 doesn't accept any
|
||||
// https://github.com/vuejs/vue-next/pull/2758/
|
||||
export declare type Plugin = PluginObject<any> | PluginFunction<any>
|
||||
export type { VNode } from 'vue'
|
||||
export * from '@vue/composition-api'
|
||||
export {
|
||||
V as Vue,
|
||||
Vue2,
|
||||
isVue2,
|
||||
isVue3,
|
||||
version,
|
||||
install,
|
||||
}
|
||||
|
||||
export declare function hasInjectionContext(): boolean
|
115
node_modules/vue-demi/lib/index.iife.js
generated
vendored
Normal file
115
node_modules/vue-demi/lib/index.iife.js
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
||||
if (VueDemi.install) {
|
||||
return VueDemi
|
||||
}
|
||||
if (!Vue) {
|
||||
console.error('[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.')
|
||||
return VueDemi
|
||||
}
|
||||
|
||||
// Vue 2.7
|
||||
if (Vue.version.slice(0, 4) === '2.7.') {
|
||||
for (var key in Vue) {
|
||||
VueDemi[key] = Vue[key]
|
||||
}
|
||||
VueDemi.isVue2 = true
|
||||
VueDemi.isVue3 = false
|
||||
VueDemi.install = function () {}
|
||||
VueDemi.Vue = Vue
|
||||
VueDemi.Vue2 = Vue
|
||||
VueDemi.version = Vue.version
|
||||
VueDemi.warn = Vue.util.warn
|
||||
VueDemi.hasInjectionContext = () => !!VueDemi.getCurrentInstance()
|
||||
function createApp(rootComponent, rootProps) {
|
||||
var vm
|
||||
var provide = {}
|
||||
var app = {
|
||||
config: Vue.config,
|
||||
use: Vue.use.bind(Vue),
|
||||
mixin: Vue.mixin.bind(Vue),
|
||||
component: Vue.component.bind(Vue),
|
||||
provide: function (key, value) {
|
||||
provide[key] = value
|
||||
return this
|
||||
},
|
||||
directive: function (name, dir) {
|
||||
if (dir) {
|
||||
Vue.directive(name, dir)
|
||||
return app
|
||||
} else {
|
||||
return Vue.directive(name)
|
||||
}
|
||||
},
|
||||
mount: function (el, hydrating) {
|
||||
if (!vm) {
|
||||
vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))
|
||||
vm.$mount(el, hydrating)
|
||||
return vm
|
||||
} else {
|
||||
return vm
|
||||
}
|
||||
},
|
||||
unmount: function () {
|
||||
if (vm) {
|
||||
vm.$destroy()
|
||||
vm = undefined
|
||||
}
|
||||
},
|
||||
}
|
||||
return app
|
||||
}
|
||||
VueDemi.createApp = createApp
|
||||
}
|
||||
// Vue 2.6.x
|
||||
else if (Vue.version.slice(0, 2) === '2.') {
|
||||
if (VueCompositionAPI) {
|
||||
for (var key in VueCompositionAPI) {
|
||||
VueDemi[key] = VueCompositionAPI[key]
|
||||
}
|
||||
VueDemi.isVue2 = true
|
||||
VueDemi.isVue3 = false
|
||||
VueDemi.install = function () {}
|
||||
VueDemi.Vue = Vue
|
||||
VueDemi.Vue2 = Vue
|
||||
VueDemi.version = Vue.version
|
||||
VueDemi.hasInjectionContext = () => !!VueDemi.getCurrentInstance()
|
||||
} else {
|
||||
console.error('[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.')
|
||||
}
|
||||
}
|
||||
// Vue 3
|
||||
else if (Vue.version.slice(0, 2) === '3.') {
|
||||
for (var key in Vue) {
|
||||
VueDemi[key] = Vue[key]
|
||||
}
|
||||
VueDemi.isVue2 = false
|
||||
VueDemi.isVue3 = true
|
||||
VueDemi.install = function () {}
|
||||
VueDemi.Vue = Vue
|
||||
VueDemi.Vue2 = undefined
|
||||
VueDemi.version = Vue.version
|
||||
VueDemi.set = function (target, key, val) {
|
||||
if (Array.isArray(target)) {
|
||||
target.length = Math.max(target.length, key)
|
||||
target.splice(key, 1, val)
|
||||
return val
|
||||
}
|
||||
target[key] = val
|
||||
return val
|
||||
}
|
||||
VueDemi.del = function (target, key) {
|
||||
if (Array.isArray(target)) {
|
||||
target.splice(key, 1)
|
||||
return
|
||||
}
|
||||
delete target[key]
|
||||
}
|
||||
} else {
|
||||
console.error('[vue-demi] Vue version ' + Vue.version + ' is unsupported.')
|
||||
}
|
||||
return VueDemi
|
||||
})(
|
||||
(this.VueDemi = this.VueDemi || (typeof VueDemi !== 'undefined' ? VueDemi : {})),
|
||||
this.Vue || (typeof Vue !== 'undefined' ? Vue : undefined),
|
||||
this.VueCompositionAPI || (typeof VueCompositionAPI !== 'undefined' ? VueCompositionAPI : undefined)
|
||||
);
|
49
node_modules/vue-demi/lib/index.mjs
generated
vendored
Normal file
49
node_modules/vue-demi/lib/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import Vue from 'vue'
|
||||
import VueCompositionAPI, { getCurrentInstance } from '@vue/composition-api/dist/vue-composition-api.mjs'
|
||||
|
||||
function install(_vue) {
|
||||
_vue = _vue || Vue
|
||||
if (_vue && !_vue['__composition_api_installed__'])
|
||||
_vue.use(VueCompositionAPI)
|
||||
}
|
||||
|
||||
install(Vue)
|
||||
|
||||
var isVue2 = true
|
||||
var isVue3 = false
|
||||
var Vue2 = Vue
|
||||
var version = Vue.version
|
||||
|
||||
/**VCA-EXPORTS**/
|
||||
export * from '@vue/composition-api/dist/vue-composition-api.mjs'
|
||||
/**VCA-EXPORTS**/
|
||||
|
||||
export {
|
||||
Vue,
|
||||
Vue2,
|
||||
isVue2,
|
||||
isVue3,
|
||||
version,
|
||||
install,
|
||||
}
|
||||
|
||||
|
||||
// Vue 3 components mock
|
||||
function createMockComponent(name) {
|
||||
return {
|
||||
setup() {
|
||||
throw new Error('[vue-demi] ' + name + ' is not supported in Vue 2. It\'s provided to avoid compiler errors.')
|
||||
}
|
||||
}
|
||||
}
|
||||
export var Fragment = /*#__PURE__*/ createMockComponent('Fragment')
|
||||
export var Transition = /*#__PURE__*/ createMockComponent('Transition')
|
||||
export var TransitionGroup = /*#__PURE__*/ createMockComponent('TransitionGroup')
|
||||
export var Teleport = /*#__PURE__*/ createMockComponent('Teleport')
|
||||
export var Suspense = /*#__PURE__*/ createMockComponent('Suspense')
|
||||
export var KeepAlive = /*#__PURE__*/ createMockComponent('KeepAlive')
|
||||
|
||||
// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()
|
||||
export function hasInjectionContext() {
|
||||
return !!getCurrentInstance()
|
||||
}
|
58
node_modules/vue-demi/lib/v2.7/index.cjs
generated
vendored
Normal file
58
node_modules/vue-demi/lib/v2.7/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
var VueModule = require('vue')
|
||||
|
||||
// get the real Vue https://github.com/vueuse/vue-demi/issues/192
|
||||
var Vue = VueModule.default || VueModule
|
||||
|
||||
exports.Vue = Vue
|
||||
exports.Vue2 = Vue
|
||||
exports.isVue2 = true
|
||||
exports.isVue3 = false
|
||||
exports.install = function () {}
|
||||
exports.warn = Vue.util.warn
|
||||
|
||||
// createApp polyfill
|
||||
exports.createApp = function (rootComponent, rootProps) {
|
||||
var vm
|
||||
var provide = {}
|
||||
var app = {
|
||||
config: Vue.config,
|
||||
use: Vue.use.bind(Vue),
|
||||
mixin: Vue.mixin.bind(Vue),
|
||||
component: Vue.component.bind(Vue),
|
||||
provide: function (key, value) {
|
||||
provide[key] = value
|
||||
return this
|
||||
},
|
||||
directive: function (name, dir) {
|
||||
if (dir) {
|
||||
Vue.directive(name, dir)
|
||||
return app
|
||||
} else {
|
||||
return Vue.directive(name)
|
||||
}
|
||||
},
|
||||
mount: function (el, hydrating) {
|
||||
if (!vm) {
|
||||
vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))
|
||||
vm.$mount(el, hydrating)
|
||||
return vm
|
||||
} else {
|
||||
return vm
|
||||
}
|
||||
},
|
||||
unmount: function () {
|
||||
if (vm) {
|
||||
vm.$destroy()
|
||||
vm = undefined
|
||||
}
|
||||
},
|
||||
}
|
||||
return app
|
||||
}
|
||||
|
||||
Object.keys(VueModule).forEach(function (key) {
|
||||
exports[key] = VueModule[key]
|
||||
})
|
||||
|
||||
// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()
|
||||
exports.hasInjectionContext = () => !!VueModule.getCurrentInstance()
|
38
node_modules/vue-demi/lib/v2.7/index.d.ts
generated
vendored
Normal file
38
node_modules/vue-demi/lib/v2.7/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import Vue from 'vue'
|
||||
import type { PluginFunction, PluginObject, VueConstructor, Directive, InjectionKey, Component } from 'vue'
|
||||
|
||||
declare const isVue2: boolean
|
||||
declare const isVue3: boolean
|
||||
declare const Vue2: typeof Vue | undefined
|
||||
declare const version: string
|
||||
declare const install: (vue?: typeof Vue) => void
|
||||
export declare function warn(msg: string, vm?: Component | null): void
|
||||
/**
|
||||
* @deprecated To avoid bringing in all the tree-shakable modules, this API has been deprecated. Use `Vue2` or named exports instead.
|
||||
* Refer to https://github.com/vueuse/vue-demi/issues/41
|
||||
*/
|
||||
declare const V: typeof Vue
|
||||
|
||||
// accept no generic because Vue 3 doesn't accept any
|
||||
// https://github.com/vuejs/vue-next/pull/2758/
|
||||
export declare type Plugin = PluginObject<any> | PluginFunction<any>
|
||||
export type { VNode } from 'vue'
|
||||
export * from 'vue'
|
||||
export { V as Vue, Vue2, isVue2, isVue3, version, install }
|
||||
|
||||
// #region createApp polyfill
|
||||
export interface App<T = any> {
|
||||
config: VueConstructor['config']
|
||||
use: VueConstructor['use']
|
||||
mixin: VueConstructor['mixin']
|
||||
component: VueConstructor['component']
|
||||
directive(name: string): Directive | undefined
|
||||
directive(name: string, directive: Directive): this
|
||||
provide<T>(key: InjectionKey<T> | string, value: T): this
|
||||
mount: Vue['$mount']
|
||||
unmount: Vue['$destroy']
|
||||
}
|
||||
export declare function createApp(rootComponent: any, rootProps?: any): App
|
||||
// #endregion
|
||||
|
||||
export declare function hasInjectionContext(): boolean
|
80
node_modules/vue-demi/lib/v2.7/index.mjs
generated
vendored
Normal file
80
node_modules/vue-demi/lib/v2.7/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
import Vue from 'vue'
|
||||
import { getCurrentInstance } from 'vue'
|
||||
|
||||
var isVue2 = true
|
||||
var isVue3 = false
|
||||
var Vue2 = Vue
|
||||
var warn = Vue.util.warn
|
||||
|
||||
function install() {}
|
||||
|
||||
// createApp polyfill
|
||||
export function createApp(rootComponent, rootProps) {
|
||||
var vm
|
||||
var provide = {}
|
||||
var app = {
|
||||
config: Vue.config,
|
||||
use: Vue.use.bind(Vue),
|
||||
mixin: Vue.mixin.bind(Vue),
|
||||
component: Vue.component.bind(Vue),
|
||||
provide: function (key, value) {
|
||||
provide[key] = value
|
||||
return this
|
||||
},
|
||||
directive: function (name, dir) {
|
||||
if (dir) {
|
||||
Vue.directive(name, dir)
|
||||
return app
|
||||
} else {
|
||||
return Vue.directive(name)
|
||||
}
|
||||
},
|
||||
mount: function (el, hydrating) {
|
||||
if (!vm) {
|
||||
vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))
|
||||
vm.$mount(el, hydrating)
|
||||
return vm
|
||||
} else {
|
||||
return vm
|
||||
}
|
||||
},
|
||||
unmount: function () {
|
||||
if (vm) {
|
||||
vm.$destroy()
|
||||
vm = undefined
|
||||
}
|
||||
},
|
||||
}
|
||||
return app
|
||||
}
|
||||
|
||||
export {
|
||||
Vue,
|
||||
Vue2,
|
||||
isVue2,
|
||||
isVue3,
|
||||
install,
|
||||
warn
|
||||
}
|
||||
|
||||
// Vue 3 components mock
|
||||
function createMockComponent(name) {
|
||||
return {
|
||||
setup() {
|
||||
throw new Error('[vue-demi] ' + name + ' is not supported in Vue 2. It\'s provided to avoid compiler errors.')
|
||||
}
|
||||
}
|
||||
}
|
||||
export var Fragment = /*#__PURE__*/ createMockComponent('Fragment')
|
||||
export var Transition = /*#__PURE__*/ createMockComponent('Transition')
|
||||
export var TransitionGroup = /*#__PURE__*/ createMockComponent('TransitionGroup')
|
||||
export var Teleport = /*#__PURE__*/ createMockComponent('Teleport')
|
||||
export var Suspense = /*#__PURE__*/ createMockComponent('Suspense')
|
||||
export var KeepAlive = /*#__PURE__*/ createMockComponent('KeepAlive')
|
||||
|
||||
export * from 'vue'
|
||||
|
||||
// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()
|
||||
export function hasInjectionContext() {
|
||||
return !!getCurrentInstance()
|
||||
}
|
32
node_modules/vue-demi/lib/v2/index.cjs
generated
vendored
Normal file
32
node_modules/vue-demi/lib/v2/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
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 = () => !!VueCompositionAPI.getCurrentInstance()
|
33
node_modules/vue-demi/lib/v2/index.d.ts
generated
vendored
Normal file
33
node_modules/vue-demi/lib/v2/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import Vue from 'vue'
|
||||
import type { PluginFunction, PluginObject } from 'vue'
|
||||
declare const isVue2: boolean
|
||||
declare const isVue3: boolean
|
||||
declare const Vue2: typeof Vue | undefined
|
||||
declare const version: string
|
||||
declare const install: (vue?: typeof Vue) => void
|
||||
/**
|
||||
* @deprecated To avoid bringing in all the tree-shakable modules, this API has been deprecated. Use `Vue2` or named exports instead.
|
||||
* Refer to https://github.com/vueuse/vue-demi/issues/41
|
||||
*/
|
||||
declare const V: typeof Vue
|
||||
|
||||
/**
|
||||
* DebuggerEvent is a Vue 3 development only feature. This type cannot exist in Vue 2.
|
||||
*/
|
||||
export declare type DebuggerEvent = never
|
||||
|
||||
// accept no generic because Vue 3 doesn't accept any
|
||||
// https://github.com/vuejs/vue-next/pull/2758/
|
||||
export declare type Plugin = PluginObject<any> | PluginFunction<any>
|
||||
export type { VNode } from 'vue'
|
||||
export * from '@vue/composition-api'
|
||||
export {
|
||||
V as Vue,
|
||||
Vue2,
|
||||
isVue2,
|
||||
isVue3,
|
||||
version,
|
||||
install,
|
||||
}
|
||||
|
||||
export declare function hasInjectionContext(): boolean
|
49
node_modules/vue-demi/lib/v2/index.mjs
generated
vendored
Normal file
49
node_modules/vue-demi/lib/v2/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import Vue from 'vue'
|
||||
import VueCompositionAPI, { getCurrentInstance } from '@vue/composition-api/dist/vue-composition-api.mjs'
|
||||
|
||||
function install(_vue) {
|
||||
_vue = _vue || Vue
|
||||
if (_vue && !_vue['__composition_api_installed__'])
|
||||
_vue.use(VueCompositionAPI)
|
||||
}
|
||||
|
||||
install(Vue)
|
||||
|
||||
var isVue2 = true
|
||||
var isVue3 = false
|
||||
var Vue2 = Vue
|
||||
var version = Vue.version
|
||||
|
||||
/**VCA-EXPORTS**/
|
||||
export * from '@vue/composition-api/dist/vue-composition-api.mjs'
|
||||
/**VCA-EXPORTS**/
|
||||
|
||||
export {
|
||||
Vue,
|
||||
Vue2,
|
||||
isVue2,
|
||||
isVue3,
|
||||
version,
|
||||
install,
|
||||
}
|
||||
|
||||
|
||||
// Vue 3 components mock
|
||||
function createMockComponent(name) {
|
||||
return {
|
||||
setup() {
|
||||
throw new Error('[vue-demi] ' + name + ' is not supported in Vue 2. It\'s provided to avoid compiler errors.')
|
||||
}
|
||||
}
|
||||
}
|
||||
export var Fragment = /*#__PURE__*/ createMockComponent('Fragment')
|
||||
export var Transition = /*#__PURE__*/ createMockComponent('Transition')
|
||||
export var TransitionGroup = /*#__PURE__*/ createMockComponent('TransitionGroup')
|
||||
export var Teleport = /*#__PURE__*/ createMockComponent('Teleport')
|
||||
export var Suspense = /*#__PURE__*/ createMockComponent('Suspense')
|
||||
export var KeepAlive = /*#__PURE__*/ createMockComponent('KeepAlive')
|
||||
|
||||
// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()
|
||||
export function hasInjectionContext() {
|
||||
return !!getCurrentInstance()
|
||||
}
|
29
node_modules/vue-demi/lib/v3/index.cjs
generated
vendored
Normal file
29
node_modules/vue-demi/lib/v3/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
var Vue = require('vue')
|
||||
|
||||
Object.keys(Vue).forEach(function(key) {
|
||||
exports[key] = Vue[key]
|
||||
})
|
||||
|
||||
exports.set = function(target, key, val) {
|
||||
if (Array.isArray(target)) {
|
||||
target.length = Math.max(target.length, key)
|
||||
target.splice(key, 1, val)
|
||||
return val
|
||||
}
|
||||
target[key] = val
|
||||
return val
|
||||
}
|
||||
|
||||
exports.del = function(target, key) {
|
||||
if (Array.isArray(target)) {
|
||||
target.splice(key, 1)
|
||||
return
|
||||
}
|
||||
delete target[key]
|
||||
}
|
||||
|
||||
exports.Vue = Vue
|
||||
exports.Vue2 = undefined
|
||||
exports.isVue2 = false
|
||||
exports.isVue3 = true
|
||||
exports.install = function(){}
|
22
node_modules/vue-demi/lib/v3/index.d.ts
generated
vendored
Normal file
22
node_modules/vue-demi/lib/v3/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as Vue from 'vue'
|
||||
declare const isVue2: boolean
|
||||
declare const isVue3: boolean
|
||||
declare const Vue2: any
|
||||
declare const install: (vue?: any) => void
|
||||
/**
|
||||
* @deprecated To avoid bringing in all the tree-shakable modules, this API has been deprecated. Use `Vue2` or named exports instead.
|
||||
* Refer to https://github.com/vueuse/vue-demi/issues/41
|
||||
*/
|
||||
declare const V: typeof Vue
|
||||
|
||||
export function set<T>(target: any, key: any, val: T): T
|
||||
export function del(target: any, key: any): void
|
||||
|
||||
export * from 'vue'
|
||||
export {
|
||||
V as Vue,
|
||||
Vue2,
|
||||
isVue2,
|
||||
isVue3,
|
||||
install,
|
||||
}
|
34
node_modules/vue-demi/lib/v3/index.mjs
generated
vendored
Normal file
34
node_modules/vue-demi/lib/v3/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import * as Vue from 'vue'
|
||||
|
||||
var isVue2 = false
|
||||
var isVue3 = true
|
||||
var Vue2 = undefined
|
||||
|
||||
function install() {}
|
||||
|
||||
export function set(target, key, val) {
|
||||
if (Array.isArray(target)) {
|
||||
target.length = Math.max(target.length, key)
|
||||
target.splice(key, 1, val)
|
||||
return val
|
||||
}
|
||||
target[key] = val
|
||||
return val
|
||||
}
|
||||
|
||||
export function del(target, key) {
|
||||
if (Array.isArray(target)) {
|
||||
target.splice(key, 1)
|
||||
return
|
||||
}
|
||||
delete target[key]
|
||||
}
|
||||
|
||||
export * from 'vue'
|
||||
export {
|
||||
Vue,
|
||||
Vue2,
|
||||
isVue2,
|
||||
isVue3,
|
||||
install,
|
||||
}
|
Reference in New Issue
Block a user