mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
42 lines
674 B
Vue
42 lines
674 B
Vue
<template>
|
|
<van-button
|
|
tag="a"
|
|
:href="url"
|
|
class="van-goods-action__big-btn"
|
|
:type="primary ? 'primary' : 'default'"
|
|
bottomAction
|
|
@click="onClick"
|
|
>
|
|
<slot>{{ text }}</slot>
|
|
</van-button>
|
|
</template>
|
|
|
|
<script>
|
|
import { create } from '../utils';
|
|
import VanButton from '../button';
|
|
import RouterLink from '../mixins/router-link';
|
|
|
|
export default create({
|
|
name: 'van-goods-action-big-btn',
|
|
|
|
mixins: [RouterLink],
|
|
|
|
components: {
|
|
VanButton
|
|
},
|
|
|
|
props: {
|
|
url: String,
|
|
text: String,
|
|
primary: Boolean
|
|
},
|
|
|
|
methods: {
|
|
onClick(event) {
|
|
this.$emit('click', event);
|
|
this.routerLink();
|
|
}
|
|
}
|
|
});
|
|
</script>
|