diff --git a/package.json b/package.json index e114bb8..27352e1 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,12 @@ }, "dependencies": { "core-js": "^3.6.4", + "hammerjs": "^2.0.8", "register-service-worker": "^1.7.1", "vue": "^2.6.11", + "vue-clipboard2": "^0.3.1", "vue-router": "^3.1.6", + "vue-svg-icon": "^1.2.9", "vuex": "^3.1.3" }, "devDependencies": { diff --git a/src/App.vue b/src/App.vue index 3943904..2a67df0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,32 +1,124 @@ diff --git a/src/assets/canary.png b/src/assets/canary.png new file mode 100644 index 0000000..aa32a60 Binary files /dev/null and b/src/assets/canary.png differ diff --git a/src/assets/cherry.png b/src/assets/cherry.png new file mode 100644 index 0000000..8a4d985 Binary files /dev/null and b/src/assets/cherry.png differ diff --git a/src/assets/logo.png b/src/assets/logo.png deleted file mode 100644 index f3d2503..0000000 Binary files a/src/assets/logo.png and /dev/null differ diff --git a/src/assets/title.png b/src/assets/title.png new file mode 100644 index 0000000..a5204c9 Binary files /dev/null and b/src/assets/title.png differ diff --git a/src/assets/tracer.png b/src/assets/tracer.png new file mode 100644 index 0000000..ed310c5 Binary files /dev/null and b/src/assets/tracer.png differ diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index 4ec0c11..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - diff --git a/src/main.js b/src/main.js index d12df39..55b0245 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,27 @@ import './registerServiceWorker' import router from './router' import store from './store' +// icon-loader +import Icon from 'vue-svg-icon/Icon.vue' +Vue.component('icon', Icon); + +// 手势控件 +import VueTouch from 'vue-touch' +Vue.use(VueTouch, { name: 'v-touch' }) + Vue.config.productionTip = false +//px2rem +export function setHtmlFontSize() { + const htmlWidth = document.documentElement.clientWidth || document.body.clientWidth + const htmlDom = document.getElementsByTagName('html')[0] + if (htmlWidth >= 500) htmlDom.style.fontSize = 500 / 10 + 'px' + else htmlDom.style.fontSize = htmlWidth / 10 + 'px' +} +setHtmlFontSize() + +// VueClipboard +import VueClipboard from "vue-clipboard2"; +Vue.use(VueClipboard); new Vue({ router, diff --git a/src/router/index.js b/src/router/index.js index 711f9d9..0d26eb5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,23 +1,33 @@ import Vue from 'vue' import VueRouter from 'vue-router' -import Home from '../views/Home.vue' +import Canary from '../views/Canary.vue' +import Cherry from '../views/Cherry.vue' +import Tracer from '../views/Tracer.vue' Vue.use(VueRouter) const routes = [ { - path: '/', - name: 'Home', - component: Home + path: '/canary', + name: 'Canary', + component: Canary }, { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (about.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') - } + path: '/cherry', + name: 'Cherry', + component: Cherry + }, + { + path: '/tracer', + name: 'Tracer', + component: Tracer + }, + { + path: '*', // 页面不存在的情况下会跳到home + redirect: '/canary', + name: 'notFound', + hidden: true + } ] const router = new VueRouter({ diff --git a/src/svg/game.svg b/src/svg/game.svg new file mode 100644 index 0000000..22d9956 --- /dev/null +++ b/src/svg/game.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svg/home.svg b/src/svg/home.svg new file mode 100644 index 0000000..17a859f --- /dev/null +++ b/src/svg/home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/About.vue b/src/views/About.vue deleted file mode 100644 index 3fa2807..0000000 --- a/src/views/About.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/src/views/Canary.vue b/src/views/Canary.vue new file mode 100644 index 0000000..d5e0c3d --- /dev/null +++ b/src/views/Canary.vue @@ -0,0 +1,173 @@ + + + + \ No newline at end of file diff --git a/src/views/Cherry.vue b/src/views/Cherry.vue new file mode 100644 index 0000000..f7f6e24 --- /dev/null +++ b/src/views/Cherry.vue @@ -0,0 +1,178 @@ + + + + \ No newline at end of file diff --git a/src/views/Home.vue b/src/views/Home.vue deleted file mode 100644 index 8bd6c57..0000000 --- a/src/views/Home.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/src/views/Tracer.vue b/src/views/Tracer.vue new file mode 100644 index 0000000..dffd7e4 --- /dev/null +++ b/src/views/Tracer.vue @@ -0,0 +1,177 @@ + + + + \ No newline at end of file