Coder Social home page Coder Social logo

fie-toolkit-qnui's People

Contributors

fattydevelop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fie-toolkit-qnui's Issues

自定义组件接入Field的问题

自定义组件接入Field时,组件的onChange事件触发自定义组件render,这样在有些比较复杂的自定义组件中,组件触发onChange真实意图只是告知Field值有更新,并不需要组件重新render,多次render会造成运行缓慢,不知可有解决方案!

描述更正和npm start报错的解决优化

  • utils:项目中一些共用的功能及函数集合;
  • npm start时,出现

Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime
解决:
package.json中"node-sass": 版本改为"^4.2.0",重新install;或者npm install node-sass,然后再npm start

fie install toolkit-qnui 安装不了

× Install fail! RequestError: connect ETIMEDOUT 100.67.95.39:80 (req "error"), GET http://registry.npm.alibaba-inc.com/@ali%2Ffie-toolkit-qnui -1 (connected: false, keepalive socket: false, agent status: {"createSocketCount":6,"createSocketErrorCount":0,"closeSocketCount":5,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":0,"freeSockets":{},"sockets":{"registry.npm.alibaba-inc.com:80:":1},"requests":{}})
headers: {}
Error: connect ETIMEDOUT 100.67.95.39:80
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
npminstall version: 3.2.1
npminstall args: C:\Program Files (x86)\nodejs\node.exe C:\Users\ww\AppData\Roaming\npm\node_modules\fie\node_modules\npminstall\bin\install.js @ali/fie-toolkit-qnui@latest --cwd=C:\Users\ww.fie --registry=http://registry.npm.alibaba-inc.com/ --china --stdio=inherit
'tnpm' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
[core-error] 安装 @ali/fie-toolkit-qnui@latest 出错,请确认网络是否正常及包名是否输入正确

启动报错warning

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

Warning: RouterContext: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

报错2个警告,看着很讨厌,如何处理?

from中的子组件的值如果才能被父组件的field.getValues()获取到

父组件是一个组件,其中有一个子组件的组件,请问咋样才能在父组件里面获取到PointValue的值。我现在可以往父的state里面传值,但是在父组件的field.getValues()是取不到子组件的值的
父组件代码

`const FormItem = Form.Item;
const { Group: RadioGroup } = Radio;
const { Group: CheckboxGroup } = Checkbox;

const list = [
  {
      value: 'apple',
      label: '苹果'
  }, {
      value: 'pear',
      label: '梨'
  }, {
      value: 'orange',
      label: '橙子'
  }
];
class FromDemo extends React.Component {
  constructor(props, context) {
    super(props, context);
    this.field = new Field(this);
  }
    handleSubmit(e) {
        e.preventDefault();
        console.log('收到表单值:', this.field.getValues());
        this.field.validate();
    }
//回调
    transferPointValue(pointVaue){
        this.setState({
			pointVaue
        })
        setTimeout(() => {
            console.log(this.state.pointVaue);
        }, 1000);
        
    }

    render() {
        const init = this.field.init;
        const formItemLayout = {
            labelCol: {span: 6},
            wrapperCol: {span: 14},
        };
        const insetItemLayout = {
            labelCol: {span: 6},
            wrapperCol: {span: 18},
        };
        return (
          <div className="containter-all">
            <div className="container-title-box">
              <h2 className="container-title">test</h2>
            </div>
            <Form field={this.field} labelAlign='left'
                      labelTextAlign='right'>
                      <PointComponent getField={() => this.getField()} transferPointValue = {pointVaue => this.transferPointValue(pointVaue)} vip1PointValue="1" vip2PointValue="2" vip3PointValue="3" vip4PointValue="4" vip5PointValue="5" vip6PointValue="6" />
                <FormItem
                    label="密码:"
                    {...formItemLayout}>
                    <Balloon trigger={<Input htmlType="password"/>} align="r" triggerType="hover">
                          input password
                    </Balloon>
                </FormItem>
                <Grid.Row style={{ marginTop: 24 }}>
                    <Grid.Col offset="6">
                        <Button type="primary" onClick={this.handleSubmit.bind(this)}>确定</Button>
                    </Grid.Col>
                </Grid.Row>
            </Form>
          </div>
        );
    }
}

ReactDOM.render(<FromDemo />, document.getElementById('container'));`

子组件代码

const FormItem = Form.Item;

class PointComponent extends React.Component {
    constructor(props, context) {
        super(props, context);
        this.field = new Field(this,{
        onChange: (name, value) => {
            switch (name) {
                case 'vip1PointValue':
                    let pointVaue = {[name] : value};
                    this.prop.transferPointValue(pointVaue);
                    this.field.setValue('vip1PointValue', value);
                    console.log(this.field.getValues());
                    break;
                }
            }
        });
    }

    handleSubmit(e) {
        e.preventDefault();
        console.log('收到表单值:', this.prop.pfield.getValues());
    }
    render() {
        const init = this.field.init;
        return (
            <div>
                <FormItem label="VIP1" >
                    <Input htmlType="number" className="short-input" {...init('vip1PointValue', {initValue:this.props.vip1PointValue})} step="1" min="1" maxLength="5" style={{width: 60}}/>
                    <span className="input-line-text">积分</span>
                </FormItem>
                <Button type="primary" onClick={this.handleSubmit.bind(this)}>确定</Button>
            </div>
        );
    }
}

export default PointComponent;

fie start的时候自动安装 fie-toolkit-qnui 报错

以下是错误信息:
Error: connect ETIMEDOUT 100.67.95.39:80
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)

[fie-error] 安装 @ali/fie-toolkit-qnui@latest 出错,请确认网络是否正常及包名是否输入正确。
我ping了一下也确实ping不通100.67.95.39:80。

README中没有开发环境描述

希望可以告知大家应该使用的npm版本,node版本,node-sass版本以及相应的操作系统 , 很多机器上运行都报错 , 麻烦了

运行后显示聚星台

页面没更新吧?怎么显示是聚星台?直接复制的fie-toolkit-blue?
另外问一下,桌面版qn-sdk可用么?完全找不到文档。。。
千牛的文档乱成一团了,什么qap、QAP-SDK、fie、QNUI、sui、react、rax、weex、jssdk。。。简直无力吐槽,能把文档好好写写吗?难道还是试验品?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.