tag.vue 526 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view class="slot" @click="click"><slot></slot></view>
  3. </template>
  4. <script>
  5. export default {
  6. name: 'tag',
  7. methods: {
  8. click() {
  9. this.$emit('click');
  10. }
  11. }
  12. };
  13. </script>
  14. <style lang="scss" scoped>
  15. .slot {
  16. display: inline-block;
  17. margin-right: 24rpx;
  18. margin-bottom: 20rpx;
  19. width: calc(100% / 3 - 24rpx);
  20. height: 32px;
  21. background: $app-theme-bg-gray-deep-color;
  22. border-radius: 4px;
  23. font-size: 26rpx;
  24. text-align: center;
  25. font-weight: 400;
  26. line-height: 32px;
  27. color: $app-theme-text-color;
  28. }
  29. </style>