maker/src/components/tag.vue
2019-11-29 10:05:54 +08:00

37 lines
606 B
Vue

<template>
<span @click.stop="goSearch(text)" class="c-tag">{{text}}</span>
</template>
<script>
export default {
props: ['text'],
methods: {
goSearch(key) {
wx.redirectTo({
url: `/pages/search/main?key=tag:${key}`
})
}
}
}
</script>
<style lang="less" scoped>
.c-tag {
display: inline-block;
padding: 8rpx 16rpx;
margin-right: 16rpx;
margin-bottom: 16rpx;
border-right: 16rpx;
border-radius: 16rpx;
color: #999;
font-size: 24rpx;
background-color: #fcfcef;
&::before {
content: '#';
margin-right: 8rpx;
color: #ffdc34;
}
}
</style>