bee-form-control
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -1,3 +0,44 @@ | ||
import Demo from './FormControlDemo'; | ||
import FormControl from '../src'; | ||
import React, { Component } from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
ReactDOM.render(<Demo/>, document.getElementById('tinperBeeDemo')); | ||
function demo1() { | ||
return ( | ||
<div className="demo-form-control"> | ||
<FormControl placeholder="Enter text"/> | ||
</div> | ||
); | ||
} | ||
class Demo2 extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.HanderChange = this.HanderChange.bind(this); | ||
this.state = { | ||
value: 'test' | ||
} | ||
} | ||
HanderChange () { | ||
let value = ReactDOM.findDOMNode(this.refs.demo2).value; | ||
this.setState ({value: value}); | ||
} | ||
render(){ | ||
return( | ||
<div className="demo-form-control"> | ||
<FormControl ref='demo2' defaultValue='test' onChange={this.HanderChange} /> | ||
<span>{this.state.value}</span> | ||
</div> | ||
) | ||
} | ||
} | ||
ReactDOM.render(demo1(), document.getElementById('ReactControlLabelDemo1')); | ||
ReactDOM.render( | ||
<Demo2 />, | ||
document.getElementById('ReactControlLabelDemo2') | ||
); |
{ | ||
"name": "bee-form-control", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "form-control ui component for react", | ||
@@ -32,5 +32,7 @@ "keywords": [ | ||
"browsers": "bee-tools run browsers", | ||
"pub": "bee-tools run pub" | ||
"pub": "bee-tools run pub", | ||
"coveralls": "bee-tools run coverage" | ||
}, | ||
"dependencies": { | ||
"bee-control-label": "0.0.4", | ||
"classnames": "^2.2.5", | ||
@@ -37,0 +39,0 @@ "tinper-bee-core": "latest", |
# bee-form-control | ||
[](https://www.npmjs.com/package/bee-form-control) | ||
[](https://travis-ci.org/tinper-bee/bee-form-control) | ||
[](https://travis-ci.org/tinper-bee/bee-form-control) | ||
[](https://coveralls.io/github/tinper-bee/bee-form-control?branch=master) | ||
[](https://david-dm.org/tinper-bee/bee-form-control#info=devDependencies) | ||
@@ -5,0 +6,0 @@ |
import React from 'react'; | ||
import {shallow, mount, render} from 'enzyme'; | ||
import {expect} from 'chai'; | ||
var webdriver = require('selenium-webdriver'); | ||
import FormControl from '../src/index'; | ||
@@ -10,3 +9,3 @@ | ||
let formControl = shallow(<FormControl/>); | ||
expect(formControl.hasClass('u-input')).to.equal(true); | ||
expect(formControl.hasClass('form-control')).to.equal(true); | ||
}); | ||
@@ -16,26 +15,1 @@ | ||
describe('测试FormControl页面', function () { | ||
let url="http://10.1.243.159:3000/"; | ||
var driver; | ||
this.timeout(50000); | ||
afterEach(function(){ | ||
driver.quit(); | ||
}) | ||
it('设置的默认值与浏览器显示的默认值一致', function () { | ||
let mywidget,container; | ||
let By = webdriver.By; | ||
driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build(); | ||
return driver.get(url) | ||
.then(function(){ | ||
return driver.findElements(By.css('input.u-input')); | ||
}) | ||
.then(function(ele){ | ||
return ele[1].getAttribute("value"); | ||
}) | ||
.then(function(inputvalue){ | ||
expect(inputvalue).to.equal("FormControl test"); | ||
}) | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
59
1
1
13427
4
16
223
+ Addedbee-control-label@0.0.4
+ Addedbee-control-label@0.0.4(transitive)