mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-02 10:57:24 +08:00
Compare commits
2 Commits
ed2a24f1e3
...
1daeea0cbb
Author | SHA1 | Date | |
---|---|---|---|
|
1daeea0cbb | ||
|
583feae7b7 |
@ -1,11 +1,10 @@
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import pluginVue from "eslint-plugin-vue";
|
||||
import * as parserVue from "vue-eslint-parser";
|
||||
import configPrettier from "eslint-config-prettier";
|
||||
import pluginPrettier from "eslint-plugin-prettier";
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import * as parserTypeScript from "@typescript-eslint/parser";
|
||||
import pluginTypeScript from "@typescript-eslint/eslint-plugin";
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores([
|
||||
@ -20,7 +19,7 @@ export default defineConfig([
|
||||
...js.configs.recommended,
|
||||
languageOptions: {
|
||||
globals: {
|
||||
// index.d.ts
|
||||
// types/index.d.ts
|
||||
RefType: "readonly",
|
||||
EmitType: "readonly",
|
||||
TargetContext: "readonly",
|
||||
@ -73,21 +72,10 @@ export default defineConfig([
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
...tseslint.config({
|
||||
extends: [...tseslint.configs.recommended],
|
||||
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
|
||||
languageOptions: {
|
||||
parser: parserTypeScript,
|
||||
parserOptions: {
|
||||
sourceType: "module",
|
||||
warnOnUnsupportedTypeScriptVersion: false
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": pluginTypeScript
|
||||
},
|
||||
rules: {
|
||||
...pluginTypeScript.configs.strict.rules,
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/no-redeclare": "error",
|
||||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
@ -114,20 +102,20 @@ export default defineConfig([
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
}),
|
||||
{
|
||||
files: ["**/*.d.ts"],
|
||||
rules: {
|
||||
"eslint-comments/no-unlimited-disable": "off",
|
||||
"import/no-duplicates": "off",
|
||||
"no-restricted-syntax": "off",
|
||||
"unused-imports/no-unused-vars": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ["**/*.?([cm])js"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-require-imports": "off",
|
||||
"@typescript-eslint/no-var-requires": "off"
|
||||
"@typescript-eslint/no-require-imports": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -148,18 +136,19 @@ export default defineConfig([
|
||||
jsx: true
|
||||
},
|
||||
extraFileExtensions: [".vue"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parser: tseslint.parser,
|
||||
sourceType: "module"
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": tseslint.plugin,
|
||||
vue: pluginVue
|
||||
},
|
||||
processor: pluginVue.processors[".vue"],
|
||||
rules: {
|
||||
...pluginVue.configs.base.rules,
|
||||
...pluginVue.configs["vue3-essential"].rules,
|
||||
...pluginVue.configs["vue3-recommended"].rules,
|
||||
...pluginVue.configs.essential.rules,
|
||||
...pluginVue.configs.recommended.rules,
|
||||
"no-undef": "off",
|
||||
"no-unused-vars": "off",
|
||||
"vue/no-v-html": "off",
|
||||
|
@ -25,7 +25,7 @@ export default defineFakeRoute([
|
||||
url: "/mine-logs",
|
||||
method: "get",
|
||||
response: () => {
|
||||
let list = [
|
||||
const list = [
|
||||
{
|
||||
id: 1,
|
||||
ip: faker.internet.ipv4(),
|
||||
|
18
package.json
18
package.json
@ -117,7 +117,7 @@
|
||||
"@commitlint/cli": "^19.8.0",
|
||||
"@commitlint/config-conventional": "^19.8.0",
|
||||
"@commitlint/types": "^19.8.0",
|
||||
"@eslint/js": "^9.23.0",
|
||||
"@eslint/js": "^9.24.0",
|
||||
"@faker-js/faker": "^9.6.0",
|
||||
"@iconify/json": "^2.2.321",
|
||||
"@iconify/vue": "4.2.0",
|
||||
@ -133,18 +133,16 @@
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/qs": "^6.9.18",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
||||
"@typescript-eslint/parser": "^8.28.0",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
||||
"boxen": "^8.0.1",
|
||||
"code-inspector-plugin": "^0.20.7",
|
||||
"cssnano": "^7.0.6",
|
||||
"dagre": "^0.8.5",
|
||||
"eslint": "^9.23.0",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-prettier": "^10.1.1",
|
||||
"eslint-plugin-prettier": "^5.2.5",
|
||||
"eslint-plugin-vue": "^9.33.0",
|
||||
"eslint-plugin-prettier": "^5.2.6",
|
||||
"eslint-plugin-vue": "^10.0.0",
|
||||
"gradient-string": "^3.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.5.0",
|
||||
@ -164,6 +162,7 @@
|
||||
"svgo": "^3.3.2",
|
||||
"tailwindcss": "^4.1.3",
|
||||
"typescript": "^5.8.2",
|
||||
"typescript-eslint": "^8.29.1",
|
||||
"unplugin-icons": "^22.1.0",
|
||||
"vite": "^6.2.3",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
@ -172,7 +171,7 @@
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vite-plugin-router-warn": "^1.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-eslint-parser": "^9.4.3",
|
||||
"vue-eslint-parser": "^10.1.3",
|
||||
"vue-tsc": "^2.2.8"
|
||||
},
|
||||
"engines": {
|
||||
@ -194,11 +193,6 @@
|
||||
"abab": "*",
|
||||
"glob": "*"
|
||||
},
|
||||
"peerDependencyRules": {
|
||||
"allowedVersions": {
|
||||
"eslint": "9"
|
||||
}
|
||||
},
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
"core-js",
|
||||
|
1538
pnpm-lock.yaml
generated
1538
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ import { ref, unref, onMounted } from "vue";
|
||||
import { LogicFlow } from "@logicflow/core";
|
||||
|
||||
interface Props {
|
||||
lf: LogicFlow;
|
||||
lf?: LogicFlow;
|
||||
catTurboData?: boolean;
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,8 @@ type nodeListType = {
|
||||
};
|
||||
|
||||
interface Props {
|
||||
lf: LogicFlow;
|
||||
nodeList: Array<nodeListType>;
|
||||
lf?: LogicFlow;
|
||||
nodeList?: Array<nodeListType>;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
@ -60,12 +60,15 @@ export function copyObj() {
|
||||
copyIsArray,
|
||||
clone,
|
||||
i = 1,
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
target = arguments[0] || {}, // 使用||运算符,排除隐式强制类型转换为false的数据类型
|
||||
deep = false,
|
||||
// eslint-disable-next-line prefer-const
|
||||
len = arguments.length;
|
||||
if (typeof target === "boolean") {
|
||||
deep = target;
|
||||
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
target = arguments[1] || {};
|
||||
i++;
|
||||
}
|
||||
@ -79,6 +82,7 @@ export function copyObj() {
|
||||
for (; i < len; i++) {
|
||||
//所以如果源对象中数据类型为Undefined或Null那么就会跳过本次循环,接着循环下一个源对象
|
||||
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
if ((options = arguments[i]) != null) {
|
||||
// 如果遇到源对象的数据类型为Boolean, Number for in循环会被跳过,不执行for in循环// src用于判断target对象是否存在name属性
|
||||
for (name in options) {
|
||||
|
@ -32,8 +32,8 @@ const calculate = (
|
||||
const offset = el.getBoundingClientRect();
|
||||
|
||||
// 获取点击位置距离 el 的垂直和水平距离
|
||||
let localX = e.clientX - offset.left;
|
||||
let localY = e.clientY - offset.top;
|
||||
const localX = e.clientX - offset.left;
|
||||
const localY = e.clientY - offset.top;
|
||||
|
||||
let radius = 0;
|
||||
let scale = 0.3;
|
||||
|
@ -6,7 +6,7 @@ import EnterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
import ArrowUpLine from "~icons/ri/arrow-up-line";
|
||||
import ArrowDownLine from "~icons/ri/arrow-down-line";
|
||||
|
||||
withDefaults(defineProps<{ total: number }>(), {
|
||||
withDefaults(defineProps<{ total?: number }>(), {
|
||||
total: 0
|
||||
});
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { useNav } from "@/layout/hooks/useNav";
|
||||
import ArrowLeft from "~icons/ri/arrow-left-double-fill";
|
||||
|
||||
interface Props {
|
||||
isActive: boolean;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
|
@ -7,7 +7,7 @@ import { useNav } from "@/layout/hooks/useNav";
|
||||
import MenuFold from "~icons/ri/menu-fold-fill";
|
||||
|
||||
interface Props {
|
||||
isActive: boolean;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
|
@ -4,7 +4,7 @@ import MenuFold from "~icons/ri/menu-fold-fill";
|
||||
import MenuUnfold from "~icons/ri/menu-unfold-fill";
|
||||
|
||||
interface Props {
|
||||
isActive: boolean;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
|
@ -10,7 +10,7 @@ import zhLocale from "element-plus/es/locale/lang/zh-cn";
|
||||
|
||||
const siphonI18n = (function () {
|
||||
// 仅初始化一次国际化配置
|
||||
let cache = Object.fromEntries(
|
||||
const cache = Object.fromEntries(
|
||||
Object.entries(
|
||||
import.meta.glob("../../locales/*.y(a)?ml", { eager: true })
|
||||
).map(([key, value]: any) => {
|
||||
|
@ -140,8 +140,10 @@ Print.prototype = {
|
||||
"position:absolute;width:0;height:0;top:-10px;left:-10px;"
|
||||
);
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
w = f.contentWindow || f.contentDocument;
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
doc = f.contentDocument || f.contentWindow.document;
|
||||
doc.open();
|
||||
doc.write(content);
|
||||
|
@ -3,7 +3,7 @@ import { ref } from "vue";
|
||||
|
||||
// 声明 props 类型
|
||||
export interface FormProps {
|
||||
formInline: {
|
||||
formInline?: {
|
||||
user: string;
|
||||
region: string;
|
||||
};
|
||||
|
@ -3,7 +3,7 @@ import { useVModel } from "@vueuse/core";
|
||||
|
||||
// 声明 props 类型
|
||||
export interface FormProps {
|
||||
data: string;
|
||||
data?: string;
|
||||
}
|
||||
|
||||
// 声明 props 默认值
|
||||
|
@ -3,7 +3,7 @@ import { ref } from "vue";
|
||||
|
||||
// 声明 props 类型
|
||||
export interface FormProps {
|
||||
formInline: {
|
||||
formInline?: {
|
||||
user: string;
|
||||
region: string;
|
||||
};
|
||||
|
@ -3,7 +3,7 @@ import { useVModel } from "@vueuse/core";
|
||||
|
||||
// 声明 props 类型
|
||||
export interface FormProps {
|
||||
data: string;
|
||||
data?: string;
|
||||
}
|
||||
|
||||
// 声明 props 默认值
|
||||
|
@ -73,7 +73,7 @@ export function useColumns(selectRef: Ref, formRef: Ref, tableRef: Ref) {
|
||||
const onSearch = () => {
|
||||
tableData.value = cloneTableData;
|
||||
if (!isAllEmpty(searchForm.sexValue)) {
|
||||
let sex = sexOptions
|
||||
const sex = sexOptions
|
||||
.map(sex => sex.value === Number(searchForm.sexValue) && sex.label)
|
||||
.filter(Boolean)[0];
|
||||
tableData.value = tableData.value.filter(data => data.sex === sex);
|
||||
|
2
types/index.d.ts
vendored
2
types/index.d.ts
vendored
@ -75,8 +75,6 @@ interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
|
||||
$el: T;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
function parseInt(s: string | number, radix?: number): number;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
function parseFloat(string: string | number): number;
|
||||
|
2
types/router.d.ts
vendored
2
types/router.d.ts
vendored
@ -104,6 +104,6 @@ declare global {
|
||||
|
||||
// https://router.vuejs.org/zh/guide/advanced/meta.html#typescript
|
||||
declare module "vue-router" {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
// eslint-disable-next-line
|
||||
interface RouteMeta extends CustomizeRouteMeta {}
|
||||
}
|
||||
|
4
types/shims-tsx.d.ts
vendored
4
types/shims-tsx.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import Vue, { VNode } from "vue";
|
||||
import type Vue, { type VNode } from "vue";
|
||||
|
||||
declare module "*.tsx" {
|
||||
import Vue from "compatible-vue";
|
||||
@ -7,7 +7,9 @@ declare module "*.tsx" {
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
// eslint-disable-next-line
|
||||
interface Element extends VNode {}
|
||||
// eslint-disable-next-line
|
||||
interface ElementClass extends Vue {}
|
||||
interface ElementAttributesProperty {
|
||||
$props: any;
|
||||
|
1
types/shims-vue.d.ts
vendored
1
types/shims-vue.d.ts
vendored
@ -1,5 +1,6 @@
|
||||
declare module "*.vue" {
|
||||
import type { DefineComponent } from "vue";
|
||||
// eslint-disable-next-line
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user