我在我的ubuntu机器上安装docker并且我正在学习本教程 https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#extra-steps-for-aufs
当我运行sudo apt-get install -y docker-ce时,它不会在我的机器上安装docker并给出以下错误
$ sudo apt-get install -y docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
docker-ce : …Run Code Online (Sandbox Code Playgroud) 我正在使用react redux形式字段,我有下拉类.我可以从下拉菜单中选择任何一个班级.但问题是,当我从下拉列表中选择任何值(类)时,我想触发onChange操作.当我用on on触发动作时,下拉值没有设置,也没有显示选定的值.我正在使用以下代码行
<Field name="class._id" component="select" className="form-control" onChange={this.onChange.bind(this)} >
<option value="">Select class...</option>
{this.props.classes.map(Class =>
<option value={Class._id} key={Class._id} >{Class.name}</option>)}
</Field>
Run Code Online (Sandbox Code Playgroud)
这里是onChange函数
onChange(){
console.log(" Triggered")
}
Run Code Online (Sandbox Code Playgroud)
如果我没有设置onChange事件,我的下拉工作正确,它会正确显示所选值和正确的文本.但是我想在每次使用时调用函数选择任何值
我使用react路由器扩展来定义我的应用程序中的反应路由.工作正常的每一件事,但问题是,如果我使用es6语法来定义类而App.js不是index.js"不能将类称为函数".如果更改App.js文件格式,App.jsx它将解决我的问题.我如何index.jsx以.js es6格式定义文件?或任何正确的方法来解决这个问题?这些是我的反应路由器文件和app.js文件.这是react-router库的https://github.com/reactjs/react-router的 github链接
index.jsx
import React from 'react'
import { render } from 'react-dom'
import { Router, Route, browserHistory } from 'react-router'
import App from './app/App'
render((
<Router history={browserHistory}>
<Route path="/" component={App}/>
</Router>
), document.getElementById('app'))
Run Code Online (Sandbox Code Playgroud)
现在反应路由器文件是// App.js文件
import React from 'react';
import { Link } from 'react-router'
class App extends React.createClass{
constructor(props) {
super(props);
}
render() {
return (
<div>
This is a App.js file write in …Run Code Online (Sandbox Code Playgroud) 我在ApplicationController中有搜索属性,并且它与搜索的输入字段链接.我想在ProjectController中访问ApplicationController的搜索字段.它应该是同步的.我使用以下代码,但它不起作用.
/ app/controllers/projects/index.js(项目控制器)
import Ember from 'ember';
export default Ember.Controller.extend({
needs: ['application'],
searchBinding: 'controllers.application.search'
});
Run Code Online (Sandbox Code Playgroud)
/ app/controllers/application.js(应用程序控制器)
import Ember from 'ember';
export default Ember.Controller.extend({
search: ''
)}
Run Code Online (Sandbox Code Playgroud)
application.hbs
{{input value = search}}
ember.js ember-data ember-controllers ember-cli ember-components
我使用redux形式进行反应应用.即时通讯在控制台上面对这种警告呈现形式
warning: Unknown props `initialValue`, `autofill`, `onUpdate`, `valid`, `invalid`, `dirty`, `pristine`, `active`, `touched`, `visited`, `autofilled` on <input> tag. Remove these props from the element.
Run Code Online (Sandbox Code Playgroud)
如何以redux格式解决此警告
我从redux表单官方页面开始关注本教程,网址为 http://redux-form.com/5.3.1/#/getting-started?_k=8q7qyo
我面临着两个问题
1:如何在handleSubmit函数或任何其他函数中获取表单数据。这样我就可以根据需要处理表格数据。
2:每次我提交表单时,页面都会刷新。我不想刷新我的页面
import React, {Component} from 'react';
import {reduxForm} from 'redux-form';
class ContactForm extends Component {
render() {
const {fields: {firstName, lastName, email}, handleSubmit} = this.props;
return (
<form onSubmit={handleSubmit}>
<div>
<label>First Name</label>
<input type="text" placeholder="First Name" {...firstName}/>
</div>
<div>
<label>Last Name</label>
<input type="text" placeholder="Last Name" {...lastName}/>
</div>
<div>
<label>Email</label>
<input type="email" placeholder="Email" {...email}/>
</div>
<button type="submit">Submit</button>
</form>
);
}
}
ContactForm = reduxForm({ // <----- THIS IS THE IMPORTANT PART!
form: 'contact', // a …Run Code Online (Sandbox Code Playgroud) reactjs ×4
redux ×3
redux-form ×3
react-redux ×2
docker ×1
ember-cli ×1
ember-data ×1
ember.js ×1
react-native ×1
react-router ×1
ubuntu ×1
ubuntu-16.04 ×1