mirror of
https://github.com/youzan/vant.git
synced 2026-05-02 01:01:43 +08:00
[new feature] GoodsAction: support routerLink & info (#448)
This commit is contained in:
@@ -5,26 +5,37 @@
|
||||
class="van-goods-action__big-btn"
|
||||
:type="primary ? 'primary' : 'default'"
|
||||
bottomAction
|
||||
@click="$emit('click', $event)"
|
||||
@click="onClick"
|
||||
>
|
||||
<slot></slot>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user