亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我想問一下這個代碼要怎么才能運行出結果出來?我想問的重點是引用包的那部分

我想問一下這個代碼要怎么才能運行出結果出來?我想問的重點是引用包的那部分

慕碼人1183263 2016-11-08 11:05:53
我想問一下要怎么才能使運行我的這個html頁面出結果?我運行了,但沒有結果//我的html頁面:<html><head>? <title>test demo</title></head><body>? <div id='a'></div>? <script ?type='text/javacript' ?src="nice.js">? </script></body></html>//我的js頁面:import React, {PropTypes} from "react";//重點是引用包是怎么回事?這樣引用了之后感覺沒用啊?這樣寫了代碼之后要怎么操作才會有作用?能幫忙詳細的解釋嗎?謝謝!import {browserHistory, Link} from 'react-router'import {Form, Button, Input} from "antd";const FormItem = Form.Item;function noop() {? ? return false;}const formItemLayout = {? ? labelCol: {span: 7},? ? wrapperCol: {span: 12},};class SigninForm extends React.Component {? ? static propTypes = {? ? ? ? history: PropTypes.object.isRequired? ? };? ? static defaultProps = {? ? ? ? formStyle: {? ? ? ? ? ? width: "450px",? ? ? ? ? ? height: "380px",? ? ? ? ? ? margin: "auto",? ? ? ? ? ? background: "fff",? ? ? ? ? ? paddingTop: "120px"? ? ? ? }? ? };? ? handleSubmit(e) {? ? ? ? e.preventDefault();? ? ? ? const value = this.props.form.getFieldsValue();? ? ? ? this.props.action.signin(value);? ? }? ? componentWillReceiveProps(nextProps) {? ? ? ? if (this.props.sign !== nextProps.sign) {?? ? ? ? ? ?const user = nextProps.sign.get('user');? ? ? ? ? ? if (user && user !== this.props.sign.get('user')) {? ? ? ? ? ? ? ? browserHistory.push('/console/')? ? ? ? ? ? } else if (nextProps.sign.has('signinError')) {? ? ? ? ? ? ? ? this.props.form.setFieldsValue({password: ''});? ? ? ? ? ? ? ? window.alert(nextProps.sign.getIn(['signinError', 'errMsg']));? ? ? ? ? ? }? ? ? ? }? ? }? ? render() {? ? ? ? const {getFieldDecorator} = this.props.form;? ? ? ? return (? ? ? ? ? ? <Form style={this.props.formStyle} horizontal onSubmit={this.handleSubmit.bind(this)}>? ? ? ? ? ? ? ? <FormItem? ? ? ? ? ? ? ? ? ? {...formItemLayout}? ? ? ? ? ? ? ? ? ? label="用戶名"? ? ? ? ? ? ? ? ? ? hasFeedback>? ? ? ? ? ? ? ? ? ? {getFieldDecorator('account', {})(? ? ? ? ? ? ? ? ? ? ? ? <Input />? ? ? ? ? ? ? ? ? ? )}? ? ? ? ? ? ? ? </FormItem>? ? ? ? ? ? ? ? <FormItem? ? ? ? ? ? ? ? ? ? {...formItemLayout}? ? ? ? ? ? ? ? ? ? label="密碼"? ? ? ? ? ? ? ? ? ? hasFeedback>? ? ? ? ? ? ? ? ? ? {getFieldDecorator('password', {? ? ? ? ? ? ? ? ? ? ? ? rules: [? ? ? ? ? ? ? ? ? ? ? ? ? ? {required: true, whitespace: true, message: '請填寫密碼'}? ? ? ? ? ? ? ? ? ? ? ? ],? ? ? ? ? ? ? ? ? ? })(? ? ? ? ? ? ? ? ? ? ? ? <Input type="password" autoComplete="off"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?onContextMenu={noop} onPaste={noop} onCopy={noop} onCut={noop}/>? ? ? ? ? ? ? ? ? ? )}? ? ? ? ? ? ? ? </FormItem>? ? ? ? ? ? ? ? <FormItem wrapperCol={{span: 12, offset: 7}}>? ? ? ? ? ? ? ? ? ? <Button type="ghost"? ? ? ? ? ? ? ? ? ? ? ? ? ? onClick={e => browserHistory.push('/console/sign/signup')}>沒有創建?創建</Button>&nbsp;&nbsp;? ? ? ? ? ? ? ? ? ? <Button type="primary" htmlType="submit">登錄</Button>? ? ? ? ? ? ? ? </FormItem>? ? ? ? ? ? </Form>? ? ? ? )? ? }}SigninForm = Form.create({})(SigninForm);export default SigninForm;
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 2979 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號