| | |
| | | import antfu from '@antfu/eslint-config'; |
| | | import antfu from '@antfu/eslint-config' |
| | | |
| | | export default antfu( |
| | | { |
| | |
| | | 'vue/block-order': ['error', { |
| | | order: ['template', 'script', 'style'], |
| | | }], |
| | | // 需要尾随逗号 |
| | | 'comma-dangle': ['error', 'only-multiline'], |
| | | // 不需要尾随逗号 |
| | | 'comma-dangle': ['error', 'never'], |
| | | // 允许console |
| | | 'no-console': 'off', |
| | | // 需要分号 |
| | | 'style/semi': ['error', 'always'], |
| | | // 不需要分号 |
| | | 'style/semi': ['error', 'never'], |
| | | // 块内的空行 |
| | | 'padded-blocks': ['error', 'never'], |
| | | // 顶级函数应使用 function 关键字声明 |
| | |
| | | 'node/prefer-global/process': 'off', |
| | | // 禁止未使用的捕获组 |
| | | 'regexp/no-unused-capturing-group': 'off', |
| | | // 允许接口和类型别名中的成员之间使用三个分隔符 |
| | | // 允许接口和类型别名中的成员之间不使用分隔符 |
| | | 'style/member-delimiter-style': ['error', { |
| | | multiline: { |
| | | delimiter: 'semi', |
| | | requireLast: true, |
| | | delimiter: 'none', |
| | | requireLast: false, |
| | | }, |
| | | singleline: { |
| | | delimiter: 'semi', |
| | | delimiter: 'none', |
| | | requireLast: false, |
| | | }, |
| | | multilineDetection: 'brackets', |
| | |
| | | 'antfu/if-newline': 'off', |
| | | }, |
| | | }, |
| | | ); |
| | | ) |
| | |
| | | import { post, upload } from "@/utils/request" |
| | | import { post, upload } from '@/utils/request' |
| | | |
| | | // 文件上传 |
| | | export const uploadFile = filePath => |
| | | upload("/common/upload", { filePath, name: "file" }) |
| | | upload('/common/upload', { filePath, name: 'file' }) |
| | | |
| | | // 发送验证码 |
| | | export const sendCode = data => post("/sendCode", { data }) |
| | | export const sendCode = data => post('/sendCode', { data }) |