zan-upload
Advanced tools
Comparing version 5.4.4 to 5.5.0
@@ -51,2 +51,6 @@ 'use strict'; | ||
var _IconsPopup = require('./components/IconsPopup'); | ||
var _IconsPopup2 = _interopRequireDefault(_IconsPopup); | ||
var _ProcessUpload = require('./components/ProcessUpload'); | ||
@@ -221,3 +225,4 @@ | ||
clippingTitle = _props.clippingTitle, | ||
uploadOptions = _objectWithoutProperties(_props, ['trigger', 'prefix', 'className', 'triggerClassName', 'tips', 'children', 'triggerInline', 'materials', 'clipping', 'clippingUrl', 'clippingTitle']); | ||
showIconTab = _props.showIconTab, | ||
uploadOptions = _objectWithoutProperties(_props, ['trigger', 'prefix', 'className', 'triggerClassName', 'tips', 'children', 'triggerInline', 'materials', 'clipping', 'clippingUrl', 'clippingTitle', 'showIconTab']); | ||
@@ -298,3 +303,4 @@ var _state = this.state, | ||
this.renderUploadComponent(uploadOptions) | ||
) | ||
), | ||
materials && showIconTab ? this.renderIconPopup(uploadOptions) : null | ||
) | ||
@@ -364,3 +370,3 @@ ) | ||
TabPanel, | ||
{ tab: '\u6211\u7684' + this.typeName, id: 'materials' }, | ||
{ tab: '\u6211\u7684' + this.typeName, id: 'materials', key: this.typeName }, | ||
_react2['default'].createElement(_MaterialsPopup2['default'], { | ||
@@ -375,3 +381,28 @@ prefix: prefix + '-upload', | ||
} | ||
}, { | ||
key: 'renderIconPopup', | ||
value: function renderIconPopup(options) { | ||
var _props3 = this.props, | ||
prefix = _props3.prefix, | ||
className = _props3.className; | ||
var showLocalUpload = this.state.showLocalUpload; | ||
// 显示本地上传时不显示该tab | ||
if (showLocalUpload) { | ||
return null; | ||
} | ||
return _react2['default'].createElement( | ||
TabPanel, | ||
{ tab: '\u56FE\u6807\u5E93', id: 'icon', key: 'icon' }, | ||
_react2['default'].createElement(_IconsPopup2['default'], { | ||
prefix: prefix + '-upload', | ||
options: options, | ||
className: className, | ||
showUploadPopup: this.showUpload | ||
}) | ||
); | ||
} | ||
/** | ||
@@ -413,2 +444,3 @@ * 设置弹框是否显示 | ||
triggerClassName: 'rc-upload-trigger', | ||
showIconTab: false, | ||
disabled: false, | ||
@@ -428,2 +460,3 @@ url: '', | ||
categoryListUrl: materialsHost + '/category/categoryList.json', | ||
iconListUrl: materialsHost + '/icon/list.json', | ||
fetchUrl: '', | ||
@@ -430,0 +463,0 @@ tokenUrl: '', |
{ | ||
"name": "zan-upload", | ||
"version": "5.4.4", | ||
"version": "5.5.0", | ||
"description": "这是一个React Upload 组件", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -319,2 +319,4 @@ ## zan-upload | ||
| clippingTitle | 裁剪Dialog标题 | string | `''` | 否 | | ||
| showIconTab | 是否展示图标Tab页(在materials为`true`时) | boolean | `false` | 否 | | ||
| iconListUrl | 自定义提取icon的url [GET] | string | `'//materials.youzan.com/icon/list.json'`| 否 | | ||
@@ -393,1 +395,5 @@ ### 更新日志 | ||
#### 5.5.0 | ||
- icon图标库上线 | ||
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1374388
16
37725
398