Open edroplet opened 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 (
) }
} export default demo1
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()}
} export default demo1