chore: remove vue-router (#235)

This commit is contained in:
YangQi 2023-07-29 17:00:48 +08:00 committed by GitHub
parent 6fde1c171a
commit ae9f654d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 47 deletions

6
package-lock.json generated
View File

@ -25,7 +25,6 @@
"qiniu-js": "^3.4.1", "qiniu-js": "^3.4.1",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"vue": "^2.7.14", "vue": "^2.7.14",
"vue-router": "^3.5.4",
"vuex": "^3.6.2" "vuex": "^3.6.2"
}, },
"devDependencies": { "devDependencies": {
@ -26920,11 +26919,6 @@
"node": ">=4.0.0" "node": ">=4.0.0"
} }
}, },
"node_modules/vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
"integrity": "sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ=="
},
"node_modules/vue-style-loader": { "node_modules/vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",

View File

@ -30,7 +30,6 @@
"qiniu-js": "^3.4.1", "qiniu-js": "^3.4.1",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"vue": "^2.7.14", "vue": "^2.7.14",
"vue-router": "^3.5.4",
"vuex": "^3.6.2" "vuex": "^3.6.2"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,9 +1,13 @@
<template> <template>
<div id="app"> <div id="app">
<router-view></router-view> <codemirror-editor />
</div> </div>
</template> </template>
<script setup>
import CodemirrorEditor from '@/views/CodemirrorEditor.vue'
</script>
<style lang="less"> <style lang="less">
// 仿 uniapp // 仿 uniapp
html, html,

View File

@ -13,7 +13,6 @@ import 'codemirror/addon/edit/matchbrackets'
import 'codemirror/addon/selection/active-line' import 'codemirror/addon/selection/active-line'
import 'codemirror/addon/hint/show-hint.js' import 'codemirror/addon/hint/show-hint.js'
import 'codemirror/addon/hint/css-hint.js' import 'codemirror/addon/hint/css-hint.js'
import router from './router'
Vue.use(ElementUI) Vue.use(ElementUI)
@ -22,7 +21,6 @@ Vue.config.productionTip = false
App.mpType = `app` App.mpType = `app`
const app = new Vue({ const app = new Vue({
router,
store, store,
...App, ...App,
}) })

View File

@ -1,21 +0,0 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '@/views'
Vue.use(VueRouter)
const routes = [
{
path: `/`,
name: `index`,
component: index,
},
]
const router = new VueRouter({
mode: `history`,
base: process.env.BASE_URL,
routes,
})
export default router

View File

@ -1,16 +0,0 @@
<template>
<codemirror-editor />
</template>
<script>
import CodemirrorEditor from './CodemirrorEditor'
export default {
name: `App`,
components: {
CodemirrorEditor,
},
}
</script>
<style scoped></style>