king
2025-04-23 c8dec113736cc78c47cd63377d756d364b42a94e
src/menu/components/card/cardsimplecomponent/node-wrap/menus/index.jsx
@@ -1,8 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Icon } from 'antd'
import MkIcon from '@/components/mk-icon'
import Utils from '@/utils/utils.js'
import ColumnForm from './columnform'
import asyncComponent from '@/utils/asyncComponent'
@@ -27,7 +27,7 @@
        editable: true,
        unique: true,
        required: false,
        width: '35%'
        width: '20%'
      },
      {
        title: '颜色',
@@ -35,7 +35,8 @@
        inputType: 'color',
        editable: true,
        required: true,
        width: '35%'
        width: '20%',
        render: (text, record) => <span style={{display: 'inline-block', width: '40px', height: '25px', background: text}}></span>
      },
      {
        title: '图标',
@@ -43,8 +44,26 @@
        inputType: 'icon',
        editable: true,
        required: false,
        width: '35%',
        render: (text, record) => record.icon ? <Icon type={record.icon}/> : ''
        width: '20%',
        render: (text, record) => record.icon ? <MkIcon style={{fontSize: '24px'}} type={record.icon}/> : ''
      },
      {
        title: '连接线',
        dataIndex: 'linecolor',
        inputType: 'color',
        editable: true,
        required: false,
        allowClear: true,
        width: '20%',
        render: (text, record) => text ? <span style={{display: 'inline-block', width: '40px', height: '25px', background: text}}></span> : null
      },
      {
        title: '备注',
        dataIndex: 'remark',
        inputType: 'input',
        editable: true,
        required: false,
        width: '20%'
      }
    ]
  }
@@ -77,6 +96,7 @@
    return (
      <div style={{minHeight: '250px'}}>
        <ColumnForm menus={menus} columnChange={this.columnChange}/>
        <p style={{position: 'absolute', fontSize: '12px', transform: 'translate(0px, -20px)'}}>连接线在横向时间轴中有效</p>
        <EditTable actions={['edit', 'move', 'copy', 'del']} type={'timenodes'} data={menus} columns={columns} onChange={this.changeColumns}/>
      </div>
    )