mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
chore: 更新eslint相关依赖并作兼容处理
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user