New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dragon-ui

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dragon-ui - npm Package Compare versions

Comparing version 0.0.55 to 0.0.56

4

CHANGELOG.md
# 版本更新日志
## 0.0.56
* Table组件新增rowClick属性,用于点击整行的操作
* 调整Icon组件type属性对应的字体样式
## 0.0.55

@@ -5,0 +9,0 @@ * 修复Slider组件接受新value为0时不更新的bug

4

components/Alert/index.jsx

@@ -18,6 +18,6 @@

case 'success':
iconType = 'check-round';
iconType = 'right-round';
break;
case 'error':
iconType = 'close-round';
iconType = 'wrong-round';
break;

@@ -24,0 +24,0 @@ }

@@ -38,6 +38,6 @@

case 'success':
iconType = 'check-round';
iconType = 'right-round';
break;
case 'error':
iconType = 'close-round';
iconType = 'wrong-round';
break;

@@ -44,0 +44,0 @@ }

@@ -10,3 +10,3 @@

const btnClose = onClose
? <div className="ui-modal-close" onClick={onClose}><Icon type="close" /></div>
? <div className="ui-modal-close" onClick={onClose}><Icon type="wrong" /></div>
: null;

@@ -13,0 +13,0 @@

@@ -6,3 +6,2 @@

import Checkbox from '../Checkbox';
// import TableSorter from './TableSorter';

