From 4d116f8ac2c37128cb16e501c4d27e23c19393c3 Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 29 Dec 2022 19:05:15 +0800 Subject: [PATCH] init --- .gitignore | 15 +++++ .prettierrc.yaml | 11 ++++ index.html | 18 ++++++ package.json | 11 ++++ src/app.vue | 36 ++++++++++++ src/assets/logo.svg | 1 + src/components/footer.vue | 28 ++++++++++ src/components/header.vue | 113 ++++++++++++++++++++++++++++++++++++++ src/favicon.ico | Bin 0 -> 4286 bytes src/main.js | 11 ++++ src/router.js | 25 +++++++++ src/store.js | 11 ++++ src/views/about.vue | 86 +++++++++++++++++++++++++++++ src/views/home.vue | 19 +++++++ src/views/request.vue | 26 +++++++++ vue.live.js | 35 ++++++++++++ 16 files changed, 446 insertions(+) create mode 100644 .gitignore create mode 100644 .prettierrc.yaml create mode 100644 index.html create mode 100644 package.json create mode 100644 src/app.vue create mode 100644 src/assets/logo.svg create mode 100644 src/components/footer.vue create mode 100644 src/components/header.vue create mode 100644 src/favicon.ico create mode 100644 src/main.js create mode 100644 src/router.js create mode 100644 src/store.js create mode 100644 src/views/about.vue create mode 100644 src/views/home.vue create mode 100644 src/views/request.vue create mode 100644 vue.live.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..34f2ab0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ + +node_modules + +*.sublime-project +*.sublime-workspace +package-lock.json + +._* + +.Spotlight-V100 +.Trashes +.DS_Store +.AppleDouble +.LSOverride + diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..8c33f1a --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,11 @@ + +jsxBracketSameLine: true +jsxSingleQuote: true +semi: false +singleQuote: true +printWidth: 100 +useTabs: false +tabWidth: 2 +trailingComma: none +bracketSpacing: true +arrowParens: avoid diff --git a/index.html b/index.html new file mode 100644 index 0000000..4ff92f1 --- /dev/null +++ b/index.html @@ -0,0 +1,18 @@ + + + + + + + {{title}} + + + + + + + +
+ + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..2983806 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "jscdn.ink", + "type": "module", + "scripts": { + "start": "vue-live dev", + "build": "vue-live build" + }, + "dependencies": { + "@bytedo/vue-live": "^0.0.13" + } +} diff --git a/src/app.vue b/src/app.vue new file mode 100644 index 0000000..80a372c --- /dev/null +++ b/src/app.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..e2a9ebf --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/footer.vue b/src/components/footer.vue new file mode 100644 index 0000000..cc238de --- /dev/null +++ b/src/components/footer.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/components/header.vue b/src/components/header.vue new file mode 100644 index 0000000..03fc368 --- /dev/null +++ b/src/components/header.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/favicon.ico b/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..df36fcfb72584e00488330b560ebcf34a41c64c2 GIT binary patch literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S literal 0 HcmV?d00001 diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..d927b69 --- /dev/null +++ b/src/main.js @@ -0,0 +1,11 @@ +import { createApp } from 'vue' +import App from './app.vue' + +import router from './router' +import store from './store' + +import '//jscdn.ink/@bytedo/wcui/dist/form/input.js' + +const app = createApp(App) + +app.use(router).use(store).mount('.app') diff --git a/src/router.js b/src/router.js new file mode 100644 index 0000000..7a351f6 --- /dev/null +++ b/src/router.js @@ -0,0 +1,25 @@ +import { createRouter, createWebHistory } from 'vue-router' +import Home from './views/home.vue' + +const router = createRouter({ + history: createWebHistory(), + routes: [ + { + path: '/', + name: 'home', + component: Home + }, + { + path: '/about', + name: 'about', + component: () => import('./views/about.vue') + }, + { + path: '/request', + name: 'request', + component: () => import('./views/request.vue') + } + ] +}) + +export default router diff --git a/src/store.js b/src/store.js new file mode 100644 index 0000000..c047f7a --- /dev/null +++ b/src/store.js @@ -0,0 +1,11 @@ +import { reactive } from 'vue' + +const store = reactive({ + foo: 'bar', + version: '0.0.13', + searchShow: true +}) + +export default function (app) { + app.config.globalProperties.$store = store +} diff --git a/src/views/about.vue b/src/views/about.vue new file mode 100644 index 0000000..e9e1a7f --- /dev/null +++ b/src/views/about.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/home.vue b/src/views/home.vue new file mode 100644 index 0000000..fbb076e --- /dev/null +++ b/src/views/home.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/views/request.vue b/src/views/request.vue new file mode 100644 index 0000000..f3020d3 --- /dev/null +++ b/src/views/request.vue @@ -0,0 +1,26 @@ + + + diff --git a/vue.live.js b/vue.live.js new file mode 100644 index 0000000..515e0d1 --- /dev/null +++ b/vue.live.js @@ -0,0 +1,35 @@ +import { resolve } from 'path' + +export default { + devServer: { + port: 8080, + domain: '', + https: false, + ssl: { + key: '', + cert: '' + // ca: '' + } + }, + pages: { + // 如果多页应用, 则这里写传入多个值即可(注意不是数组格式) + // 这里的key值, 将是最终的页面的名称 + index: { + // 这里的resolve可将相对路径转为绝对路径 + // 如果传入的路径已经是绝对路径的, 可不需要resolve + entry: resolve('./src/main.js'), + title: '免费、快速、开放的 CDN 服务' + } + }, + // 以下cdn地址, 可自行修改为适合的 + // 有用到其他的库, 可以手动添加, + // 也可以在页面中直接引入完整的路径, 而不必须在这里声明 + imports: { + vue: '//jscdn.ink/vue/dist/vue.esm-browser.prod.js', + 'vue-router': '//jscdn.ink/vue-router/dist/vue-router.esm-browser.js', + // 这个库被vue-router依赖, 可以注释掉vue-router代码中的 @vue/devtools-api 的引入 + // 以达到减少不必须的体积的效果 + '@vue/devtools-api': '//jscdn.ink/@vue/devtools-api@6.4.4/lib/esm/index.js', + fetch: '//jscdn.ink/@bytedo/fetch/dist/next.js' + } +}