devjin0617 / vue2-admin-lte

:bar_chart: adminLTE to vuejs v2.x converting project
https://devjin0617.github.io/vue2-admin-lte
MIT License
1.07k stars 323 forks source link

Va-small-box custom link action #39

Closed sbenitezma closed 7 years ago

sbenitezma commented 7 years ago

Hello! I've detected on component va-small-box: <div class="small-box" :class="bgColor"> <div class="inner"> <h3>{{title}}</h3> <p>{{description}}</p> </div> <div class="icon"> <i class="ion" :class="icon"></i> </div> <a href="#" class="small-box-footer">{{moreText}} <i class="fa fa-arrow-circle-right"></i></a> </div> I cannot set custom vuejs function as action on click (like @click, v-on:click('customFunction')) on <a href=# to prevent link to # There's any way to change that? if there's any I appreciate to know that, else I will develop one and make pull request because I need it for my project :smile:

Regards and thanks!

devjin0617 commented 7 years ago

@sbenitezma Thank you 😄

Add click event in SmallBox Component !

<template>
...
  <va-small-box @more-click="onMore"></va-small-box>
...
</template>

<script>
export default {
...
  methods: {
    onMore () {
         // here more event code
    }
  }
...
}
</script>
tutkun commented 7 years ago

it's usefull may be:

<a
     href="javascript:;"
     class="small-box-footer"
>
     {{moreText}} <i class="fa fa-arrow-circle-right"></i>
</a>
devjin0617 commented 7 years ago

Clsoed 😄

sbenitezma commented 7 years ago

Thanks! :smile: