Commit cbf3c091 authored by nano's avatar nano

fix warning

parent 86a0c1dc
This diff is collapsed.
...@@ -476,10 +476,12 @@ class AppDetail extends React.Component { ...@@ -476,10 +476,12 @@ class AppDetail extends React.Component {
</FormItem> </FormItem>
<FormItem <FormItem
{...formItemLayout} {...formItemLayout}>
help="以 http:// 或 https:// 开头,没有可留空">
{getFieldDecorator('homepage', { {getFieldDecorator('homepage', {
initialValue: homepage initialValue: homepage,
rules: [{
type: 'url', message: '以 http:// 或 https:// 开头,没有可留空',
}]
})( })(
<Input addonBefore={<Icon type="home"/>} placeholder="网站"/> <Input addonBefore={<Icon type="home"/>} placeholder="网站"/>
)} )}
...@@ -496,13 +498,11 @@ class AppDetail extends React.Component { ...@@ -496,13 +498,11 @@ class AppDetail extends React.Component {
</FormItem> </FormItem>
<FormItem <FormItem
{...formItemLayout} {...formItemLayout}>
help="JSON string[],不会写请联系 zh99998@gmail.com"
>
{getFieldDecorator('tags', { {getFieldDecorator('tags', {
initialValue: tags initialValue: tags
})( })(
<Select tags style={{width: '100%'}} placeholder="标签"> <Select mode="tags" style={{width: '100%'}} placeholder="标签">
</Select> </Select>
)} )}
</FormItem> </FormItem>
...@@ -512,7 +512,7 @@ class AppDetail extends React.Component { ...@@ -512,7 +512,7 @@ class AppDetail extends React.Component {
initialValue: locales initialValue: locales
})( })(
<Select <Select
tags mode="tags"
style={{width: '100%'}} style={{width: '100%'}}
placeholder="游戏支持的语言"> placeholder="游戏支持的语言">
{defLocales.map((locale, i) => { {defLocales.map((locale, i) => {
...@@ -715,7 +715,7 @@ class AppDetail extends React.Component { ...@@ -715,7 +715,7 @@ class AppDetail extends React.Component {
{getFieldDecorator(`dependencies[${platform}]`, { {getFieldDecorator(`dependencies[${platform}]`, {
initialValue: dependencies[platform] initialValue: dependencies[platform]
})( })(
<Select tags style={{width: '100%'}} placeholder="dependencies"> <Select mode="tags" style={{width: '100%'}} placeholder="dependencies">
</Select> </Select>
)} )}
</FormItem> </FormItem>
...@@ -724,7 +724,7 @@ class AppDetail extends React.Component { ...@@ -724,7 +724,7 @@ class AppDetail extends React.Component {
{getFieldDecorator(`references[${platform}]`, { {getFieldDecorator(`references[${platform}]`, {
initialValue: references[platform] initialValue: references[platform]
})( })(
<Select tags style={{width: '100%'}} placeholder="references"> <Select mode="tags" style={{width: '100%'}} placeholder="references">
</Select> </Select>
)} )}
</FormItem> </FormItem>
...@@ -797,7 +797,7 @@ class AppDetail extends React.Component { ...@@ -797,7 +797,7 @@ class AppDetail extends React.Component {
{getFieldDecorator(`upload["packages"][${i}]["platforms"]`, { {getFieldDecorator(`upload["packages"][${i}]["platforms"]`, {
initialValue: pack["platforms"] initialValue: pack["platforms"]
})( })(
<Select multiple style={{width: '100%'}} placeholder="platforms"> <Select mode="multiple" style={{width: '100%'}} placeholder="platforms">
{defPlatform.map((_platform, i) => { {defPlatform.map((_platform, i) => {
return <Select.Option key={i} value={_platform}>{_platform}</Select.Option> return <Select.Option key={i} value={_platform}>{_platform}</Select.Option>
})} })}
...@@ -809,7 +809,7 @@ class AppDetail extends React.Component { ...@@ -809,7 +809,7 @@ class AppDetail extends React.Component {
{getFieldDecorator(`upload["packages"][${i}]["locales"]`, { {getFieldDecorator(`upload["packages"][${i}]["locales"]`, {
initialValue: pack["locales"] initialValue: pack["locales"]
})( })(
<Select multiple style={{width: '100%'}} placeholder="locales"> <Select mode="multiple" style={{width: '100%'}} placeholder="locales">
{defLocales.map((_locales, i) => { {defLocales.map((_locales, i) => {
return <Select.Option key={i} value={_locales}>{_locales}</Select.Option> return <Select.Option key={i} value={_locales}>{_locales}</Select.Option>
})} })}
......
...@@ -13,13 +13,11 @@ const columns = [ ...@@ -13,13 +13,11 @@ const columns = [
sorter: (a, b) => a.id - b.id, sorter: (a, b) => a.id - b.id,
render: id => <Link to={`apps/${id}`}>{id}</Link>, render: id => <Link to={`apps/${id}`}>{id}</Link>,
width: '10%', width: '10%',
key:'id'
}, { }, {
title: 'Name', title: 'Name',
dataIndex: 'name', dataIndex: 'name',
render: name => name && name["zh-CN"], render: name => name && name["zh-CN"],
width: '10%', width: '10%',
key: 'name'
},{ },{
title: "author", title: "author",
dataIndex: 'author', dataIndex: 'author',
...@@ -38,13 +36,11 @@ const columns = [ ...@@ -38,13 +36,11 @@ const columns = [
dataIndex: 'released_at', dataIndex: 'released_at',
sorter: true, sorter: true,
width: '10%', width: '10%',
key:'released_at'
}, { }, {
title: "Updated_at", title: "Updated_at",
dataIndex: 'updated_at', dataIndex: 'updated_at',
sorter: true, sorter: true,
width: '10%', width: '10%',
key:'updated_at'
}, },
] ]
...@@ -67,11 +63,11 @@ function Apps({children, dispatch, isCreate, isSubmit, apps}) { ...@@ -67,11 +63,11 @@ function Apps({children, dispatch, isCreate, isSubmit, apps}) {
} }
const TableProps = { const TableProps = {
rowKey: row => row.id,
columns, columns,
dataSource: Object.values(apps) dataSource: Object.values(apps)
} }
return ( return (
<div className={styles.normal}> <div className={styles.normal}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment