pxx-vue-quill 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-08-20T08:51:47.483Z
10
+ * Date: 2025-08-20T10:40:06.224Z
11
11
  */
12
12
  import { defineComponent, onMounted, onBeforeUnmount, ref, watch, nextTick, h } from 'vue';
13
13
 
@@ -18780,11 +18780,11 @@ Object.defineProperty(DefaultAligner$1, "__esModule", {
18780
18780
  value: true
18781
18781
  });
18782
18782
 
18783
- var _createClass$2 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
18783
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
18784
18784
 
18785
18785
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18786
18786
 
18787
- function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18787
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18788
18788
 
18789
18789
  var LEFT_ALIGN = 'left';
18790
18790
  var CENTER_ALIGN = 'center';
@@ -18795,7 +18795,7 @@ var DefaultAligner = function () {
18795
18795
  var _this = this,
18796
18796
  _alignments;
18797
18797
 
18798
- _classCallCheck$2(this, DefaultAligner);
18798
+ _classCallCheck(this, DefaultAligner);
18799
18799
 
18800
18800
  this.applyStyle = options.aligner.applyStyle;
18801
18801
  this.alignAttribute = options.attribute;
@@ -18823,7 +18823,7 @@ var DefaultAligner = function () {
18823
18823
  }), _alignments);
18824
18824
  }
18825
18825
 
