函数: isConditionsEvery()
小于 1 分钟
函数: isConditionsEvery()
function isConditionsEvery(conditions): boolean
是否每一个条件函数都满足?
参数
参数 | 类型 |
---|---|
conditions | Condition [] |
返回
boolean
Description
设计理由
旨在于封装这样的代码段
const conditions = [
() => !isEqual(nAssetRecord, oAssetRecord),
() => !isEqual(nAssetRecord, defPropsAssets),
() => isEdit.value || isInfo.value,
];
conditions.every((condition) => condition())