提交 c45940ca 编写于 作者: Q qiang

fix: editor emit

上级 8dc9937e
...@@ -8,7 +8,11 @@ import QuillClass, { ...@@ -8,7 +8,11 @@ import QuillClass, {
import { useSubscribe } from '@dcloudio/uni-components' import { useSubscribe } from '@dcloudio/uni-components'
import { getRealPath } from '@dcloudio/uni-platform' import { getRealPath } from '@dcloudio/uni-platform'
import { CustomEventTrigger, useCustomEvent } from '../../helpers/useEvent' import { CustomEventTrigger, useCustomEvent } from '../../helpers/useEvent'
import { useKeyboard } from '../../helpers/useKeyboard' import {
props as keyboardProps,
emit as keyboardEmit,
useKeyboard,
} from '../../helpers/useKeyboard'
import HTMLParser from '../../helpers/html-parser' import HTMLParser from '../../helpers/html-parser'
import * as formats from './formats' import * as formats from './formats'
import loadScript from './load-script' import loadScript from './load-script'
...@@ -410,7 +414,7 @@ function useQuill( ...@@ -410,7 +414,7 @@ function useQuill(
}) })
} }
const props = { const props = Object.assign({}, keyboardProps, {
id: { id: {
type: String, type: String,
default: '', default: '',
...@@ -435,30 +439,12 @@ const props = { ...@@ -435,30 +439,12 @@ const props = {
type: [Boolean, String], type: [Boolean, String],
default: false, default: false,
}, },
disabled: { })
type: [Boolean, String],
default: false,
},
cursorSpacing: {
type: [Number, String],
default: 0,
},
showConfirmBar: {
type: [Boolean, String],
default: 'auto',
},
adjustPosition: {
type: [Boolean, String],
default: true,
},
autoBlur: {
type: [Boolean, String],
default: false,
},
}
export default /*#__PURE__*/ defineComponent({ export default /*#__PURE__*/ defineComponent({
name: 'Editor', name: 'Editor',
props, props,
emit: ['ready', 'focus', 'blur', 'input', 'statuschange', ...keyboardEmit],
setup(props, { emit }) { setup(props, { emit }) {
const rootRef: Ref<HTMLElement | null> = ref(null) const rootRef: Ref<HTMLElement | null> = ref(null)
const trigger = useCustomEvent(rootRef, emit) const trigger = useCustomEvent(rootRef, emit)
......
...@@ -6060,7 +6060,7 @@ function useQuill(props2, rootRef, trigger) { ...@@ -6060,7 +6060,7 @@ function useQuill(props2, rootRef, trigger) {
} }
}); });
} }
const props$9 = { const props$9 = Object.assign({}, props$a, {
id: { id: {
type: String, type: String,
default: "" default: ""
...@@ -6084,31 +6084,12 @@ const props$9 = { ...@@ -6084,31 +6084,12 @@ const props$9 = {
showImgResize: { showImgResize: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
},
disabled: {
type: [Boolean, String],
default: false
},
cursorSpacing: {
type: [Number, String],
default: 0
},
showConfirmBar: {
type: [Boolean, String],
default: "auto"
},
adjustPosition: {
type: [Boolean, String],
default: true
},
autoBlur: {
type: [Boolean, String],
default: false
} }
}; });
var index$9 = /* @__PURE__ */ defineComponent({ var index$9 = /* @__PURE__ */ defineComponent({
name: "Editor", name: "Editor",
props: props$9, props: props$9,
emit: ["ready", "focus", "blur", "input", "statuschange", ...emit$1],
setup(props2, { setup(props2, {
emit: emit2 emit: emit2
}) { }) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册