New Project
All checks were successful
BeijingMediaOfficialWebsite-ZhaoJian/BeijingMediaOfficialWebsite-ZhaoJian/pipeline/head This commit looks good
All checks were successful
BeijingMediaOfficialWebsite-ZhaoJian/BeijingMediaOfficialWebsite-ZhaoJian/pipeline/head This commit looks good
This commit is contained in:
400
web/node_modules/vite-plugin-vue-inspector/src/Overlay.vue
generated
vendored
Normal file
400
web/node_modules/vite-plugin-vue-inspector/src/Overlay.vue
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
44
web/node_modules/vite-plugin-vue-inspector/src/load.js
generated
vendored
Normal file
44
web/node_modules/vite-plugin-vue-inspector/src/load.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/* eslint-disable new-cap */
|
||||
|
||||
import * as Vue from 'vue'
|
||||
import App from 'virtual:vue-inspector-path:Overlay.vue'
|
||||
import inspectorOptions from 'virtual:vue-inspector-options'
|
||||
const CONTAINER_ID = 'vue-inspector-container'
|
||||
|
||||
function createInspectorContainer() {
|
||||
if (document.getElementById(CONTAINER_ID) != null)
|
||||
throw new Error('vueInspectorContainer element already exists')
|
||||
|
||||
const el = document.createElement('div')
|
||||
el.setAttribute('id', CONTAINER_ID)
|
||||
document.getElementsByTagName('body')[0].appendChild(el)
|
||||
return el
|
||||
}
|
||||
|
||||
function load() {
|
||||
const isClient = typeof window !== 'undefined'
|
||||
if (!isClient)
|
||||
return
|
||||
createInspectorContainer()
|
||||
const { vue } = inspectorOptions
|
||||
// vue 2/3 compatibility
|
||||
vue === 3
|
||||
? Vue.createApp({
|
||||
render: () => Vue.h(App),
|
||||
devtools: {
|
||||
hide: true,
|
||||
},
|
||||
}).mount(`#${CONTAINER_ID}`)
|
||||
: new Vue.default({
|
||||
render: h => h(App),
|
||||
devtools: {
|
||||
hide: true,
|
||||
},
|
||||
}).$mount(`#${CONTAINER_ID}`)
|
||||
}
|
||||
|
||||
if (inspectorOptions.lazyLoad)
|
||||
setTimeout(load, inspectorOptions.lazyLoad)
|
||||
|
||||
else
|
||||
load()
|
||||
Reference in New Issue
Block a user