mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
[rating-bar] add change event on the doc
This commit is contained in:
parent
6a33d47351
commit
e0da31eafb
2 changed files with 40 additions and 0 deletions
|
|
@ -62,10 +62,32 @@
|
|||
<h2 class="md-headline">License</h2>
|
||||
<p>MIT</p>
|
||||
</section>
|
||||
<md-rating-bar :num-stars="10" v-model="st" @change="onChange" >
|
||||
</md-rating-bar>
|
||||
</div>
|
||||
</page-content>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
data: function() {
|
||||
return {
|
||||
st: 0.1
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
st(val) {
|
||||
console.log('st: ', val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(al) {
|
||||
console.log('change:', al);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
section {
|
||||
max-width: 960px;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,24 @@
|
|||
</md-table-row>
|
||||
</md-table-body>
|
||||
</md-table>
|
||||
|
||||
<md-table slot="events">
|
||||
<md-table-header>
|
||||
<md-table-row>
|
||||
<md-table-head>Name</md-table-head>
|
||||
<md-table-head>Value</md-table-head>
|
||||
<md-table-head>Description</md-table-head>
|
||||
</md-table-row>
|
||||
</md-table-header>
|
||||
|
||||
<md-table-body>
|
||||
<md-table-row>
|
||||
<md-table-cell>change</md-table-cell>
|
||||
<md-table-cell>Receive the new rating</md-table-cell>
|
||||
<md-table-cell>Triggered when the rating changes his value by user interaction.</md-table-cell>
|
||||
</md-table-row>
|
||||
</md-table-body>
|
||||
</md-table>
|
||||
</api-table>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue