1.0.0 • Published 1 year ago

@liuyunxi/rich-text v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

富文本 YxRichText

代码演示

<template>
  <YxRichText
      height="300px"
      :imageSize="3"
      v-model:value="values"
      @change="handelChange"
  ></YxRichText>
</template>

<script setup lang="ts">
import {ref} from 'vue'

const values = ref('')

/*模拟延迟加载数据*/
setTimeout(() => {
  values.value = '<h1>测试内容</h1>'
}, 3000)

const handelChange = (value: string) => {
  console.log(value)
  console.log(values.value)
}
</script>

<style scoped lang="less"></style>

API

参数

参数说明类型默认值
v-model:value绑定值string
height高度string'500px'
imageSize图片大小限制,单位Mnumber5

事件

事件名称说明回调参数
change内容改变function(value:string)