<template>
  <!-- 组件市场按钮 -->
  <div class="market-button" @click="handleClick">
    <el-icon><ShoppingCartFull /></el-icon>
  </div>
</template>

<script>
import { ShoppingCartFull } from '@element-plus/icons-vue'

export default {
  name: 'MarketButton',
  components: {
    ShoppingCartFull
  },
  methods: {
    // 点击处理函数
    handleClick() {
      this.$router.push('/market')
    }
  }
}
</script>

<style lang="scss" scoped>
.market-button {
  position: fixed;
  bottom: 140px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
	z-index: 1024;

  &:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.2);
  }

  .el-icon {
    font-size: 24px;
  }
}
</style> 