18826
- _createClass$2(DefaultAligner, [{
18826
+ _createClass(DefaultAligner, [{
18827
18827
  key: 'getAlignments',
18828
18828
  value: function getAlignments() {
18829
18829
  var _this2 = this;
@@ -19126,182 +19126,190 @@ function requireAlignAction () {
19126
19126
  return AlignAction;
19127
19127
  }
19128
19128
 
19129
- var ResizeAction$1 = {};
19129
+ var ResizeAction = {};
19130
19130
 
19131
- Object.defineProperty(ResizeAction$1, "__esModule", {
19132
- value: true
19133
- });
19131
+ var hasRequiredResizeAction;
19134
19132
 
19135
- var _createClass$1 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19133
+ function requireResizeAction () {
19134
+ if (hasRequiredResizeAction) return ResizeAction;
19135
+ hasRequiredResizeAction = 1;
19136
19136
 
19137
- var _Action2 = requireAction();
19137
+ Object.defineProperty(ResizeAction, "__esModule", {
19138
+ value: true
19139
+ });
19138
19140
 
19139
- var _Action3 = _interopRequireDefault$1(_Action2);
19141
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19140
19142
 
19141
- var _BlotFormatter$1 = requireBlotFormatter();
19143
+ var _Action2 = requireAction();
19142
19144
 
19143
- _interopRequireDefault$1(_BlotFormatter$1);
19145
+ var _Action3 = _interopRequireDefault(_Action2);
19144
19146
 
19145
- function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19147
+ var _BlotFormatter = requireBlotFormatter();
19146
19148
 
19147
- function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19149
+ _interopRequireDefault(_BlotFormatter);
19148
19150
 
19149
- function _possibleConstructorReturn$1(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19151
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19150
19152
 
19151
- function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19153
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19152
19154
 
19153
- var ResizeAction = function (_Action) {
19154
- _inherits$1(ResizeAction, _Action);
19155
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19155
19156
 
19156
- function ResizeAction(formatter) {
19157
- _classCallCheck$1(this, ResizeAction);
19157
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19158
19158
 
19159
- var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19159
+ var ResizeAction$1 = function (_Action) {
19160
+ _inherits(ResizeAction, _Action);
19160
19161
 
19161
- _this.onMouseDown = function (event) {
19162
- if (!(event.target instanceof HTMLElement)) {
19163
- return;
19164
- }
19165
- _this.dragHandle = event.target;
19166
- _this.setCursor(_this.dragHandle.style.cursor);
19162
+ function ResizeAction(formatter) {
19163
+ _classCallCheck(this, ResizeAction);
19167
19164
 
19168
- if (!_this.formatter.currentSpec) {
19169
- return;
19170
- }
19165
+ var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19171
19166
 
19172
- var target = _this.formatter.currentSpec.getTargetElement();
19173
- if (!target) {
19174
- return;
19175
- }
19167
+ _this.onMouseDown = function (event) {
19168
+ if (!(event.target instanceof HTMLElement)) {
19169
+ return;
19170
+ }
19171
+ _this.dragHandle = event.target;
19172
+ _this.setCursor(_this.dragHandle.style.cursor);
19176
19173
 
19177
- var rect = target.getBoundingClientRect();
19174
+ if (!_this.formatter.currentSpec) {
19175
+ return;
19176
+ }
19178
19177
 
19179
- _this.dragStartX = event.clientX;
19180
- _this.preDragWidth = rect.width;
19181
- _this.targetRatio = rect.height / rect.width;
19178
+ var target = _this.formatter.currentSpec.getTargetElement();
19179
+ if (!target) {
19180
+ return;
19181
+ }
19182
19182
 
19183
- document.addEventListener('mousemove', _this.onDrag);
19184
- document.addEventListener('mouseup', _this.onMouseUp);
19185
- };
19183
+ var rect = target.getBoundingClientRect();
19186
19184
 
19187
- _this.onDrag = function (event) {
19188
- if (!_this.formatter.currentSpec) {
19189
- return;
19190
- }
19185
+ _this.dragStartX = event.clientX;
19186
+ _this.preDragWidth = rect.width;
19187
+ _this.targetRatio = rect.height / rect.width;
19191
19188
 
19192
- var target = _this.formatter.currentSpec.getTargetElement();
19193
- if (!target) {
19194
- return;
19195
- }
19189
+ document.addEventListener('mousemove', _this.onDrag);
19190
+ document.addEventListener('mouseup', _this.onMouseUp);
19191
+ };
19196
19192
 
19197
- var deltaX = event.clientX - _this.dragStartX;
19198
- var newWidth = 0;
19193
+ _this.onDrag = function (event) {
19194
+ if (!_this.formatter.currentSpec) {
19195
+ return;
19196
+ }
19199
19197
 
19200
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19201
- newWidth = Math.round(_this.preDragWidth - deltaX);
19202
- } else {
19203
- newWidth = Math.round(_this.preDragWidth + deltaX);
19204
- }
19198
+ var target = _this.formatter.currentSpec.getTargetElement();
19199
+ if (!target) {
19200
+ return;
19201
+ }
19205
19202
 
19206
- var newHeight = _this.targetRatio * newWidth;
19203
+ var deltaX = event.clientX - _this.dragStartX;
19204
+ var newWidth = 0;
19207
19205
 
19208
- target.setAttribute('width', '' + newWidth);
19209
- target.setAttribute('height', '' + newHeight);
19206
+ if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19207
+ newWidth = Math.round(_this.preDragWidth - deltaX);
19208
+ } else {
19209
+ newWidth = Math.round(_this.preDragWidth + deltaX);
19210
+ }
19210
19211
 
19211
- _this.formatter.update();
19212
- };
19212
+ var newHeight = _this.targetRatio * newWidth;
19213
19213
 
19214
- _this.onMouseUp = function () {
19215
- _this.setCursor('');
19216
- document.removeEventListener('mousemove', _this.onDrag);
19217
- document.removeEventListener('mouseup', _this.onMouseUp);
19218
- };
19214
+ target.setAttribute('width', '' + newWidth);
19215
+ target.setAttribute('height', '' + newHeight);
19219
19216
 
19220
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19221
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19222
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19223
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19224
- _this.dragHandle = null;
19225
- _this.dragStartX = 0;
19226
- _this.preDragWidth = 0;
19227
- _this.targetRatio = 0;
19228
- return _this;
19229
- }
19217
+ _this.formatter.update();
19218
+ };
19230
19219
 
19231
- _createClass$1(ResizeAction, [{
19232
- key: 'onCreate',
19233
- value: function onCreate() {
19234
- this.formatter.overlay.appendChild(this.topLeftHandle);
19235
- this.formatter.overlay.appendChild(this.topRightHandle);
19236
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19237
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19220
+ _this.onMouseUp = function () {
19221
+ _this.setCursor('');
19222
+ document.removeEventListener('mousemove', _this.onDrag);
19223
+ document.removeEventListener('mouseup', _this.onMouseUp);
19224
+ };
19238
19225
 
19239
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19240
- }
19241
- }, {
19242
- key: 'onDestroy',
19243
- value: function onDestroy() {
19244
- this.setCursor('');
19245
- this.formatter.overlay.removeChild(this.topLeftHandle);
19246
- this.formatter.overlay.removeChild(this.topRightHandle);
19247
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19248
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19249
- }
19250
- }, {
19251
- key: 'createHandle',
19252
- value: function createHandle(position, cursor) {
19253
- var box = document.createElement('div');
19254
- box.classList.add(this.formatter.options.resize.handleClassName);
19255
- box.setAttribute('data-position', position);
19256
- box.style.cursor = cursor;
19257
-
19258
- if (this.formatter.options.resize.handleStyle) {
19259
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19260
- }
19226
+ _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19227
+ _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19228
+ _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19229
+ _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19230
+ _this.dragHandle = null;
19231
+ _this.dragStartX = 0;
19232
+ _this.preDragWidth = 0;
19233
+ _this.targetRatio = 0;
19234
+ return _this;
19235
+ }
19261
19236
 
19262
- box.addEventListener('mousedown', this.onMouseDown);
19237
+ _createClass(ResizeAction, [{
19238
+ key: 'onCreate',
19239
+ value: function onCreate() {
19240
+ this.formatter.overlay.appendChild(this.topLeftHandle);
19241
+ this.formatter.overlay.appendChild(this.topRightHandle);
19242
+ this.formatter.overlay.appendChild(this.bottomRightHandle);
19243
+ this.formatter.overlay.appendChild(this.bottomLeftHandle);
19263
19244
 
19264
- return box;
19265
- }
19266
- }, {
19267
- key: 'repositionHandles',
19268
- value: function repositionHandles(handleStyle) {
19269
- var handleXOffset = '0px';
19270
- var handleYOffset = '0px';
19271
- if (handleStyle) {
19272
- if (handleStyle.width) {
19273
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19274
- }
19275
- if (handleStyle.height) {
19276
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19277
- }
19278
- }
19245
+ this.repositionHandles(this.formatter.options.resize.handleStyle);
19246
+ }
19247
+ }, {
19248
+ key: 'onDestroy',
19249
+ value: function onDestroy() {
19250
+ this.setCursor('');
19251
+ this.formatter.overlay.removeChild(this.topLeftHandle);
19252
+ this.formatter.overlay.removeChild(this.topRightHandle);
19253
+ this.formatter.overlay.removeChild(this.bottomRightHandle);
19254
+ this.formatter.overlay.removeChild(this.bottomLeftHandle);
19255
+ }
19256
+ }, {
19257
+ key: 'createHandle',
19258
+ value: function createHandle(position, cursor) {
19259
+ var box = document.createElement('div');
19260
+ box.classList.add(this.formatter.options.resize.handleClassName);
19261
+ box.setAttribute('data-position', position);
19262
+ box.style.cursor = cursor;
19263
+
19264
+ if (this.formatter.options.resize.handleStyle) {
19265
+ Object.assign(box.style, this.formatter.options.resize.handleStyle);
19266
+ }
19279
19267
 
19280
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19281
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19282
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19283
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19284
- }
19285
- }, {
19286
- key: 'setCursor',
19287
- value: function setCursor(value) {
19288
- if (document.body) {
19289
- document.body.style.cursor = value;
19290
- }
19268
+ box.addEventListener('mousedown', this.onMouseDown);
19291
19269
 
19292
- if (this.formatter.currentSpec) {
19293
- var target = this.formatter.currentSpec.getOverlayElement();
19294
- if (target) {
19295
- target.style.cursor = value;
19296
- }
19297
- }
19298
- }
19299
- }]);
19270
+ return box;
19271
+ }
19272
+ }, {
19273
+ key: 'repositionHandles',
19274
+ value: function repositionHandles(handleStyle) {
19275
+ var handleXOffset = '0px';
19276
+ var handleYOffset = '0px';
19277
+ if (handleStyle) {
19278
+ if (handleStyle.width) {
19279
+ handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19280
+ }
19281
+ if (handleStyle.height) {
19282
+ handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19283
+ }
19284
+ }
19285
+
19286
+ Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19287
+ Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19288
+ Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19289
+ Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19290
+ }
19291
+ }, {
19292
+ key: 'setCursor',
19293
+ value: function setCursor(value) {
19294
+ if (document.body) {
19295
+ document.body.style.cursor = value;
19296
+ }
19297
+
19298
+ if (this.formatter.currentSpec) {
19299
+ var target = this.formatter.currentSpec.getOverlayElement();
19300
+ if (target) {
19301
+ target.style.cursor = value;
19302
+ }
19303
+ }
19304
+ }
19305
+ }]);
19300
19306
 
19301
- return ResizeAction;
19302
- }(_Action3.default);
19307
+ return ResizeAction;
19308
+ }(_Action3.default);
19303
19309
 
19304
- ResizeAction$1.default = ResizeAction;
19310
+ ResizeAction.default = ResizeAction$1;
19311
+ return ResizeAction;
19312
+ }
19305
19313
 
19306
19314
  var DeleteAction = {};
19307
19315
 
@@ -19408,7 +19416,7 @@ function requireBlotSpec () {
19408
19416
 
19409
19417
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19410
19418
 
19411
- var _ResizeAction = ResizeAction$1;
19419
+ var _ResizeAction = requireResizeAction();
19412
19420
 
19413
19421
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19414
19422
 
@@ -19540,148 +19548,156 @@ function requireImageSpec () {
19540
19548
 
19541
19549
  var IframeVideoSpec = {};
19542
19550
 
19543
- var UnclickableBlotSpec$1 = {};
19551
+ var UnclickableBlotSpec = {};
19544
19552
 
19545
- Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19546
- value: true
19547
- });
19553
+ var hasRequiredUnclickableBlotSpec;
19548
19554
 
19549
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19555
+ function requireUnclickableBlotSpec () {
19556
+ if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19557
+ hasRequiredUnclickableBlotSpec = 1;
19550
19558
 
19551
- var _BlotSpec2 = requireBlotSpec();
19559
+ Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19560
+ value: true
19561
+ });
19552
19562
 
19553
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19563
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19554
19564
 
19555
- var _BlotFormatter = requireBlotFormatter();
19565
+ var _BlotSpec2 = requireBlotSpec();
19556
19566
 
19557
- _interopRequireDefault(_BlotFormatter);
19567
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19558
19568
 
19559
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19569
+ var _BlotFormatter = requireBlotFormatter();
19560
19570
 
19561
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19571
+ _interopRequireDefault(_BlotFormatter);
19562
19572
 
19563
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19573
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19564
19574
 
19565
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19575
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19566
19576
 
19567
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19568
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19577
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19569
19578
 
19570
- var UnclickableBlotSpec = function (_BlotSpec) {
19571
- _inherits(UnclickableBlotSpec, _BlotSpec);
19579
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19572
19580
 
19573
- function UnclickableBlotSpec(formatter, selector) {
19574
- _classCallCheck(this, UnclickableBlotSpec);
19581
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19582
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19575
19583
 
19576
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19584
+ var UnclickableBlotSpec$1 = function (_BlotSpec) {
19585
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19577
19586
 
19578
- _this.onTextChange = function () {
19579
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19580
- unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19581
- unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19582
- });
19583
- };
19587
+ function UnclickableBlotSpec(formatter, selector) {
19588
+ _classCallCheck(this, UnclickableBlotSpec);
19584
19589
 
19585
- _this.onMouseEnter = function (event) {
19586
- var unclickable = event.target;
19587
- if (!(unclickable instanceof HTMLElement)) {
19588
- return;
19589
- }
19590
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19590
19591
 
19591
- _this.nextUnclickable = unclickable;
19592
- _this.repositionProxyImage(_this.nextUnclickable);
19593
- };
19592
+ _this.onTextChange = function () {
19593
+ Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19594
+ unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19595
+ unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19596
+ });
19597
+ };
19594
19598
 
19595
- _this.onProxyImageClick = function () {
19596
- _this.unclickable = _this.nextUnclickable;
19597
- _this.nextUnclickable = null;
19598
- _this.formatter.show(_this);
19599
- _this.hideProxyImage();
19600
- };
19599
+ _this.onMouseEnter = function (event) {
19600
+ var unclickable = event.target;
19601
+ if (!(unclickable instanceof HTMLElement)) {
19602
+ return;
19603
+ }
19601
19604
 
19602
- _this.selector = selector;
19603
- _this.unclickable = null;
19604
- _this.nextUnclickable = null;
19605
- return _this;
19606
- }
19605
+ _this.nextUnclickable = unclickable;
19606
+ _this.repositionProxyImage(_this.nextUnclickable);
19607
+ };
19607
19608
 
19608
- _createClass(UnclickableBlotSpec, [{
19609
- key: 'init',
19610
- value: function init() {
19611
- if (document.body) {
19612
- /*
19613
- it's important that this is attached to the body instead of the root quill element.
19614
- this prevents the click event from overlapping with ImageSpec
19615
- */
19616
- document.body.appendChild(this.createProxyImage());
19617
- }
19609
+ _this.onProxyImageClick = function () {
19610
+ _this.unclickable = _this.nextUnclickable;
19611
+ _this.nextUnclickable = null;
19612
+ _this.formatter.show(_this);
19613
+ _this.hideProxyImage();
19614
+ };
19618
19615
 
19619
- this.hideProxyImage();
19620
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19621
- this.formatter.quill.on('text-change', this.onTextChange);
19622
- }
19623
- }, {
19624
- key: 'getTargetElement',
19625
- value: function getTargetElement() {
19626
- return this.unclickable;
19627
- }
19628
- }, {
19629
- key: 'getOverlayElement',
19630
- value: function getOverlayElement() {
19631
- return this.unclickable;
19632
- }
19633
- }, {
19634
- key: 'onHide',
19635
- value: function onHide() {
19636
- this.hideProxyImage();
19637
- this.nextUnclickable = null;
19638
- this.unclickable = null;
19639
- }
19640
- }, {
19641
- key: 'createProxyImage',
19642
- value: function createProxyImage() {
19643
- var canvas = document.createElement('canvas');
19644
- var context = canvas.getContext('2d');
19645
- context.globalAlpha = 0;
19646
- context.fillRect(0, 0, 1, 1);
19647
-
19648
- this.proxyImage = document.createElement('img');
19649
- this.proxyImage.src = canvas.toDataURL('image/png');
19650
- this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19651
-
19652
- Object.assign(this.proxyImage.style, {
19653
- position: 'absolute',
19654
- margin: '0'
19655
- });
19616
+ _this.selector = selector;
19617
+ _this.unclickable = null;
19618
+ _this.nextUnclickable = null;
19619
+ return _this;
19620
+ }
19656
19621
 
19657
- return this.proxyImage;
19658
- }
19659
- }, {
19660
- key: 'hideProxyImage',
19661
- value: function hideProxyImage() {
19662
- Object.assign(this.proxyImage.style, {
19663
- display: 'none'
19664
- });
19665
- }
19666
- }, {
19667
- key: 'repositionProxyImage',
19668
- value: function repositionProxyImage(unclickable) {
19669
- var rect = unclickable.getBoundingClientRect();
19670
-
19671
- Object.assign(this.proxyImage.style, {
19672
- display: 'block',
19673
- left: rect.left + window.pageXOffset + 'px',
19674
- top: rect.top + window.pageYOffset + 'px',
19675
- width: rect.width + 'px',
19676
- height: rect.height + 'px'
19677
- });
19678
- }
19679
- }]);
19622
+ _createClass(UnclickableBlotSpec, [{
19623
+ key: 'init',
19624
+ value: function init() {
19625
+ if (document.body) {
19626
+ /*
19627
+ it's important that this is attached to the body instead of the root quill element.
19628
+ this prevents the click event from overlapping with ImageSpec
19629
+ */
19630
+ document.body.appendChild(this.createProxyImage());
19631
+ }
19680
19632
 
19681
- return UnclickableBlotSpec;
19682
- }(_BlotSpec3.default);
19633
+ this.hideProxyImage();
19634
+ this.proxyImage.addEventListener('click', this.onProxyImageClick);
19635
+ this.formatter.quill.on('text-change', this.onTextChange);
19636
+ }
19637
+ }, {
19638
+ key: 'getTargetElement',
19639
+ value: function getTargetElement() {
19640
+ return this.unclickable;
19641
+ }
19642
+ }, {
19643
+ key: 'getOverlayElement',
19644
+ value: function getOverlayElement() {
19645
+ return this.unclickable;
19646
+ }
19647
+ }, {
19648
+ key: 'onHide',
19649
+ value: function onHide() {
19650
+ this.hideProxyImage();
19651
+ this.nextUnclickable = null;
19652
+ this.unclickable = null;
19653
+ }
19654
+ }, {
19655
+ key: 'createProxyImage',
19656
+ value: function createProxyImage() {
19657
+ var canvas = document.createElement('canvas');
19658
+ var context = canvas.getContext('2d');
19659
+ context.globalAlpha = 0;
19660
+ context.fillRect(0, 0, 1, 1);
19661
+
19662
+ this.proxyImage = document.createElement('img');
19663
+ this.proxyImage.src = canvas.toDataURL('image/png');
19664
+ this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19665
+
19666
+ Object.assign(this.proxyImage.style, {
19667
+ position: 'absolute',
19668
+ margin: '0'
19669
+ });
19683
19670
 
19684
- UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19671
+ return this.proxyImage;
19672
+ }
19673
+ }, {
19674
+ key: 'hideProxyImage',
19675
+ value: function hideProxyImage() {
19676
+ Object.assign(this.proxyImage.style, {
19677
+ display: 'none'
19678
+ });
19679
+ }
19680
+ }, {
19681
+ key: 'repositionProxyImage',
19682
+ value: function repositionProxyImage(unclickable) {
19683
+ var rect = unclickable.getBoundingClientRect();
19684
+
19685
+ Object.assign(this.proxyImage.style, {
19686
+ display: 'block',
19687
+ left: rect.left + window.pageXOffset + 'px',
19688
+ top: rect.top + window.pageYOffset + 'px',
19689
+ width: rect.width + 'px',
19690
+ height: rect.height + 'px'
19691
+ });
19692
+ }
19693
+ }]);
19694
+
19695
+ return UnclickableBlotSpec;
19696
+ }(_BlotSpec3.default);
19697
+
19698
+ UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19699
+ return UnclickableBlotSpec;
19700
+ }
19685
19701
 
