This commit is contained in:
梁灏 2017-04-05 10:35:27 +08:00
parent 411cc21789
commit 891f61d875
3 changed files with 23 additions and 38 deletions

View file

@ -1,7 +1,9 @@
<template> <template>
<div> <div>
{{ val1 }} {{ val1 }}
<Date-picker type="datetime" placeholder="选择日期和时间" style="width: 200px"></Date-picker>
<Date-picker v-model="val1" type="date" placeholder="选择日期" style="width: 200px"></Date-picker> <Date-picker v-model="val1" type="date" placeholder="选择日期" style="width: 200px"></Date-picker>
<Date-picker type="daterange" placement="bottom-end" placeholder="选择日期" style="width: 200px"></Date-picker>
<div @click="val1 = '2017-03-02'">change</div> <div @click="val1 = '2017-03-02'">change</div>
</div> </div>
</template> </template>

View file

@ -1,25 +1,18 @@
<template> <template>
<div> <Table border :context="self" :columns="columns7" :data="data6"></Table>
<Row>
<i-col span="12">
<i-table border :content="self" :columns="columns7" :data="data6" :context="self"></i-table>
</i-col>
</Row>
</div>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
info: '123',
self: this, self: this,
columns7: [ columns7: [
{ {
title: '姓名', title: '姓名',
key: 'name', key: 'name',
// render (row, column, index) { render (row, column, index) {
// return `<Icon type="person"></Icon> <strong>${row.name}</strong>`; return `<div style="white-space:nowrap;"><Date-picker type="date" placeholder="选择日期" style="width: 200px"></Date-picker></div>`;
// } }
}, },
{ {
title: '年龄', title: '年龄',
@ -35,7 +28,7 @@
width: 150, width: 150,
align: 'center', align: 'center',
render (row, column, index) { render (row, column, index) {
return `{{ column }}`; return `<i-button type="primary" size="small" @click="show(${index})">查看</i-button> <i-button type="error" size="small" @click="remove(${index})">删除</i-button>`;
} }
} }
], ],
@ -45,29 +38,24 @@
age: 18, age: 18,
address: '北京市朝阳区芍药居' address: '北京市朝阳区芍药居'
}, },
// { {
// name: '', name: '张小刚',
// age: 25, age: 25,
// address: '西' address: '北京市海淀区西二旗'
// }, },
// { {
// name: '', name: '李小红',
// age: 30, age: 30,
// address: '' address: '上海市浦东新区世纪大道'
// }, },
// { {
// name: '', name: '周小伟',
// age: 26, age: 26,
// address: '' address: '深圳市南山区深南大道'
// } }
] ]
} }
}, },
computed: {
dddfff () {
return this.info
}
},
methods: { methods: {
show (index) { show (index) {
this.$Modal.info({ this.$Modal.info({
@ -78,12 +66,6 @@
remove (index) { remove (index) {
this.data6.splice(index, 1); this.data6.splice(index, 1);
} }
},
mounted () {
setTimeout(() => {
this.info = '444';
// this.data6[0].name = 'xxx';
}, 3000);
} }
} }
</script> </script>

View file

@ -18,6 +18,7 @@
&-cells{ &-cells{
width: @date-picker-cells-width; width: @date-picker-cells-width;
margin: 10px; margin: 10px;
white-space: normal;
span{ span{
display: inline-block; display: inline-block;
width: 24px; width: 24px;