@@ -56,3 +55,3 @@ class Table extends Component {

renderTable() {
const { columns, dataSource, rowSelection, ...others } = this.props;
const { columns, dataSource, rowClick, rowSelection, ...others } = this.props;

@@ -72,9 +71,9 @@ return (

? this.renderSelect(rowSelection, row)
: null
: null;
const renderCell = columns.map((column, columnIndex) => {
return this.renderCell(column, row, rowIndex, columnIndex)
})
return this.renderCell(column, row, rowIndex, columnIndex);
});
return (
<tr key={rowIndex}>
<tr key={rowIndex} onClick={() => rowClick(row)}>
{renderSelect}

@@ -95,3 +94,3 @@ {renderCell}

<th style={{width:50, textAlign: 'center'}}>
<Checkbox checked={this.state.selectedRows.length == dataSource.length} onChange={(e) => {
<Checkbox checked={this.state.selectedRows.length === dataSource.length} onChange={(e) => {
const selected = e.target.checked;

@@ -131,3 +130,3 @@ const selectedRows = selected

renderColumn(column, index) {
let render = ('columnRender' in column)
let render = ('columnRender' in column)
? column.columnRender(column, index)

@@ -150,4 +149,4 @@ : column.title;

'ui-table-sorter-active': !!sort,
}),
sortDownCls = classnames({
});
const sortDownCls = classnames({
'ui-table-sorter-down' : true,

@@ -168,3 +167,3 @@ 'ui-table-sorter-active': (sort !== undefined) && !sort,

const value = row[column.dataIndex];
const render = ('render' in column)
const render = ('render' in column)
? column.render(value, row, rowIndex)

@@ -207,2 +206,2 @@ : value;

export default Table;
export default Table;

@@ -26,3 +26,3 @@

const closeIcon = onClose
? <Icon type="close" onClick={!disabled && onClose} />
? <Icon type="wrong" onClick={!disabled && onClose} />
: null;

@@ -29,0 +29,0 @@ return (

@@ -45,3 +45,3 @@

}
<Icon type="close" title="删除" className="ui-upload-list-item-icon" onClick={() => onDelete(item)} />
<Icon type="wrong" title="删除" className="ui-upload-list-item-icon" onClick={() => onDelete(item)} />
{progress}

@@ -48,0 +48,0 @@ </div>

@@ -257,22 +257,26 @@

controlCol="col-sm-10">
<Icon type="check" theme="success" style={{fontSize: 30}} />
<Icon type="check-round" theme="success" style={{fontSize: 30}} />
<Icon type="check-round-fill" theme="success" style={{fontSize: 30}} />
<Icon type="close" theme="error" style={{fontSize: 30}} />
<Icon type="close-round" theme="error" style={{fontSize: 30}} />
<Icon type="close-round-fill" theme="error" style={{fontSize: 30}} />
<Icon type="info-round" theme="info" style={{fontSize: 30}} />
<Icon type="info-round-fill" theme="info" style={{fontSize: 30}} />
<Icon type="question-round" style={{fontSize: 30}} />
<Icon type="question-round-fill" style={{fontSize: 30}} />
<Icon type="warning-round" theme="warning" style={{fontSize: 30}} />
<Icon type="warning-round-fill" theme="warning" style={{fontSize: 30}} />
<Icon type="arrow-left" style={{fontSize: 30}} />
<Icon type="arrow-right" style={{fontSize: 30}} />
<Icon type="arrow-top" style={{fontSize: 30}} />
<Icon type="arrow-bottom" style={{fontSize: 30}} />
<Icon type="add" style={{fontSize: 30}} />
<Icon type="minus" style={{fontSize: 30}} />
<Icon type="date" style={{fontSize: 30}} />
<Icon type="loading" style={{fontSize: 30}} />
<Icon type="right" theme="success" />
<Icon type="right-round" theme="success" />
<Icon type="right-round-fill" theme="success" />
<Icon type="wrong" theme="error" />
<Icon type="wrong-round" theme="error" />
<Icon type="wrong-round-fill" theme="error" />
<Icon type="info-round" theme="info" />
<Icon type="info-round-fill" theme="info" />
<Icon type="question-round" />
<Icon type="question-round-fill" />
<Icon type="warning-round" theme="warning" />
<Icon type="warning-round-fill" theme="warning" />
<Icon type="arrow-left" />
<Icon type="arrow-right" />
<Icon type="arrow-top" />
<Icon type="arrow-bottom" />
<Icon type="add" />
<Icon type="add-round" />
<Icon type="add-round-fill" />
<Icon type="minus" />
<Icon type="minus-round" />
<Icon type="minus-round-fill" />
<Icon type="date" />
<Icon type="loading" />
</Form.Item>

@@ -284,7 +288,7 @@

controlCol="col-sm-10">
<Button size="xl" circle><Icon type="check" /></Button>
<Button size="lg" circle><Icon type="check" /></Button>
<Button circle><Icon type="check" /></Button>
<Button size="sm" circle><Icon type="check" /></Button>
<Button size="xs" circle><Icon type="check" /></Button>
<Button size="xl" circle><Icon type="wrong" /></Button>
<Button size="lg" circle><Icon type="wrong" /></Button>
<Button circle><Icon type="wrong" /></Button>
<Button size="sm" circle><Icon type="wrong" /></Button>
<Button size="xs" circle><Icon type="wrong" /></Button>
</Form.Item>

@@ -304,3 +308,3 @@

<Button round>椭圆角按钮</Button>
<Button><Icon type="check" loading /> 带图标的按钮</Button>
<Button><Icon type="right" loading /> 带图标的按钮</Button>
<Button disabled>禁用状态</Button>

@@ -358,3 +362,3 @@ <Button disabled loading>加载中的按钮</Button>

<Breadcrumb separator=">">
<Breadcrumb.Item><Icon type="check" /> 首页</Breadcrumb.Item>
<Breadcrumb.Item><Icon type="right" /> 首页</Breadcrumb.Item>
<Breadcrumb.Item href="">模块</Breadcrumb.Item>

@@ -447,3 +451,3 @@ <Breadcrumb.Item>应用</Breadcrumb.Item>

<br />
<Switch isCheckedText={<Icon type="check" />} unCheckedText={<Icon type="close" />} /> 图标开关
<Switch isCheckedText={<Icon type="right" />} unCheckedText={<Icon type="wrong" />} /> 图标开关
<br />

@@ -965,5 +969,11 @@ <Switch isCheckedText="是" unCheckedText="否" defaultValue={true} /> 设定默认值为true

<div style={{color: '#ccc'}}>
<a href="javascript:;" onClick={() => this._onClickOpen('alert')}>编辑</a>
<a href="javascript:;" onClick={(e) => {
e.stopPropagation(); //避免触发rowClick事件
this._onClickOpen('alert');
}}>编辑</a>
&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="javascript:;" onClick={() => this._onClickOpen('confirm')}>删除</a>
<a href="javascript:;" onClick={(e) => {
e.stopPropagation(); //避免触发rowClick事件
this._onClickOpen('confirm');
}}>删除</a>
</div>

@@ -973,2 +983,5 @@ );

}]}
rowClick={(row) => {
console.log(row);
}}
rowSelection={{

@@ -975,0 +988,0 @@ // value: this.state.tableSelection,

@@ -60,6 +60,6 @@ 'use strict';

case 'success':
iconType = 'check-round';
iconType = 'right-round';
break;
case 'error':
iconType = 'close-round';
iconType = 'wrong-round';
break;

@@ -66,0 +66,0 @@ }

@@ -79,6 +79,6 @@ 'use strict';

case 'success':
iconType = 'check-round';
iconType = 'right-round';
break;
case 'error':
iconType = 'close-round';
iconType = 'wrong-round';
break;

@@ -85,0 +85,0 @@ }

@@ -50,3 +50,3 @@ 'use strict';

{ className: 'ui-modal-close', onClick: onClose },
_react2['default'].createElement(_Icon2['default'], { type: 'close' })
_react2['default'].createElement(_Icon2['default'], { type: 'wrong' })
) : null;

@@ -53,0 +53,0 @@

@@ -37,4 +37,2 @@ 'use strict';

// import TableSorter from './TableSorter';
var Table = (function (_Component) {

@@ -108,5 +106,6 @@ _inherits(Table, _Component);

var dataSource = _props.dataSource;
var rowClick = _props.rowClick;
var rowSelection = _props.rowSelection;
var others = _objectWithoutProperties(_props, ['columns', 'dataSource', 'rowSelection']);
var others = _objectWithoutProperties(_props, ['columns', 'dataSource', 'rowClick', 'rowSelection']);

@@ -139,3 +138,5 @@ return _react2['default'].createElement(

'tr',
{ key: rowIndex },
{ key: rowIndex, onClick: function () {
return rowClick(row);
} },
renderSelect,

@@ -158,3 +159,3 @@ renderCell

{ style: { width: 50, textAlign: 'center' } },
_react2['default'].createElement(_Checkbox2['default'], { checked: this.state.selectedRows.length == dataSource.length, onChange: function (e) {
_react2['default'].createElement(_Checkbox2['default'], { checked: this.state.selectedRows.length === dataSource.length, onChange: function (e) {
var selected = e.target.checked;

@@ -219,4 +220,4 @@ var selectedRows = selected ? dataSource.map(function (data) {

'ui-table-sorter-active': !!sort
}),
sortDownCls = (0, _classnames3['default'])({
});
var sortDownCls = (0, _classnames3['default'])({
'ui-table-sorter-down': true,

@@ -223,0 +224,0 @@ 'ui-table-sorter-active': sort !== undefined && !sort

@@ -74,3 +74,3 @@ 'use strict';

var closeIcon = onClose ? _react2['default'].createElement(_Icon2['default'], { type: 'close', onClick: !disabled && onClose }) : null;
var closeIcon = onClose ? _react2['default'].createElement(_Icon2['default'], { type: 'wrong', onClick: !disabled && onClose }) : null;
return _react2['default'].createElement(

@@ -77,0 +77,0 @@ 'div',

@@ -92,3 +92,3 @@ 'use strict';

),
_react2['default'].createElement(_Icon2['default'], { type: 'close', title: '删除', className: 'ui-upload-list-item-icon', onClick: function () {
_react2['default'].createElement(_Icon2['default'], { type: 'wrong', title: '删除', className: 'ui-upload-list-item-icon', onClick: function () {
return onDelete(item);

@@ -95,0 +95,0 @@ } }),

{
"name": "dragon-ui",
"version": "0.0.55",
"version": "0.0.56",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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