zan-choose-link-menu
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -95,3 +95,4 @@ 'use strict'; | ||
menuHideDelay = _props.menuHideDelay, | ||
menuShowDelay = _props.menuShowDelay; | ||
menuShowDelay = _props.menuShowDelay, | ||
hasPopoverTrigger = _props.hasPopoverTrigger; | ||
@@ -108,3 +109,3 @@ var hasValue = !isEmptyValue(value); | ||
}, | ||
_react2['default'].createElement( | ||
hasPopoverTrigger ? _react2['default'].createElement( | ||
_popover2['default'], | ||
@@ -156,4 +157,16 @@ { | ||
) | ||
) : _react2['default'].createElement( | ||
_menu2['default'], | ||
{ onClick: this.onMenuClick }, | ||
menuItems.map(function (_ref4) { | ||
var title = _ref4.title, | ||
key = _ref4.key; | ||
return _react2['default'].createElement( | ||
MenuItem, | ||
{ key: key }, | ||
title | ||
); | ||
}) | ||
), | ||
hasValue && _react2['default'].createElement(LinkTag, { | ||
hasValue && hasPopoverTrigger && _react2['default'].createElement(LinkTag, { | ||
value: value, | ||
@@ -184,3 +197,6 @@ formatTag: formatTag, | ||
menuHideDelay: _propTypes2['default'].number, | ||
menuShowDelay: _propTypes2['default'].number | ||
menuShowDelay: _propTypes2['default'].number, | ||
// menu是否有popover触发 | ||
hasPopoverTrigger: _propTypes2['default'].bool | ||
}, _class.defaultProps = { | ||
@@ -191,3 +207,4 @@ isEmptyValue: function isEmptyValue(val) { | ||
menuHideDelay: 250, | ||
menuShowDelay: 150 | ||
menuShowDelay: 150, | ||
hasPopoverTrigger: true | ||
}, _temp2); | ||
@@ -197,6 +214,6 @@ exports['default'] = ChooseLinkMenu; | ||
function LinkTag(_ref4) { | ||
var value = _ref4.value, | ||
onDelete = _ref4.onDelete, | ||
formatTag = _ref4.formatTag; | ||
function LinkTag(_ref5) { | ||
var value = _ref5.value, | ||
onDelete = _ref5.onDelete, | ||
formatTag = _ref5.formatTag; | ||
@@ -203,0 +220,0 @@ var tag = formatTag(value); |
{ | ||
"name": "zan-choose-link-menu", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "选择链接菜单", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
397805
11190