From eeba250148bfef974f8523308c9d8196adec2208 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 08 二月 2023 16:57:20 +0800 Subject: [PATCH] # --- pages/login/login.vue | 19 +++++++++ index.html | 36 +++++++++-------- pages.json | 8 +++ main.js | 14 ++++--- 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/index.html b/index.html index c3ff205..5dcc524 100644 --- a/index.html +++ b/index.html @@ -1,20 +1,22 @@ <!DOCTYPE html> <html lang="en"> - <head> - <meta charset="UTF-8" /> - <script> - var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || - CSS.supports('top: constant(a)')) - document.write( - '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + - (coverSupport ? ', viewport-fit=cover' : '') + '" />') - </script> - <title></title> - <!--preload-links--> - <!--app-context--> - </head> - <body> - <div id="app"><!--app-html--></div> - <script type="module" src="/main.js"></script> - </body> + <head> + <meta charset="UTF-8" /> + <script> + var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || + CSS.supports('top: constant(a)')) + document.write( + '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + + (coverSupport ? ', viewport-fit=cover' : '') + '" />') + </script> + <title></title> + <!--preload-links--> + <!--app-context--> + </head> + <body> + <div id="app"> + <!--app-html--> + </div> + <script type="module" src="/main.js"></script> + </body> </html> diff --git a/main.js b/main.js index 219e247..e7e19e2 100644 --- a/main.js +++ b/main.js @@ -1,9 +1,11 @@ import App from './App' -import { createSSRApp } from 'vue' +import { + createSSRApp +} from 'vue' // 涓嶈兘淇敼瀵煎嚭鐨� createApp 鏂规硶鍚嶏紝涓嶈兘淇敼浠� Vue 涓鍏ョ殑 createSSRApp銆� export function createApp() { - const app = createSSRApp(App) - return { - app - } -} \ No newline at end of file + const app = createSSRApp(App) + return { + app + } +} diff --git a/pages.json b/pages.json index 4f4735e..cd79566 100644 --- a/pages.json +++ b/pages.json @@ -1,6 +1,12 @@ { "pages": [ //pages鏁扮粍涓涓�椤硅〃绀哄簲鐢ㄥ惎鍔ㄩ〉锛屽弬鑰冿細https://uniapp.dcloud.io/collocation/pages { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "login" + } + }, + { "path": "pages/index/index", "style": { "navigationBarTitleText": "uni-app" @@ -14,4 +20,4 @@ "backgroundColor": "#F8F8F8" }, "uniIdRouter": {} -} \ No newline at end of file +} diff --git a/pages/login/login.vue b/pages/login/login.vue new file mode 100644 index 0000000..22681f7 --- /dev/null +++ b/pages/login/login.vue @@ -0,0 +1,19 @@ +<template> + <div class="main"> + + </div> +</template> + +<script lang="ts"> +// 杩欓噷缂栧啓ts浠g爜 + let s:string = "123" + console.log(s) +</script> + +<style> + .main { + height: 100%; + width: 100%; + background-color: aquamarine; + } +</style> \ No newline at end of file -- Gitblit v1.9.1