[new feature] GoodsAction: support routerLink & info (#448)

This commit is contained in:
neverland
2017-12-18 11:45:44 +08:00
committed by GitHub
parent a8666591c9
commit d845bb8730
6 changed files with 115 additions and 59 deletions
+13 -2
View File
@@ -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>