element Radio 单选框 改对勾样式

<template>
  <div>
    <div class="strategyType">
      <span style="font-size: 18px; color: #333">单选按钮改对勾样式</span>
      <div
        class="strategyType-radio"
        v-for="item in radioList"
        :key="item.label"
      >
        <el-radio-group v-model="radio">
          <el-radio
            :label="item.label"
            border
            @change="StrategyClick(item.label)"
            >{
  { item.value }}</el-radio
          >
        </el-radio-group>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      radio: 0,
      radioList: [{
        label: 0,
        value: '单选1',
        describe: '单选1'
      }, {
        label: 1,
        value: '单选2',
        describe: '单选2'
      },
      {
        label: 2,
        value: '单选3',
        describe: '单选3'
      }
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.strategyType {
  display: flex;
  align-items: center;
  margin: 10px;

  .strategyType-radio {
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    margin: 0 10px;
  }
}

::v-deep .el-radio__input.is-checked .el-radio__inner::after {
  content: "";
  width: 10px;
  height: 6px;
  border: 2px solid white;
  border-top: transparent;
  border-right: transparent;
  text-align: center;
  display: block;
  position: absolute;
  top: 2px;
  left: 1px;
  transform: rotate(-45deg);
  border-radius: 0px;
  background: none;
}
</style>

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-09 15:16:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-09 15:16:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-09 15:16:02       87 阅读
  4. Python语言-面向对象

    2024-01-09 15:16:02       96 阅读

热门阅读

  1. dockerfile和docker-composer配置和启动

    2024-01-09 15:16:02       57 阅读
  2. 【Python库】pillow (PIL)库的用法介绍

    2024-01-09 15:16:02       56 阅读
  3. 213. 打家劫舍 II

    2024-01-09 15:16:02       61 阅读
  4. Python Pillow(PIL)库的用法介绍

    2024-01-09 15:16:02       64 阅读
  5. Python Pillow(PIL)详细使用指南

    2024-01-09 15:16:02       56 阅读
  6. php之 校验多个时间段是否重复

    2024-01-09 15:16:02       60 阅读
  7. RabbitMQ笔记

    2024-01-09 15:16:02       49 阅读
  8. 安全认证 | CISP证书学习需要多长时间?

    2024-01-09 15:16:02       56 阅读
  9. 55. 跳跃游戏

    2024-01-09 15:16:02       56 阅读