Selaa lähdekoodia

修改返回按钮大小

Atticus6 2 vuotta sitten
vanhempi
commit
be2317c6fa
13 muutettua tiedostoa jossa 9754 lisäystä ja 18 poistoa
  1. 4842 0
      analysis.html
  2. 1 1
      index.html
  3. 20 3
      package-lock.json
  4. 0 1
      package.json
  5. 3 1
      src/App.vue
  6. 1 1
      src/components/BackButton.vue
  7. 7 2
      src/components/Init.vue
  8. 13 3
      src/components/ShowPoint.vue
  9. 5 2
      src/pages/find/index.vue
  10. 7 3
      src/pages/home/inde.vue
  11. 3 1
      src/style.css
  12. 4842 0
      test.html
  13. 10 0
      vite.config.ts

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4842 - 0
analysis.html


+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="/image/school-s.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>万载三中</title>
+    <title>万载县第三中</title>
   </head>
   <body>
     <div id="app"></div>

+ 20 - 3
package-lock.json

@@ -8,7 +8,6 @@
       "name": "smart-school-map",
       "version": "0.0.0",
       "dependencies": {
-        "@vueuse/core": "^10.7.0",
         "ant-design-vue": "^4.0.7",
         "lucide-vue-next": "^0.294.0",
         "pinia": "^2.1.7",
@@ -738,7 +737,10 @@
     "node_modules/@types/web-bluetooth": {
       "version": "0.0.20",
       "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
-      "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="
+      "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==",
+      "dev": true,
+      "optional": true,
+      "peer": true
     },
     "node_modules/@vitejs/plugin-vue": {
       "version": "4.5.2",
@@ -917,6 +919,9 @@
       "version": "10.7.0",
       "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.7.0.tgz",
       "integrity": "sha512-4EUDESCHtwu44ZWK3Gc/hZUVhVo/ysvdtwocB5vcauSV4B7NiGY5972WnsojB3vRNdxvAt7kzJWE2h9h7C9d5w==",
+      "dev": true,
+      "optional": true,
+      "peer": true,
       "dependencies": {
         "@types/web-bluetooth": "^0.0.20",
         "@vueuse/metadata": "10.7.0",
@@ -928,7 +933,10 @@
       "version": "0.14.6",
       "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.6.tgz",
       "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==",
+      "dev": true,
       "hasInstallScript": true,
+      "optional": true,
+      "peer": true,
       "bin": {
         "vue-demi-fix": "bin/vue-demi-fix.js",
         "vue-demi-switch": "bin/vue-demi-switch.js"
@@ -949,12 +957,18 @@
     "node_modules/@vueuse/metadata": {
       "version": "10.7.0",
       "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-10.7.0.tgz",
-      "integrity": "sha512-GlaH7tKP2iBCZ3bHNZ6b0cl9g0CJK8lttkBNUX156gWvNYhTKEtbweWLm9rxCPIiwzYcr/5xML6T8ZUEt+DkvA=="
+      "integrity": "sha512-GlaH7tKP2iBCZ3bHNZ6b0cl9g0CJK8lttkBNUX156gWvNYhTKEtbweWLm9rxCPIiwzYcr/5xML6T8ZUEt+DkvA==",
+      "dev": true,
+      "optional": true,
+      "peer": true
     },
     "node_modules/@vueuse/shared": {
       "version": "10.7.0",
       "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-10.7.0.tgz",
       "integrity": "sha512-kc00uV6CiaTdc3i1CDC4a3lBxzaBE9AgYNtFN87B5OOscqeWElj/uza8qVDmk7/U8JbqoONLbtqiLJ5LGRuqlw==",
+      "dev": true,
+      "optional": true,
+      "peer": true,
       "dependencies": {
         "vue-demi": ">=0.14.6"
       }
@@ -963,7 +977,10 @@
       "version": "0.14.6",
       "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.6.tgz",
       "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==",
+      "dev": true,
       "hasInstallScript": true,
+      "optional": true,
+      "peer": true,
       "bin": {
         "vue-demi-fix": "bin/vue-demi-fix.js",
         "vue-demi-switch": "bin/vue-demi-switch.js"

+ 0 - 1
package.json

@@ -9,7 +9,6 @@
     "preview": "vite preview"
   },
   "dependencies": {
-    "@vueuse/core": "^10.7.0",
     "ant-design-vue": "^4.0.7",
     "lucide-vue-next": "^0.294.0",
     "pinia": "^2.1.7",

+ 3 - 1
src/App.vue

@@ -1,7 +1,9 @@
 <script setup lang="ts"></script>
 
 <template>
-  <RouterView></RouterView>
+  <div class="w-[1920] h-[1080]">
+    <RouterView></RouterView>
+  </div>
 </template>
 
 <style scoped></style>

+ 1 - 1
src/components/BackButton.vue

@@ -4,7 +4,7 @@ import { ChevronLeft } from "lucide-vue-next";
 <template>
   <div class="cursor-pointer">
     <div
-      class="btn w-24 md:w-48 h-16 flex justify-between items-center bg-[#03B3FF] bg-opacity-10 px-3 rounded-lg"
+      class="btn w-24 md:w-32 h-16 flex justify-between items-center bg-[#03B3FF] bg-opacity-10 px-3 rounded-lg"
     >
       <div>
         <ChevronLeft :size="40" />

+ 7 - 2
src/components/Init.vue

@@ -33,8 +33,8 @@ const handleClick = (event: MouseEvent) => {
 };
 
 const reset = () => {
-  tempLocals.splice(0, tempLocals.length);
   current.value = 0;
+  tempLocals.splice(0, tempLocals.length);
 };
 const set = () => {
   tempLocals.forEach((local) => {
@@ -66,6 +66,11 @@ const set = () => {
       @click="handleClick"
     ></div>
 
-    <ShowPoint v-for="(item, i) in tempLocals" :key="i" :local="item" />
+    <ShowPoint
+      v-for="(item, i) in tempLocals"
+      :key="i"
+      :local="item"
+      :show="true"
+    />
   </div>
 </template>

+ 13 - 3
src/components/ShowPoint.vue

@@ -1,14 +1,24 @@
 <script setup lang="ts">
 import { Tooltip } from "ant-design-vue";
-
-defineProps<{ local: Local }>();
+import { PodcastIcon } from "lucide-vue-next";
+defineProps<{
+  show?: boolean;
+  local: Local;
+}>();
 </script>
 <template>
   <div
     class="absolute p-3"
     :style="{ top: local.y + 'px', left: local.x + 'px' }"
   >
-    <Tooltip :title="local.name" :open="true" />
+    <Tooltip :open="show" color="white" overlay-class-name=" text-2xl">
+      <template #title>
+        <div class="flex justify-center items-center gap-2 p-2">
+          <PodcastIcon />
+          <div>{{ local.name }}</div>
+        </div>
+      </template>
+    </Tooltip>
   </div>
 </template>
 

+ 5 - 2
src/pages/find/index.vue

@@ -3,6 +3,7 @@ import { Input } from "ant-design-vue";
 const router = useRouter();
 const inputValue = ref("");
 const localStore = useLocalStore();
+const showIndex = ref(0);
 onMounted(() => {
   console.log(localStore.initialized);
   console.log(localStore.locals);
@@ -10,7 +11,7 @@ onMounted(() => {
 </script>
 <template>
   <div
-    class="h-screen w-full bg-[url('/image/bg.png')] bg-cover flex text-white"
+    class="h-screen bg w-full bg-[url('/image/bg.png')] bg-cover flex text-white"
   >
     <!--  初始化后展示 -->
     <div
@@ -22,11 +23,12 @@ onMounted(() => {
         v-for="(item, i) in localStore.locals"
         :key="i"
         :local="item"
+        :show="showIndex === i"
       />
 
       <!-- 返回按钮 -->
       <BackButton
-        class="absolute top-3 md:top-[70px] left-9"
+        class="absolute top-3 md:top-[40px] left-9"
         @click="router.push('/')"
       />
 
@@ -44,6 +46,7 @@ onMounted(() => {
             />
           </div>
           <div
+            @click="showIndex++"
             class="h-full select-none w-[134px] bg-blue-400 flex justify-center items-center font-medium text-xl cursor-pointer"
           >
             搜索

+ 7 - 3
src/pages/home/inde.vue

@@ -43,7 +43,11 @@ onMounted(() => {
 </script>
 <template>
   <div class="w-full h-screen relative">
-    <iframe class="w-full h-screen"> </iframe>
+    <iframe
+      class="w-full h-screen"
+      src="https://720.vrqjcs.com//t/3582e1b7d1ac0195"
+    >
+    </iframe>
     <BackButton
       class="absolute top-6 left-7 bg-gray-100 bg-opacity-20 backdrop-blur-sm rounded-xl"
     />
@@ -53,9 +57,9 @@ onMounted(() => {
     </div>
 
     <div
-      class="absolute top-6 right-72 h-16 flex items-center font-medium text-xl"
+      class="absolute top-6 right-60 h-16 flex items-center font-medium text-xl"
     >
-      万载三中
+      万载县第三中
     </div>
     <div class="absolute top-6 right-1 sm:right-10 h-16 flex items-center w-48">
       {{ current }}

+ 3 - 1
src/style.css

@@ -13,5 +13,7 @@ body {
 }
 
 .ant-tooltip-inner {
-  @apply text-3xl;
+  /* @apply text-3xl bg-white!important; */
+
+  color: black !important;
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4842 - 0
test.html


+ 10 - 0
vite.config.ts

@@ -3,6 +3,8 @@ import vue from "@vitejs/plugin-vue";
 import path from "path";
 import AutoImport from "unplugin-auto-import/vite";
 import Components from "unplugin-vue-components/vite";
+// import { visualizer } from "rollup-plugin-visualizer";
+// import viteCompression from "vite-plugin-compression";
 
 // https://vitejs.dev/config/
 export default defineConfig({
@@ -17,6 +19,14 @@ export default defineConfig({
       dirs: ["./src/components"], // 配置需要默认导入的自定义组件文件夹,该文件夹下的所有组件都会自动 import
       dts: "./src/components/auto-components.d.ts",
     }),
+    // visualizer({
+    //   gzipSize: true,
+    //   brotliSize: true,
+    //   emitFile: false,
+    //   filename: "analysis.html", //分析图生成的文件名
+    //   open: true, //如果存在本地服务端口,将在打包后自动展示
+    // }),
+    // viteCompression(),
   ],
   resolve: {
     alias: {