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.3.0 to 0.3.1

dist/index.cjs.js

7

CHANGELOG.md
# @xiaohaih/condition-core
## 0.3.1
### Patch Changes
- 1. 修复 wrapper props 无法响应动态数据
- 2. 修复 hide 属性不生效
## 0.3.0

@@ -4,0 +11,0 @@

2

package.json
{
"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 @@ /** 自定义校验条件的值 */

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