gloriasoft / vuereact-combined

Vue和React快捷集成的工具包,并且适合复杂的集成场景
272 stars 19 forks source link

el-table不展示数据 #28

Open edroplet opened 7 months ago

edroplet commented 7 months ago

import React from 'react' import { DatePicker, Card, Table, TableColumn } from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import { DatePicker as ReactDatePick } from "antd" import "antd/dist/antd.css" import moment from 'moment' import { applyVueInReact } from 'vuereact-combined' const VueDatePick = applyVueInReact(DatePicker) const VueCard = applyVueInReact(Card) const VueTable = applyVueInReact(Table) const VueTableCloumn = applyVueInReact(TableColumn)

// const dateFormat = moment(new Date()) class demo1 extends React.Component{ constructor (props) { super(props) this.state = { value1: new Date(), } this.onChange = this.onChange.bind(this) } onChange (val) { let date if (!val) { date = val } else { date = val.toDate() } this.setState({ value1: date }) } tableData () { return [ { id: 1, title: 'VueTable组件1', } ] } render(){ return (

React 组件

{this.state.value1 && this.state.value1.toString()}

vue element-ui的datePicker { this.setState({value1:val}) } }} align="right" type="date" placeholder="选择日期"/>
vue element-ui的Card vue的卡片
) }}>
在element-ui的Card中应用react antd的DatePick
vue element-ui的datePicker { this.setState({value1:val}) } }} align="right" type="date" placeholder="选择日期"/>
    )
}

} export default demo1

edroplet commented 7 months ago
image