fieteam / fie-toolkit-qnui Goto Github PK
View Code? Open in Web Editor NEWPlease use https://fusion.design/ instead
Please use https://fusion.design/ instead
文档中的fie 安装部分的请“参考该文档进行环境搭建” 对应的地址 http://fie.alibaba.com/doc 打不开
自定义组件接入Field时,组件的onChange事件触发自定义组件render,这样在有些比较复杂的自定义组件中,组件触发onChange真实意图只是告知Field值有更新,并不需要组件重新render,多次render会造成运行缓慢,不知可有解决方案!
[email protected] 组件样式冲突严重,气泡,tab切换有问题,dialog。。。
[core-error] 安装 @ali/fie-toolkit-qnui@latest 出错,请确认网络是否正常及包名是否输入正确
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
× 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: 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个警告,看着很讨厌,如何处理?
父组件是一个组件,其中有一个子组件的组件,请问咋样才能在父组件里面获取到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;
以下是错误信息:
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。
希望可以告知大家应该使用的npm版本,node版本,node-sass版本以及相应的操作系统 , 很多机器上运行都报错 , 麻烦了
页面没更新吧?怎么显示是聚星台?直接复制的fie-toolkit-blue?
另外问一下,桌面版qn-sdk可用么?完全找不到文档。。。
千牛的文档乱成一团了,什么qap、QAP-SDK、fie、QNUI、sui、react、rax、weex、jssdk。。。简直无力吐槽,能把文档好好写写吗?难道还是试验品?
开发阶段热加载如何配置呢,现在每修改一次都要重新fie start才能看到修改效果!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.