mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-10-25 10:05:25 +00:00
init
This commit is contained in:
12
template/src/popup/index.js
Normal file
12
template/src/popup/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import Vue from 'vue'
|
||||
import root from './root.vue'
|
||||
import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(ElementUI)
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#root',
|
||||
render: h => h(root)
|
||||
})
|
||||
23
template/src/popup/root.vue
Normal file
23
template/src/popup/root.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template lang="pug">
|
||||
div
|
||||
el-button(type="primary" @click="tab") New tab
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
}),
|
||||
computed: { },
|
||||
created () { },
|
||||
mounted () { },
|
||||
methods: {
|
||||
tab () {
|
||||
chrome.tabs.create({ url: 'pages/app.html' })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
div {
|
||||
color: blue
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user