19686
19702
  var hasRequiredIframeVideoSpec;
19687
19703
 
@@ -19693,7 +19709,7 @@ function requireIframeVideoSpec () {
19693
19709
  value: true
19694
19710
  });
19695
19711
 
19696
- var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19712
+ var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19697
19713
 
19698
19714
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19699
19715
 
@@ -19893,7 +19909,7 @@ function requireOptions () {
19893
19909
  }
19894
19910
  });
19895
19911
 
19896
- var _ResizeAction = ResizeAction$1;
19912
+ var _ResizeAction = requireResizeAction();
19897
19913
 
19898
19914
  Object.defineProperty(exports, 'ResizeAction', {
19899
19915
  enumerable: true,
@@ -19920,7 +19936,7 @@ function requireOptions () {
19920
19936
  }
19921
19937
  });
19922
19938
 
19923
- var _UnclickableBlotSpec = UnclickableBlotSpec$1;
19939
+ var _UnclickableBlotSpec = requireUnclickableBlotSpec();
19924
19940
 
19925
19941
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
19926
19942
  enumerable: true,
@@ -19968,6 +19984,12 @@ const QuillEditor = defineComponent({
19968
19984
  placeholder: {
19969
19985
  type: String,
19970
19986
  required: false,
19987
+ default: "请输入内容"
19988
+ },
19989
+ minHeight: {
19990
+ type: Number,
19991
+ required: false,
19992
+ default: 90,
19971
19993
  },
19972
19994
  theme: {
19973
19995
  type: String,
@@ -20173,7 +20195,7 @@ const QuillEditor = defineComponent({
20173
20195
  const toolbar = (_a = quill === null || quill === void 0 ? void 0 : quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container;
20174
20196
  if (toolbar) {
20175
20197
  if (isEditorFocus.value) {
20176
- toolbar.style.display = 'block';
20198
+ toolbar.style.display = 'flex';
20177
20199
  }
20178
20200
  else {
20179
20201
  toolbar.style.display = 'none';
@@ -20308,8 +20330,10 @@ const QuillEditor = defineComponent({
20308
20330
  render() {
20309
20331
  var _a, _b;
20310
20332
  return [
20311
- (_b = (_a = this.$slots).toolbar) === null || _b === void 0 ? void 0 : _b.call(_a),
20312
- h('div', { ref: 'editor', ...this.$attrs }),
20333
+ h('div', { class: 'quill-editor-container', style: { minHeight: `${this.$props.minHeight}px` } }, [
20334
+ (_b = (_a = this.$slots).toolbar) === null || _b === void 0 ? void 0 : _b.call(_a),
20335
+ h('div', { ref: 'editor', ...this.$attrs }),
20336
+ ]),
20313
20337
  ];
20314
20338
  },
20315
20339
  });