0.0.1 • Published 2 years ago

v3-quill v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

vue3-quill

安装

npm install --save-dev v3-quill

全局使用

import v3Quill from "v3-quill"
import "v3-quill/dist/style.css"
main.ts 中注册组件
app.use(v3Quill)

App.vue 使用组件
<xe-quill v-model:value="content"/>

局部使用

import {v3Quill} from "v3-quill";
app.components("xe-quill",v3Quill)
App.vue 使用组件
<xe-quill v-model:value="content"/>

Api 介绍

成员说明类型默认值
v-model:value输入框内容Delta{ops:[]}
enable是否禁止输入booleantrue表示可以输入
placeholder无内容时的提示语string""
theme主题"snow", "bubble"snow
toolbar头部小工具String, Array, Objectstring的值有essential基础头部,minimal迷你头部,full所以头部也可以根据需求自定义头部传入对应格式的对象或者数据
handlers重写头部小工具点击事件Object{}
modulesmodules拓展配置项{ name: string; module: any; options?: object }[][]
optionsquill其他配置QuillOptionsStatic{}
height组件内容区高度设置stringauto

方法

成员说明参数
blur失去焦点时触发Quill实例
focus获取焦点时触发Quill实例
change内容发送变化时触发quill, html, text
selectionChange鼠标选择内容变化时range, oldRange, source