<script setup lang="ts">
import { IconError } from '@computing/opendesign-icons';
const props = defineProps({
  data: {
    type: String,
    required: true,
    default: ''
  }
});
</script>

<template>
  <!-- 单行校验失败的展示数据,提示错误的文本需要传入,即props.data -->
  <div class="err-box">
    <el-icon>
      <IconError />
    </el-icon>
    <span>{{ data }}</span>
  </div>
</template>

<style lang="scss" scoped>
.err-box {
  display: flex;
  align-items: center;

  :deep(.el-icon) {
    margin-right: 8px;
    font-size: 16px;
  }
}
</style>