We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 (
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
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
<VueDatePick
// 实现vue的v-model
$model={{
value: this.state.value1,
setter: (val) => {
this.setState({value1:val})
}
}}
align="right"
type="date"
placeholder="选择日期"/>
vue element-ui的Card
<VueCard class="aaa" $slots={{
header: (
vue的卡片
)
}}>
在element-ui的Card中应用react antd的DatePick
<ReactDatePick onChange={this.onChange} value={this.state.value1 && moment(this.state.value1)}/>
vue element-ui的datePicker
<VueDatePick
// 实现vue的v-model
$model={{
value: this.state.value1,
setter: (val) => {
this.setState({value1:val})
}
}}
align="right"
type="date"
placeholder="选择日期"/>
)
}
}
export default demo1
The text was updated successfully, but these errors were encountered: