周凯,个人博客

  • 前端
  • 嵌入式
  • 工具
  • 后端
  • 随笔
vite
vite

vue3 vite element-plus自定义主题色

项目 vue3 vite element-plus 配置 安装 scss yarn add sass 准备定制化文件 在静态资源中创建:@/assets/styles/element.scss /* 只需要重写你需要的即可 */ @forward 'element-plus/theme-chalk/src/common/var.scss' with ( $colors: ('primary': ( // 主色 'base': #27ba9b, ), 'success': ( // 成功色 'base': #1dc7…

2024年 8月 15日 0条评论 1463点热度 1人点赞 周凯 阅读全文
vite

Vue2.7 + Vite + Eslint配置

在根目录下添加 .editorconfig 文件: # EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = false insert_final_newline = false 安装 es…

2023年 5月 29日 0条评论 1352点热度 0人点赞 周凯 阅读全文
vite

Vite 配置代理 Proxy,避免跨域和重复编写url的问题

我们在编写前端项目的时候,经常会遇到跨域的问题,当我们访问后端 API 的 URL 路径时,只要域名、端口或访问协议(如 HTTP 和 HTTPS)有一项不同,就会被浏览器认定为跨域。另外我们也会经常重复编写后端的域名,例如 https://example.com/api/some_end_point,https://example.com/api/other_end_point,针对这两种情况,可以直接用同一个配置来解决,即代理配置。 不管是 Vite 还是 Webpack,这些打包工具都支持设置前端代理,它们能…

2023年 3月 8日 0条评论 1648点热度 1人点赞 周凯 阅读全文
搜索
分类
归档

COPYRIGHT © 2022-现在 周凯,个人博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

蒙ICP备18004897号