Page MenuHomePhorge

BtnRouter.vue
No OneTemporary

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
Mon, Nov 3, 2:39 PM (17 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
361062
Default Alt Text
BtnRouter.vue (599 B)

Event Timeline