import { defineComponent } from 'vue'
import styles from './index.module.less'
import topBg from './images/top_bg.png'
import { Button } from 'vant'

export default defineComponent({
  name: 'tip-model',
  props: {
    /** 标题 */
    title: {
      type: String,
      default: '',
    },
    /** 内容 */
    content: {
      type: String,
      default: ''
    },
  },
  emits: ['close'],
  setup(props, {emit}) {
    return () => (
      <div class={styles.tipModel}>
        <img src={topBg} class={styles.fansBg} />

        <h2>{props.title}</h2>
        <div class={styles.content}>{props.content}</div>

        <Button type="primary" block class={styles.btnPrimary} onClick={() => emit('close')}>我知道了</Button>
      </div>
    )
  }
})
