Forráskód Böngészése

更新开发时的样式

code4eat 1 éve
szülő
commit
ec4b9b9b80
5 módosított fájl, 25 hozzáadás és 17 törlés
  1. BIN
      .DS_Store
  2. 21 0
      plugin.ts
  3. BIN
      public/favicon.ico
  4. 3 16
      src/app.tsx
  5. 1 1
      src/global.less

BIN
.DS_Store


+ 21 - 0
plugin.ts

@@ -0,0 +1,21 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-12-11 17:09:15
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-12-11 17:47:14
+ * @FilePath: /kcim-frontend-template/plugin.ts
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import { IApi } from "@umijs/max";
+
+export default (api: IApi) => {
+  api.modifyHTML(($:any) => {
+    $('head').append([
+      `<link rel="icon" href="/favicon.ico" type="image/x-icon">`,
+    ]);
+    $('body').prepend([
+      `<div style="height:48px;background: #3377FF;position: relative;z-index: 99;line-height: 48px;color: white;padding: 0 16px;font-size: 20px;">Header</div>`,
+    ]); 
+    return $; 
+  });
+};

BIN
public/favicon.ico


+ 3 - 16
src/app.tsx

@@ -112,21 +112,6 @@ export const request: RequestConfig = {
       try {
 
         if (status == 200) {
-          // 网络请求成功
-
-          // if (errorMessage && errorMessage.indexOf('Token') != -1) {
-          //   Modal.error({
-          //     title: '登陆已过期,请重新登录!',
-          //     okText: '确定',
-          //     onOk(...args) {
-          //       localStorage.removeItem('userData');
-          //     },
-          //   });
-
-          //   return false;
-          // }
-
-
           if (method == 'post') {
 
             if (code == 200) {
@@ -230,7 +215,8 @@ export const layout = ({ initialState, setInitialState }: { initialState: any, s
 
 
   return {
-    menuHeaderRender: false,
+    headerRender:()=><div style={{height:80}}>header</div>,
+    menuHeaderRender:false,
     token: {
       sider: {
 
@@ -248,6 +234,7 @@ export const layout = ({ initialState, setInitialState }: { initialState: any, s
       }
 
     },
+    fixSiderbar:false,
     siderWidth: 200,
     menuProps: {
       openKeys: [...openKeys],

+ 1 - 1
src/global.less

@@ -183,7 +183,7 @@ textarea {
                                 .kcim-ant-table-container {
                                     .kcim-ant-table-content {
                                         .kcim-ant-table-thead {
-
+                                                                                                                                                                                                                                                                                                                                                                                                                       
                                             &>tr>th {
                                                 font-size: 14px;
                                                 font-family: SourceHanSansCN-Medium, SourceHanSansCN;