You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
632 B
42 lines
632 B
<template> |
|
<view> |
|
<view class="item" @tap="timeVisible=true">选择时间</view> |
|
<view class="result">选择结果:{{result.result}}</view> |
|
<w-picker |
|
:visible.sync="timeVisible" |
|
mode="time" |
|
value="18:08:05" |
|
:current="true" |
|
:second="false" |
|
@confirm="onConfirm" |
|
@cancel="onCancel" |
|
ref="time" |
|
></w-picker> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
export default { |
|
data() { |
|
return { |
|
timeVisible:false, |
|
result:{ |
|
result:"" |
|
} |
|
}; |
|
}, |
|
methods:{ |
|
onConfirm(res){ |
|
this.result=res; |
|
console.log(res) |
|
}, |
|
onCancel(){ |
|
|
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style lang="scss"> |
|
|
|
</style>
|
|
|