add 颜色选择
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Form, Input, InputNumber, Spin } from 'antd'
|
||||
import { AntIcon, IconSelector } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { AntIcon, ColorSelector, IconSelector } from 'components'
|
||||
import { api } from 'common/api'
|
||||
|
||||
const initialValues = {
|
||||
@@ -107,6 +106,9 @@ export default class form extends Component {
|
||||
}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="颜色" name="color">
|
||||
<ColorSelector placeholder="请选择颜色" />
|
||||
</Form.Item>
|
||||
<Form.Item label="排序" name="sort">
|
||||
<InputNumber
|
||||
max={1000}
|
||||
|
||||
@@ -38,6 +38,33 @@ export default class index extends Component {
|
||||
|
||||
// 表格字段
|
||||
columns = [
|
||||
{
|
||||
title: '图标',
|
||||
dataIndex: 'icon',
|
||||
width: 32,
|
||||
render: (text, record) => (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: '32px',
|
||||
height: '32px',
|
||||
borderRadius: '100%',
|
||||
backgroundColor: record.color,
|
||||
margin: '0 auto',
|
||||
}}
|
||||
>
|
||||
<AntIcon
|
||||
type={text}
|
||||
style={{
|
||||
fontSize: '20px',
|
||||
color: '#fff',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '应用名称',
|
||||
dataIndex: 'name',
|
||||
|
||||
Reference in New Issue
Block a user