zan-choose-dialog
Advanced tools
Comparing version 4.5.10 to 4.5.11
@@ -31,2 +31,6 @@ 'use strict'; | ||
var _get = require('lodash/get'); | ||
var _get2 = _interopRequireDefault(_get); | ||
var _classnames = require('classnames'); | ||
@@ -103,3 +107,18 @@ | ||
// 判断是否展示提示内容 | ||
// config.show_custom_link_notice_content 字段:是否展示 | ||
// noticeComponent:展示的组件 | ||
_createClass(Content, [{ | ||
key: 'isShowNoticeContent', | ||
value: function isShowNoticeContent() { | ||
var isShow = (0, _get2['default'])(this.props, 'config.show_custom_link_notice_content', false); | ||
var noticeComponent = this.props.noticeComponent; | ||
if (isShow && noticeComponent) return noticeComponent; | ||
return null; | ||
} | ||
}, { | ||
key: 'render', | ||
@@ -147,2 +166,3 @@ value: function render() { | ||
), | ||
this.isShowNoticeContent(), | ||
_react2['default'].createElement( | ||
@@ -200,5 +220,10 @@ 'div', | ||
title: '自定义链接', | ||
children: _react2['default'].createElement(Content, { id: id, onChoose: options.onChoose }) | ||
children: _react2['default'].createElement(Content, { | ||
id: id, | ||
onChoose: options.onChoose, | ||
noticeComponent: options.noticeComponent, | ||
config: options.config | ||
}) | ||
}); | ||
} | ||
module.exports = exports['default']; |
{ | ||
"name": "zan-choose-dialog", | ||
"version": "4.5.10", | ||
"version": "4.5.11", | ||
"description": "这是一个React组件", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1224458
34253
0