Browse Source

修改样式

lex 1 year ago
parent
commit
f652fe5bc3

+ 37 - 55
dev-dist/sw.js

@@ -13,29 +13,31 @@
 
 // If the loader is already loaded, just stop.
 if (!self.define) {
-  const registry = {};
+  let registry = {};
 
   // Used for `eval` and `importScripts` where we can't get script URL by other means.
   // In both cases, it's safe to use a global var because those functions are synchronous.
   let nextDefineUri;
 
   const singleRequire = (uri, parentUri) => {
-    uri = new URL(uri + '.js', parentUri).href;
-    return (
-      registry[uri] ||
-      new Promise(resolve => {
-        if ('document' in self) {
-          const script = document.createElement('script');
-          script.src = uri;
-          script.onload = resolve;
-          document.head.appendChild(script);
-        } else {
-          nextDefineUri = uri;
-          importScripts(uri);
-          resolve();
-        }
-      }).then(() => {
-        const promise = registry[uri];
+    uri = new URL(uri + ".js", parentUri).href;
+    return registry[uri] || (
+      
+        new Promise(resolve => {
+          if ("document" in self) {
+            const script = document.createElement("script");
+            script.src = uri;
+            script.onload = resolve;
+            document.head.appendChild(script);
+          } else {
+            nextDefineUri = uri;
+            importScripts(uri);
+            resolve();
+          }
+        })
+      
+      .then(() => {
+        let promise = registry[uri];
         if (!promise) {
           throw new Error(`Module ${uri} didn’t register its module`);
         }
@@ -45,31 +47,27 @@ if (!self.define) {
   };
 
   self.define = (depsNames, factory) => {
-    const uri =
-      nextDefineUri ||
-      ('document' in self ? document.currentScript.src : '') ||
-      location.href;
+    const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href;
     if (registry[uri]) {
       // Module is already loading or loaded.
       return;
     }
-    const exports = {};
+    let exports = {};
     const require = depUri => singleRequire(depUri, uri);
     const specialDeps = {
       module: { uri },
       exports,
       require
     };
-    registry[uri] = Promise.all(
-      depsNames.map(depName => specialDeps[depName] || require(depName))
-    ).then(deps => {
+    registry[uri] = Promise.all(depsNames.map(
+      depName => specialDeps[depName] || require(depName)
+    )).then(deps => {
       factory(...deps);
       return exports;
     });
   };
 }
-define(['./workbox-5357ef54'], function (workbox) {
-  ('use strict');
+define(['./workbox-5357ef54'], (function (workbox) { 'use strict';
 
   self.skipWaiting();
   workbox.clientsClaim();
@@ -79,32 +77,16 @@ define(['./workbox-5357ef54'], function (workbox) {
    * requests for URLs in the manifest.
    * See https://goo.gl/S9QRab
    */
-  workbox.precacheAndRoute(
-    [
-      {
-        url: 'registerSW.js',
-        revision: '3ca0b8505b4bec776b69afdba2768812'
-      },
-      {
-        url: 'index.html',
-        revision: '0.qn2vbkuocb'
-      }
-    ],
-    {}
-  );
-  /**
-   * https://juejin.cn/post/6844903881189621767
-   * 缓存策略 有5种
-   */
+  workbox.precacheAndRoute([{
+    "url": "registerSW.js",
+    "revision": "3ca0b8505b4bec776b69afdba2768812"
+  }, {
+    "url": "index.html",
+    "revision": "0.bfq05o1lrdo"
+  }], {});
   workbox.cleanupOutdatedCaches();
-  workbox.registerRoute(
-    new workbox.NavigationRoute(workbox.createHandlerBoundToURL('index.html'), {
-      allowlist: [/^\/$/]
-    }),
-    workbox.strategies.NetworkFirst()
-  );
-  workbox.routing.registerRoute(
-    new RegExp('.*.html|css|js|json'),
-    workbox.strategies.NetworkFirst()
-  );
-});
+  workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
+    allowlist: [/^\/$/]
+  }));
+
+}));

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{"version":1705916335091}
+{"version":1705924812523}

+ 11 - 3
src/components/layout/layoutTop.tsx

@@ -39,7 +39,10 @@ export default defineComponent({
     const users = useUserStore();
     const showWord = ref(false);
     const { info } = storeToRefs(users);
+    const userInfoStatus = ref(false);
+    const classRecordStatus = ref(false);
     const gotoPerson = () => {
+      userInfoStatus.value = false;
       router.push({ path: '/setting', query: { activeTab: 'person' } });
     };
     const gotoSchool = () => {
@@ -48,6 +51,7 @@ export default defineComponent({
     const suggestionOptionRef = ref();
     const resetPwd = () => {
       showWord.value = true;
+      userInfoStatus.value = false;
     };
     const body = document.querySelector('body');
     if (body) {
@@ -155,6 +159,7 @@ export default defineComponent({
               width={380}
               class={styles.popoverClassModel}
               placement={'bottom'}
+              v-model:show={classRecordStatus.value}
               trigger="click"
               displayDirective="show"
               v-slots={{
@@ -173,7 +178,11 @@ export default defineComponent({
                   </NTooltip>
                 )
               }}>
-              <ClassModal />
+              <ClassModal
+                onConfirm={() => {
+                  classRecordStatus.value = false;
+                }}
+              />
             </NPopover>
             <NTooltip showArrow={false}>
               {{
@@ -220,6 +229,7 @@ export default defineComponent({
             <NPopover
               show-arrow={false}
               trigger="click"
+              v-model:show={userInfoStatus.value}
               onUpdate:show={val => {
                 showHeadFlag.value = val;
               }}
@@ -269,7 +279,6 @@ export default defineComponent({
                 </div>
                 <div class={styles.propWrapList}>
                   <div class={styles.propWrapItem} onClick={() => gotoPerson()}>
-                    {' '}
                     <NImage
                       class={styles.smallIcon}
                       src={personIcon}
@@ -282,7 +291,6 @@ export default defineComponent({
                       onClick={() => {
                         gotoSchool();
                       }}>
-                      {' '}
                       <NImage
                         class={styles.smallIcon}
                         src={schoolDot}

+ 1 - 1
src/views/attend-class/index.module.less

@@ -294,7 +294,7 @@
       .n-drawer-header__main {
         position: relative;
         z-index: 2;
-        font-size: 18px;
+        font-size: max(18px, 13Px);
         font-weight: 600;
         color: #131415;
         max-width: 220px;

+ 1 - 1
src/views/attend-class/index.tsx

@@ -850,7 +850,7 @@ export default defineComponent({
       }
     };
     document.body.addEventListener('keyup', (e: KeyboardEvent) => {
-      // console.log(e, 'e');
+      console.log(e, 'e');
       if (e.code === 'ArrowLeft') {
         // if (popupData.activeIndex === 0) return;
         setModalOpen();

+ 2 - 2
src/views/attend-class/model/chapter/index.module.less

@@ -19,7 +19,7 @@
   padding: 0 5px;
   cursor: pointer;
   border-radius: 10px;
-  font-size: max(17px, 13px);
+  font-size: max(17px, 12Px);
 
   &:hover {
     background: #F5F6FA;
@@ -75,7 +75,7 @@
 
   &.childItem {
     padding-left: 30px;
-    font-size: 15px;
+    font-size: max(15px, 12Px);
 
     .title {
       color: #131415;

+ 3 - 1
src/views/home/modals/class-modal/index.tsx

@@ -16,7 +16,8 @@ import { gradeToCN } from '/src/utils/contants';
 
 export default defineComponent({
   name: 'class-modal',
-  setup() {
+  emits: ['confirm'],
+  setup(props, { emit }) {
     const router = useRouter();
     const userStore = useUserStore();
     const forms = reactive({
@@ -315,6 +316,7 @@ export default defineComponent({
                   // setTabsCaches('attendclass', 'tabName', {
                   //   path: '/classDetail'
                   // });
+                  emit('confirm');
                   sessionStorage.setItem('classDetailTabs', 'attendclass');
                   router.push({
                     path: '/classDetail',

+ 5 - 4
src/views/studentList/index.module.less

@@ -270,7 +270,7 @@
     .n-tag {
       --n-border-radius: 6px !important;
       --n-height: 26px !important;
-      --n-font-size: 13px !important;
+      --n-font-size: max(13px, 12Px) !important;
       --n-padding: 0 14px !important;
     }
   }
@@ -587,12 +587,13 @@
   }
 
   .studentRemove {
-    padding: 0 40px;
+    padding: 32px 40px 46px;
 
     p {
-      font-size: max(18px, 14px);
+      font-size: max(18px, 14Px);
       color: #777777;
       line-height: 30px;
+      text-align: center;
 
       span {
         color: #EA4132;
@@ -601,7 +602,7 @@
   }
 
   .btnGroup {
-    padding: 32px 0;
+    padding: 32px 0 0;
 
     :global {
       .n-button {