#
whycq
2023-02-08 eeba250148bfef974f8523308c9d8196adec2208
#
3个文件已修改
1个文件已添加
77 ■■■■■ 已修改文件
index.html 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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
  }
}
    const app = createSSRApp(App)
    return {
        app
    }
}
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": {}
}
}
pages/login/login.vue
New file
@@ -0,0 +1,19 @@
<template>
    <div class="main">
    </div>
</template>
<script lang="ts">
// 这里编写ts代码
    let s:string = "123"
    console.log(s)
</script>
<style>
    .main {
        height: 100%;
        width: 100%;
        background-color: aquamarine;
    }
</style>