uxcore-empty-data
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -103,4 +103,4 @@ 'use strict'; | ||
type: 'normal', | ||
icon: 'https://img.alicdn.com/tps/TB1SFFFOpXXXXXzXVXXXXXXXXXX-166-168.png', | ||
largeIcon: 'https://img.alicdn.com/tps/TB1oWW_OXXXXXXyapXXXXXXXXXX-390-390.png' | ||
icon: 'http://g.alicdn.com/uxcore/pic/empty.png', | ||
largeIcon: 'http://g.alicdn.com/uxcore/pic/empty.png' | ||
}; | ||
@@ -107,0 +107,0 @@ EmptyData.displayName = 'EmptyData'; |
@@ -13,4 +13,4 @@ /** | ||
class Demo extends React.Component { | ||
constructor(props) { | ||
@@ -39,2 +39,25 @@ super(props); | ||
</EmptyData> | ||
<h2>其他类型缺省页</h2> | ||
{[{ | ||
img: 'access_restriction', | ||
name: '权限限制', | ||
}, { | ||
img: 'active_empty', | ||
name: '查询类空页面', | ||
}, { | ||
img: 'request_error', | ||
name: '网页请求错误', | ||
}, { | ||
img: 'search_empty', | ||
name: '网页请求错误', | ||
}, { | ||
img: 'unknown_error', | ||
name: '未知错误', | ||
}].map(item => ( | ||
<EmptyData style={{ width: '200px', display: 'inline-block' }} icon={`https://g.alicdn.com/uxcore/pic/${item.img}.png`}> | ||
<div style={{ lineHeight: 2 }}> | ||
<div>{item.name}</div> | ||
</div> | ||
</EmptyData> | ||
))} | ||
</div> | ||
@@ -41,0 +64,0 @@ ); |
# history | ||
## 0.1.4 | ||
* `CHANGED` change default empty image | ||
## 0.1.3 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "uxcore-empty-data", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "uxcore-empty-data component for uxcore.", | ||
@@ -39,3 +39,2 @@ "repository": "https://github.com/uxcore/uxcore-empty-data.git", | ||
"es5-shim": "^4.5.8", | ||
"eslint-plugin-babel": "^4.1.2", | ||
"expect.js": "~0.3.1", | ||
@@ -42,0 +41,0 @@ "kuma-base": "1.x", |
@@ -26,4 +26,4 @@ /** | ||
type: 'normal', | ||
icon: 'https://img.alicdn.com/tps/TB1SFFFOpXXXXXzXVXXXXXXXXXX-166-168.png', | ||
largeIcon: 'https://img.alicdn.com/tps/TB1oWW_OXXXXXXyapXXXXXXXXXX-390-390.png', | ||
icon: 'http://g.alicdn.com/uxcore/pic/empty.png', | ||
largeIcon: 'http://g.alicdn.com/uxcore/pic/empty.png', | ||
}; | ||
@@ -30,0 +30,0 @@ |
import expect from 'expect.js'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import TestUtils, { Simulate } from 'react-addons-test-utils'; | ||
import Enzyme, { mount } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-15'; | ||
import Button from 'uxcore-button'; | ||
import EmptyData from '../src'; | ||
Enzyme.configure({ adapter: new Adapter() }); | ||
describe('EmptyData', () => { | ||
}); | ||
it('should render correctly', () => { | ||
mount(<EmptyData style={{ width: '200px' }} />); | ||
}); | ||
it('props', () => { | ||
const wrapper = mount(<EmptyData style={{ width: '200px' }} type="large"> | ||
<div>你还没有创建目标哦</div> | ||
<Button type="outline" style={{ marginTop: '10px' }}>添加目标</Button> | ||
</EmptyData>); | ||
expect(wrapper.find('.kuma-empty-data-content')).to.have.length(1); | ||
expect(wrapper.find(EmptyData)).to.have.length(1); | ||
expect(wrapper.contains(<Button type="outline" style={{ marginTop: '10px' }}>添加目标</Button>)).to.equal(true); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
77925
12
27
697