YY 2 tahun lalu
induk
melakukan
25149b28ac
4 mengubah file dengan 65 tambahan dan 31 penghapusan
  1. 13 10
      index.html
  2. 16 6
      src/router/index.ts
  3. 10 11
      src/stores/counter.ts
  4. 26 4
      tsconfig.json

+ 13 - 10
index.html

@@ -1,13 +1,16 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html lang="en">
 <html lang="en">
-  <head>
-    <meta charset="UTF-8">
-    <link rel="icon" href="/favicon.ico">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>加载中...</title>
-  </head>
-  <body>
-    <div id="app"></div>
-    <script type="module" src="/src/main.ts"></script>
-  </body>
+
+<head>
+  <meta charset="UTF-8">
+  <link rel="icon" href="/favicon.ico">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>加载中...</title>
+</head>
+
+<body>
+  <div id="app"></div>
+  <script type="module" src="/src/main.ts"></script>
+</body>
+
 </html>
 </html>

+ 16 - 6
src/router/index.ts

@@ -1,14 +1,24 @@
-import { createRouter, createWebHistory } from 'vue-router';
-
+import { createRouter, createWebHistory } from 'vue-router'
 const router = createRouter({
 const router = createRouter({
   history: createWebHistory(import.meta.env.BASE_URL),
   history: createWebHistory(import.meta.env.BASE_URL),
   routes: [
   routes: [
     {
     {
       path: '/',
       path: '/',
-      name: 'home',
-      component: () => import('../views/home/index.vue')
+      redirect: '/homeIndex'
+    },
+    {
+      path: '/homeIndex',
+      meta: { title: '基础研究动态管理平台', is_filter: true },
+      component: () => import('@common/src/components/admin-frame/home.vue'),
+      children: [
+        {
+          path: '/homeIndex',
+          meta: { title: '基础研究动态管理平台', is_filter: true },
+          component: () => import('@/views/home/index.vue')
+        }
+      ]
     }
     }
   ]
   ]
-});
+})
 
 
-export default router;
+export default router

+ 10 - 11
src/stores/counter.ts

@@ -1,12 +1,11 @@
-import { ref, computed } from 'vue';
-import { defineStore } from 'pinia';
+import * as ustate from '@common/src/stores/user/state'
+import * as umutations from '@common/src/stores/user/mutations'
 
 
-export const useCounterStore = defineStore('counter', () => {
-  const count = ref(0);
-  const doubleCount = computed(() => count.value * 2);
-  function increment() {
-    count.value++;
-  }
-
-  return { count, doubleCount, increment };
-});
+import { createStore } from 'vuex'
+const store = createStore({
+  state: { ...ustate },
+  mutations: { ...umutations },
+  actions: {},
+  modules: {}
+})
+export default store

+ 26 - 4
tsconfig.json

@@ -1,13 +1,35 @@
 {
 {
   "extends": "@vue/tsconfig/tsconfig.web.json",
   "extends": "@vue/tsconfig/tsconfig.web.json",
-  "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
+  // "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "../common/src/stores/user", "../common/src/stores/user"],
+  "include": [
+    "src/**/*.ts",
+    "src/**/*.d.ts",
+    "src/**/*.tsx",
+    "src/**/*.vue",
+    "src/untils/baiduMap.js",
+    "src/untils/debuonce.js",
+    "**/*.ts",
+    "**/*.tsx"
+  ],
   "compilerOptions": {
   "compilerOptions": {
+    "target": "esnext",
+    "module": "esnext",
+    "strict": false,
+    "jsx": "preserve",
+    "moduleResolution": "node",
     "baseUrl": ".",
     "baseUrl": ".",
     "paths": {
     "paths": {
-      "@/*": ["./src/*"]
-    }
+      "@/*": ["./src/*"],
+      "@common/*": ["../common/*"]
+    },
+    "isolatedModules": false,
+    "suppressImplicitAnyIndexErrors": true,
+    "sourceMap": true,
+    "resolveJsonModule": true,
+    "esModuleInterop": true,
+    "lib": ["es5", "es6", "dom", "dom.iterable"],
+    "allowSyntheticDefaultImports": true
   },
   },
-
   "references": [
   "references": [
     {
     {
       "path": "./tsconfig.node.json"
       "path": "./tsconfig.node.json"