Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xiaohaih/condition-core

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xiaohaih/condition-core - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

6

CHANGELOG.md
# @xiaohaih/condition-core
## 0.5.1
### Patch Changes
- 删除 realtimeFlag 内部已做值相同时忽略后续逻辑的处理
## 0.5.0

@@ -4,0 +10,0 @@

2

package.json
{
"name": "@xiaohaih/condition-core",
"version": "0.5.0",
"version": "0.5.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

@@ -55,5 +55,5 @@ import {

// 防止触发搜索时, query 产生变化内部重复赋值
const { flag: realtimeFlag, updateFlag: updateRealtimeFlag } = useDisableInCurrentCycle();
// const { flag: realtimeFlag, updateFlag: updateRealtimeFlag } = useDisableInCurrentCycle();
// 防止触发搜索时, backfill 产生变化内部重复赋值
const { flag: backfillFlag, updateFlag: updateBackfillFlag } = useDisableInCurrentCycle();
// const { flag: backfillFlag, updateFlag: updateBackfillFlag } = useDisableInCurrentCycle();

@@ -63,8 +63,8 @@ const option = defineCommonMethod({

const { multiple } = props;
updateRealtimeFlag();
updateBackfillFlag();
// updateRealtimeFlag();
// updateBackfillFlag();
checked.value = (props.resetToInitialValue && initialValue.value?.slice()) || (multiple ? [] : '');
},
updateWrapperQuery() {
updateRealtimeFlag();
// updateRealtimeFlag();
wrapper && Object.entries(getQuery()).forEach(([k, v]) => wrapper.updateQueryValue(k, v, props.field));

@@ -83,2 +83,5 @@ },

option.updateWrapperQuery();
// fix: 初始更新值且外部也设置值时
// 会导致内部无法同步到最新值
// realtimeFlag.value = true;
}

@@ -110,3 +113,3 @@

// 仅在值发生变化时同步 忽视空值不一致的问题
if (!realtimeFlag.value) return;
// if (!realtimeFlag.value) return;
const _val = props.backfillToValue(val, _field, props.query);

@@ -150,3 +153,3 @@ if (_field.toString() !== __field.toString() || isEqualExcludeEmptyValue(_val, checked.value)) return;

([_depend, _dependFields], [__depend, __dependFields]) => {
if (!realtimeFlag.value) return;
// if (!realtimeFlag.value) return;
// 是否启用依赖, 相同时启用才走后续逻辑, 不同时直接走后续逻辑

@@ -153,0 +156,0 @@ if (_depend === __depend && !_depend) return;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc