<template>
  <div :class="{'g-coil-no': isGCoilNo}">
    <el-tag type="info" size="small">{{ coilNo }}</el-tag>
  </div>
</template>

<script>
export default {
  props: {
    coilNo: {
      type: String,
      default: ''
    }
  },
  computed: {
    isGCoilNo() {
      return this.coilNo.startsWith('G');
    }
  },
}
</script>

<style scoped>
/* 调整容器布局，让边框完整包裹标签 */
.g-coil-no {
  display: inline-block; /* 让容器尺寸贴合内部el-tag */
  border: 2px solid #67c23a !important;
  border-radius: 4px; /* 可选：和el-tag圆角保持一致，更美观 */
}
</style>