index.vue 804 Bytes
<!--
 * @Date: 2022-08-29 14:31:20
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2023-01-05 10:07:18
 * @FilePath: /data-table/src/components/NoteField/index.vue
 * @Description: 富文本组件
-->
<template>
  <div class="note-field-page">
    <div class="label">{{ item.component_props.label }}<span v-if="item.component_props.required">&nbsp;*</span></div>
    <div class="html" style="padding: 0.5rem 1rem 0 1rem;" v-html="item.component_props.note"></div>
  </div>
</template>

<script setup>
const props = defineProps({
  item: Object,
});
</script>

<style lang="less">
.note-field-page {
  .label {
    padding: 1rem 1rem 0 1rem;
    font-size: 0.9rem;
    font-weight: bold;

    span {
      color: red;
    }
  }
  .html {
    img {
      width: 100%;
    }
  }
}
</style>