wwf
昨天 34f5733bc1f126c572580fa849b9403dfcddd84b
src/views/main/components/ReturnBtn.vue
@@ -1,16 +1,20 @@
<template>
  <el-button text class="pl-0 pr-2 my-1" @click="goBack">
    <el-row align="middle">
      <Icon icon="mingcute:home-6-line" width="16" height="16" style="color: var(--el-color-primary)" />
      <el-text class="ml-1" style="color: var(--el-color-primary);">返回首页</el-text>
    </el-row>
  </el-button>
  <el-row align="middle" class="pl-0 pr-2 py-2 cursor-p" @click="goBack">
    <Icon icon="mingcute:home-6-line" width="16" height="16" :style="{color: this.color}" />
    <el-text class="ml-1" :style="{color: this.color}">返回首页</el-text>
  </el-row>
</template>
<script>
export default {
  props: {
    color: {
      type: String,
      default: 'white'
    }
  },
  methods: {
    goBack() {
      this.$router.replace('/main/home')
      this.$router.go('-1')
    }
  }
}