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

antd-mini

Package Overview
Dependencies
Maintainers
2
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antd-mini - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4-beta.1

32

es/Tips/index.js
import { TipsDefaultProps } from './props';
import { log } from '../_util/console';
Component({
props: TipsDefaultProps,
data: {
_show: true
_show: false
},
didMount: function didMount() {
this.showError();
this.setData({
_show: this.props.visible
});
},
didUpdate: function didUpdate() {
this.showError();
didUpdate: function didUpdate(prevProps) {
if (prevProps.visible !== this.props.visible) {
this.setData({
_show: this.props.visible
});
if (this.props.visible === false) {
this.beforeClose();
}
}
},
methods: {
showError: function showError() {
var title = this.props.title;
if (!title) {
log.warn('Tips', '缺少 title 属性。');
}
},
onButtonTap: function onButtonTap() {

@@ -33,4 +35,10 @@ var onButtonTap = this.props.onButtonTap;

});
this.beforeClose();
},
beforeClose: function beforeClose() {
if (typeof this.props.onClose === "function") {
this.props.onClose();
}
}
}
});

@@ -29,2 +29,7 @@ import { IBaseProps } from '../_base';

/**
* @description 是否显示 Tips 组件
* @default true
*/
visible?: boolean;
/**
* @description 关闭按钮位置

@@ -31,0 +36,0 @@ * @default right

export const TipsDefaultProps = {
showClose: false,
buttonPosition: 'bottom',
visible:true,
onClose: () => {}
};
{
"name": "antd-mini",
"version": "0.0.3",
"version": "0.0.4-beta.1",
"scripts": {

@@ -5,0 +5,0 @@ "dev": "minidev dev --less --typescript --no-source-map",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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