plugin.ts 801 B

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