fixed #134
This commit is contained in:
梁灏 2016-12-19 09:59:08 +08:00
parent 6e572d4428
commit e0cd7f909a
5 changed files with 36 additions and 11 deletions

View file

@ -1,13 +1,27 @@
<template>
<div :class="classes">
</div>
</template>
<script>
const prefixCls = 'ivu-picker-panel';
const datePrefixCls = 'ivu-date-picker';
export default {
props: {},
data () {
return {}
},
computed: {},
computed: {
classes () {
return [
`${prefixCls}-body-wrapper`,
{
[`${prefixCls}-with-sidebar`]: this.shortcuts.length
}
]
}
},
methods: {}
}
</script>

View file

@ -16,7 +16,7 @@ export default {
props: {
type: {
validator (value) {
return oneOf(value, ['year', 'month', 'week', 'date', 'daterange', 'datetime', 'datetimerange']);
return oneOf(value, ['year', 'month', 'date', 'daterange', 'datetime', 'datetimerange']);
},
default: 'date'
},

View file

@ -1,5 +1,5 @@
<template>
<ul :class="simpleWrapClasses" v-if="simple">
<ul :class="simpleWrapClasses" :style="style" v-if="simple">
<li
title="上一页"
:class="prevClasses"
@ -23,7 +23,7 @@
<a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a>
</li>
</ul>
<ul :class="wrapClasses" v-else>
<ul :class="wrapClasses" :style="style" v-else>
<span :class="[prefixCls + '-total']" v-if="showTotal">
<slot> {{ total }} </slot>
</span>
@ -109,6 +109,12 @@
showSizer: {
type: Boolean,
default: false
},
class: {
type: String
},
style: {
type: Object
}
},
data () {
@ -127,7 +133,10 @@
simpleWrapClasses () {
return [
`${prefixCls}`,
`${prefixCls}-simple`
`${prefixCls}-simple`,
{
[`${this.class}`]: !!this.class
}
]
},
simplePagerClasses () {
@ -137,6 +146,7 @@
return [
`${prefixCls}`,
{
[`${this.class}`]: !!this.class,
'mini': !!this.size
}
]

View file

@ -15,10 +15,7 @@
@on-open-change="change2"></date-picker>
</i-col>
<i-col span="8">
<date-picker type="year" style="width:200px" placeholder="请选择日期" :value.sync="value" :options="options"></date-picker>
</i-col>
<i-col span="8">
<date-picker type="month" style="width:200px" placeholder="请选择日期" :value.sync="value" :options="options"></date-picker>
<date-picker type="daterange" style="width:200px" placeholder="请选择日期" :value.sync="value2" :options="options2"></date-picker>
</i-col>
</row>
</div>
@ -29,6 +26,10 @@
return {
// value: new Date(),
value: '2016-12-25',
value2: '',
options2: {
},
options: {
disabledDate(time) {
// console.log(time)

View file

@ -1,7 +1,7 @@
<template>
<Page :total="1000" show-sizer show-elevator show-total></Page>
<Page :total="1000" show-sizer show-elevator show-total class="classr" :style="{float: 'right'}"></Page>
<br><br>
<Page :total="1000" show-sizer show-elevator show-total size="small"></Page>
<Page :total="1000" show-sizer show-elevator show-total size="small" class="classr2"></Page>
<br><br>
<Page :current="2" :total="50" simple></Page>
</template>