12345678910111213141516171819202122232425 |
- /*
- * @Author: code4eat awesomedema@gmail.com
- * @Date: 2023-12-11 17:09:15
- * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-12-12 15:10:16
- * @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";
- const { REACT_APP_ENV } = process.env;
- export default (api: IApi) => {
- api.modifyHTML(($:any) => {
- if(REACT_APP_ENV == 'dev'){
- $('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<span style="font-size:14px;padding-left:20px;color:red; ">just display in dev env</span></div>`,
- ]);
- }
- return $;
- });
- };
|