iview/test/routers/rate.vue

37 lines
958 B
Vue
Raw Normal View History

<template>
2017-01-17 16:58:03 +08:00
<Row>
<i-col span="12">
2017-03-02 19:31:21 +08:00
<Rate show-text :value="valueText"></Rate>
2017-01-17 16:58:03 +08:00
</i-col>
<i-col span="12">
2017-03-02 19:31:21 +08:00
<Rate show-text v-model="valueCustomText" >
2017-01-17 16:58:03 +08:00
<span style="color: #f5a623">{{ valueCustomText }}</span>
</Rate>
</i-col>
2017-03-02 19:31:21 +08:00
<i-col span="12">
<Rate disabled :value="valueDisabled"></Rate>
</i-col>
<i-col span="12">
<Rate allow-half :value="valueHalf" v-on:on-change="changeValue"></Rate>
</i-col>
2017-01-17 16:58:03 +08:00
</Row>
</template>
<script>
export default {
props: {},
data () {
2017-01-17 15:30:10 +08:00
return {
2017-01-17 16:58:03 +08:00
valueText: 3,
2017-03-02 19:31:21 +08:00
valueCustomText: 3.8,
valueDisabled: 2,
valueHalf: 2.5
2017-01-17 15:30:10 +08:00
};
},
computed: {},
2017-03-02 19:31:21 +08:00
methods: {
changeValue (val) {
console.log(val);
}
}
};
</script>