@xiaohaih/condition-core
Advanced tools
Comparing version 0.3.0 to 0.3.1
# @xiaohaih/condition-core | ||
## 0.3.1 | ||
### Patch Changes | ||
- 1. 修复 wrapper props 无法响应动态数据 | ||
- 2. 修复 hide 属性不生效 | ||
## 0.3.0 | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@xiaohaih/condition-core", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -0,0 +0,0 @@ import { ExtractPropTypes, computed, inject, onBeforeUnmount, PropType, ref, watch, watchEffect } from 'vue-demi'; |
@@ -6,3 +6,5 @@ import { del, getCurrentInstance, onBeforeUnmount, provide, ExtractPropTypes, ref, set, watch, toRefs } from 'vue-demi'; | ||
/** 外部需传递的 props */ | ||
export type WrapperProps = ExtractPropTypes<typeof wrapperProps> & { | ||
export type WrapperProps = ExtractPropTypes<typeof wrapperProps>; | ||
/** 外部传递的方法 */ | ||
export type WrapperOption = { | ||
/** 触发搜索事件 */ | ||
@@ -15,3 +17,3 @@ search?: (params: Record<string, any>) => void; | ||
/** 封装 wrapper 组件必备的信息 */ | ||
export function useWrapper(props: WrapperProps) { | ||
export function useWrapper(props: WrapperProps, option?: WrapperOption) { | ||
const child: CommonMethod[] = []; | ||
@@ -91,3 +93,3 @@ onBeforeUnmount(() => child.splice(0)); | ||
const msg = await validate(); | ||
msg ? props.toast?.(msg) : props.search?.(getQuery()); | ||
msg ? props.toast?.(msg) : option?.search?.(getQuery()); | ||
} | ||
@@ -100,3 +102,3 @@ /** 重置所有条件的值 */ | ||
}); | ||
props.reset?.(getQuery()); | ||
option?.reset?.(getQuery()); | ||
} | ||
@@ -103,0 +105,0 @@ /** 自定义校验条件的值 */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
430694
46
4268
5