parent
b27687d35f
commit
4db5926d6b
5 changed files with 25 additions and 39 deletions
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="classes">
|
<div :class="classes">
|
||||||
<div :class="[prefixCls+ '-list']" v-el:hours>
|
<div :class="[prefixCls+ '-list']" v-el:hours>
|
||||||
<ul @click="handleClickHours">
|
<ul :class="[prefixCls + '-ul']" @click="handleClickHours">
|
||||||
<li :class="getCellCls(item)" v-for="item in hoursList" v-show="!item.hide" :index="$index">{{ formatTime(item.text) }}</li>
|
<li :class="getCellCls(item)" v-for="item in hoursList" v-show="!item.hide" :index="$index">{{ formatTime(item.text) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div :class="[prefixCls+ '-list']" v-el:minutes>
|
<div :class="[prefixCls+ '-list']" v-el:minutes>
|
||||||
<ul @click="handleClickMinutes">
|
<ul :class="[prefixCls + '-ul']" @click="handleClickMinutes">
|
||||||
<li :class="getCellCls(item)" v-for="item in minutesList" v-show="!item.hide" :index="$index">{{ formatTime(item.text) }}</li>
|
<li :class="getCellCls(item)" v-for="item in minutesList" v-show="!item.hide" :index="$index">{{ formatTime(item.text) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div :class="[prefixCls+ '-list']" v-show="showSeconds" v-el:seconds>
|
<div :class="[prefixCls+ '-list']" v-show="showSeconds" v-el:seconds>
|
||||||
<ul @click="handleClickSeconds">
|
<ul :class="[prefixCls + '-ul']" @click="handleClickSeconds">
|
||||||
<li :class="getCellCls(item)" v-for="item in secondsList" v-show="!item.hide" :index="$index">{{ formatTime(item.text) }}</li>
|
<li :class="getCellCls(item)" v-for="item in secondsList" v-show="!item.hide" :index="$index">{{ formatTime(item.text) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -155,11 +155,8 @@
|
||||||
const data = {};
|
const data = {};
|
||||||
data[type] = cell.text;
|
data[type] = cell.text;
|
||||||
this.$emit('on-change', data);
|
this.$emit('on-change', data);
|
||||||
|
|
||||||
// const from = this.$els[type].scrollTop;
|
|
||||||
// const to = 24 * this.getScrollIndex(type, cell.text);
|
|
||||||
// scrollTop(this.$els[type], from, to, 500);
|
|
||||||
}
|
}
|
||||||
|
this.$emit('on-pick-click');
|
||||||
},
|
},
|
||||||
scroll (type, index) {
|
scroll (type, index) {
|
||||||
const from = this.$els[type].scrollTop;
|
const from = this.$els[type].scrollTop;
|
||||||
|
|
|
@ -449,9 +449,9 @@
|
||||||
TYPE_VALUE_RESOLVER_MAP['default']
|
TYPE_VALUE_RESOLVER_MAP['default']
|
||||||
).parser;
|
).parser;
|
||||||
|
|
||||||
if (type === 'time' && !(val instanceof Date)) {
|
if (val && type === 'time' && !(val instanceof Date)) {
|
||||||
val = parser(val, this.format || DEFAULT_FORMATS[type]);
|
val = parser(val, this.format || DEFAULT_FORMATS[type]);
|
||||||
} else if (type === 'timerange' && Array.isArray(val) && val.length === 2 && !(val[0] instanceof Date) && !(val[1] instanceof Date)) {
|
} else if (val && type === 'timerange' && Array.isArray(val) && val.length === 2 && !(val[0] instanceof Date) && !(val[1] instanceof Date)) {
|
||||||
val = val.join(RANGE_SEPARATOR);
|
val = val.join(RANGE_SEPARATOR);
|
||||||
val = parser(val, this.format || DEFAULT_FORMATS[type]);
|
val = parser(val, this.format || DEFAULT_FORMATS[type]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,13 +48,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.loop-grid-columns(@index, @class) when (@index = 0) {
|
.loop-grid-columns(@index, @class) when (@index = 0) {
|
||||||
.@{col-prefix-cls}@{class}-@{index} {
|
.@{col-prefix-cls}-span@{class}-@{index} {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.@{col-prefix-cls}-push-@{index} {
|
.@{col-prefix-cls}@{class}-push-@{index} {
|
||||||
left: auto;
|
left: auto;
|
||||||
}
|
}
|
||||||
.@{col-prefix-cls}-pull-@{index} {
|
.@{col-prefix-cls}@{class}-pull-@{index} {
|
||||||
right: auto;
|
right: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,16 +24,17 @@
|
||||||
<!--style="width: 168px"></time-picker>-->
|
<!--style="width: 168px"></time-picker>-->
|
||||||
<!--</i-col>-->
|
<!--</i-col>-->
|
||||||
<i-col span="12">
|
<i-col span="12">
|
||||||
<time-picker
|
<Time-picker type="time" :value="value" placeholder="选择时间" style="width: 168px"></Time-picker>
|
||||||
:value="value2"
|
<!--<time-picker-->
|
||||||
type="timerange"
|
<!--:value="value2"-->
|
||||||
placeholder="选择时间"
|
<!--type="timerange"-->
|
||||||
format="HH:mm:ss"
|
<!--placeholder="选择时间"-->
|
||||||
:hide-disabled-options="false"
|
<!--format="HH:mm:ss"-->
|
||||||
@on-change="c"
|
<!--:hide-disabled-options="false"-->
|
||||||
@on-ok="ok"
|
<!--@on-change="c"-->
|
||||||
@on-clear="clear"
|
<!--@on-ok="ok"-->
|
||||||
style="width: 168px"></time-picker>
|
<!--@on-clear="clear"-->
|
||||||
|
<!--style="width: 168px"></time-picker>-->
|
||||||
</i-col>
|
</i-col>
|
||||||
</row>
|
</row>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -4,25 +4,13 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
{{properties|json}}<br>
|
<row>
|
||||||
{{units|json}}
|
<i-col span="0">123</i-col>
|
||||||
<Checkbox-group :model.sync="properties">
|
<i-col span="24">24</i-col>
|
||||||
<Checkbox v-for="unit in units" :value="unit.UnitName"></Checkbox>
|
</row>
|
||||||
</Checkbox-group>
|
|
||||||
<Back-top></Back-top>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
properties: [],
|
|
||||||
units: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ready () {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.units = [{UnitName:"件"},{UnitName:"箱"},{UnitName:"双"}];
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue