Page MenuHomePhorge

BtnRouter.vue
No OneTemporary

Size
599 B
Referenced Files
None
Subscribers
None

BtnRouter.vue

<template>
<router-link :to="to" custom v-slot="{ navigate }">
<btn :class="className()" :icon="icon" @click="navigate">
<slot></slot>
</btn>
</router-link>
</template>
<script>
export default {
props: {
to: { type: [ Object, String ], default: () => {} },
icon: { type: [ Array, String ], default: '' },
},
methods: {
className() {
let label = this.to.length ? this.to : this.to.name
return ['btn', label.replace('/', '-')]
}
}
}
</script>

File Metadata

Mime Type
text/html
Expires
Tue, Oct 20, 12:13 AM (19 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1548761
Default Alt Text
BtnRouter.vue (599 B)

Event Timeline