摘要: 修改 emacs node_modules/vue-loader/lib/template-compiler/index.js 将以下代码中的 babylon 替换 babel if (!isProduction) { code = prettier.format(code, { semi: fal 阅读全文
posted @ 2023-10-07 15:22 snake_j 阅读(44) 评论(0) 推荐(0)
摘要: // 查询源 npm config get registry // 更换国内源 npm config set registry https://registry.npmmirror.com // 恢复官方源 npm config set registry https://registry.npmjs 阅读全文
posted @ 2023-09-27 15:07 snake_j 阅读(8) 评论(0) 推荐(0)
摘要: 在请求前拦截,检测token 使用 Request.state.XXX 存信息 from fastapi import Request, FastAPI from py_jwt.use_jwt import decode_token def register_middleware(app: Fast 阅读全文
posted @ 2023-09-22 14:28 snake_j 阅读(135) 评论(0) 推荐(0)
摘要: #### 使用 ``` pip install xxx -i url ``` ``` 清华大学(完全度和速度都很好,是一个优秀的pip镜像源) https://pypi.tuna.tsinghua.edu.cn/simple 阿里云(完全度和速度也很好,是一个不错的选择) https://mirro 阅读全文
posted @ 2023-07-12 16:19 snake_j 阅读(43) 评论(0) 推荐(0)
摘要: ####npm ``` $ npm install vue-json-viewer@2 --save // Vue2 $ npm install vue-json-viewer@3 --save // Vue3 ``` ####例子 ``` import JsonViewer from 'vue-j 阅读全文
posted @ 2023-07-12 10:10 snake_j 阅读(350) 评论(0) 推荐(0)
摘要: #### 方法1 修改文件 : ..../node_modules/vue-loader/lib/template-compiler/index.js ``` //原来是这样的 if (!isProduction) { code = prettier.format(code, { semi: fal 阅读全文
posted @ 2023-07-11 11:58 snake_j 阅读(110) 评论(0) 推荐(0)
摘要: #### BindJSON() ``` type pdata struct { User string `json:"user"` Act string `json:"act"` } func CdnTask(c *gin.Context) { var body pdata if err := c. 阅读全文
posted @ 2023-07-07 15:05 snake_j 阅读(134) 评论(0) 推荐(0)
摘要: ####方法1 ``` # 在celery task 中 加入 # from multiprocessing import current_process # current_process()._config={"semprefix":"/mp"} @app.task def create_tas 阅读全文
posted @ 2023-07-06 14:15 snake_j 阅读(69) 评论(0) 推荐(0)
摘要: #### 后端 DRF ```python view.py from rest_framework import pagination class default_pagination(pagination.PageNumberPagination): page_size = 15 # 分页的条数 阅读全文
posted @ 2023-07-05 15:10 snake_j 阅读(47) 评论(0) 推荐(0)
摘要: ``` //判断文件是否存在 存在返回 true 不存在返回false // func checkFileIsExist(filename string) bool { // var exist = true // if _, err := os.Stat(filename); os.IsNotEx 阅读全文
posted @ 2023-07-05 14:29 snake_j 阅读(201) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示