pxx-vue-quill 1.0.27 → 1.0.29

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,9 +7,9 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-08-27T08:29:15.126Z
10
+ * Date: 2025-08-27T08:53:43.171Z
11
11
  */
12
- import { defineComponent, ref, h, onMounted, onBeforeUnmount, computed, watchEffect, watch, nextTick } from 'vue';
12
+ import { defineComponent, h, onMounted, onBeforeUnmount, ref, computed, watchEffect, watch, nextTick } from 'vue';
13
13
 
14
14
  var global$1 = (typeof global !== "undefined" ? global :
15
15
  typeof self !== "undefined" ? self :
@@ -18553,52 +18553,44 @@ var es = /*#__PURE__*/Object.freeze({
18553
18553
 
18554
18554
  var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
18555
18555
 
18556
- var Action = {};
18556
+ var Action$1 = {};
18557
18557
 
18558
- var hasRequiredAction;
18558
+ Object.defineProperty(Action$1, "__esModule", {
18559
+ value: true
18560
+ });
18559
18561
 
18560
- function requireAction () {
18561
- if (hasRequiredAction) return Action;
18562
- hasRequiredAction = 1;
18562
+ var _createClass$3 = 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; }; }();
18563
18563
 
18564
- Object.defineProperty(Action, "__esModule", {
18565
- value: true
18566
- });
18564
+ var _BlotFormatter$2 = requireBlotFormatter();
18567
18565
 
18568
- 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; }; }();
18566
+ _interopRequireDefault$2(_BlotFormatter$2);
18569
18567
 
18570
- var _BlotFormatter = requireBlotFormatter();
18568
+ function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18571
18569
 
18572
- _interopRequireDefault(_BlotFormatter);
18570
+ function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18573
18571
 
18574
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18575
-
18576
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18572
+ var Action = function () {
18573
+ function Action(formatter) {
18574
+ _classCallCheck$3(this, Action);
18577
18575
 
18578
- var Action$1 = function () {
18579
- function Action(formatter) {
18580
- _classCallCheck(this, Action);
18581
-
18582
- this.formatter = formatter;
18583
- }
18576
+ this.formatter = formatter;
18577
+ }
18584
18578
 
18585
- _createClass(Action, [{
18586
- key: 'onCreate',
18587
- value: function onCreate() {}
18588
- }, {
18589
- key: 'onDestroy',
18590
- value: function onDestroy() {}
18591
- }, {
18592
- key: 'onUpdate',
18593
- value: function onUpdate() {}
18594
- }]);
18579
+ _createClass$3(Action, [{
18580
+ key: 'onCreate',
18581
+ value: function onCreate() {}
18582
+ }, {
18583
+ key: 'onDestroy',
18584
+ value: function onDestroy() {}
18585
+ }, {
18586
+ key: 'onUpdate',
18587
+ value: function onUpdate() {}
18588
+ }]);
18595
18589
 
18596
- return Action;
18597
- }();
18590
+ return Action;
18591
+ }();
18598
18592
 
18599
- Action.default = Action$1;
18600
- return Action;
18601
- }
18593
+ Action$1.default = Action;
18602
18594
 
18603
18595
  var hasRequiredBlotFormatter;
18604
18596
 
@@ -18620,7 +18612,7 @@ function requireBlotFormatter () {
18620
18612
 
18621
18613
  var _Options2 = _interopRequireDefault(_Options);
18622
18614
 
18623
- var _Action = requireAction();
18615
+ var _Action = Action$1;
18624
18616
 
18625
18617
  _interopRequireDefault(_Action);
18626
18618
 
@@ -18778,11 +18770,11 @@ Object.defineProperty(DefaultAligner$1, "__esModule", {
18778
18770
  value: true
18779
18771
  });
18780
18772
 
18781
- 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; }; }();
18773
+ 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; }; }();
18782
18774
 
18783
18775
  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; }
18784
18776
 
18785
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18777
+ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18786
18778
 
18787
18779
  var LEFT_ALIGN = 'left';
18788
18780
  var CENTER_ALIGN = 'center';
@@ -18793,7 +18785,7 @@ var DefaultAligner = function () {
18793
18785
  var _this = this,
18794
18786
  _alignments;
18795
18787
 
18796
- _classCallCheck(this, DefaultAligner);
18788
+ _classCallCheck$2(this, DefaultAligner);
18797
18789
 
18798
18790
  this.applyStyle = options.aligner.applyStyle;
18799
18791
  this.alignAttribute = options.attribute;
@@ -18821,7 +18813,7 @@ var DefaultAligner = function () {
18821
18813
  }), _alignments);
18822
18814
  }
18823
18815
 
18824
- _createClass(DefaultAligner, [{
18816
+ _createClass$2(DefaultAligner, [{
18825
18817
  key: 'getAlignments',
18826
18818
  value: function getAlignments() {
18827
18819
  var _this2 = this;
@@ -19059,7 +19051,7 @@ function requireAlignAction () {
19059
19051
 
19060
19052
  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; }; }();
19061
19053
 
19062
- var _Action2 = requireAction();
19054
+ var _Action2 = Action$1;
19063
19055
 
19064
19056
  var _Action3 = _interopRequireDefault(_Action2);
19065
19057
 
@@ -19124,190 +19116,182 @@ function requireAlignAction () {
19124
19116
  return AlignAction;
19125
19117
  }
19126
19118
 
19127
- var ResizeAction = {};
19119
+ var ResizeAction$1 = {};
19128
19120
 
19129
- var hasRequiredResizeAction;
19121
+ Object.defineProperty(ResizeAction$1, "__esModule", {
19122
+ value: true
19123
+ });
19130
19124
 
19131
- function requireResizeAction () {
19132
- if (hasRequiredResizeAction) return ResizeAction;
19133
- hasRequiredResizeAction = 1;
19125
+ 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; }; }();
19134
19126
 
19135
- Object.defineProperty(ResizeAction, "__esModule", {
19136
- value: true
19137
- });
19127
+ var _Action2 = Action$1;
19138
19128
 
19139
- 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; }; }();
19129
+ var _Action3 = _interopRequireDefault$1(_Action2);
19140
19130
 
19141
- var _Action2 = requireAction();
19131
+ var _BlotFormatter$1 = requireBlotFormatter();
19142
19132
 
19143
- var _Action3 = _interopRequireDefault(_Action2);
19133
+ _interopRequireDefault$1(_BlotFormatter$1);
19144
19134
 
19145
- var _BlotFormatter = requireBlotFormatter();
19135
+ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19146
19136
 
19147
- _interopRequireDefault(_BlotFormatter);
19137
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19148
19138
 
19149
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19139
+ 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; }
19150
19140
 
19151
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19141
+ 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; }
19152
19142
 
19153
- 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; }
19143
+ var ResizeAction = function (_Action) {
19144
+ _inherits$1(ResizeAction, _Action);
19154
19145
 
19155
- 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; }
19146
+ function ResizeAction(formatter) {
19147
+ _classCallCheck$1(this, ResizeAction);
19156
19148
 
19157
- var ResizeAction$1 = function (_Action) {
19158
- _inherits(ResizeAction, _Action);
19149
+ var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19159
19150
 
19160
- function ResizeAction(formatter) {
19161
- _classCallCheck(this, ResizeAction);
19162
-
19163
- var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19164
-
19165
- _this.onMouseDown = function (event) {
19166
- if (!(event.target instanceof HTMLElement)) {
19167
- return;
19168
- }
19169
- _this.dragHandle = event.target;
19170
- _this.setCursor(_this.dragHandle.style.cursor);
19151
+ _this.onMouseDown = function (event) {
19152
+ if (!(event.target instanceof HTMLElement)) {
19153
+ return;
19154
+ }
19155
+ _this.dragHandle = event.target;
19156
+ _this.setCursor(_this.dragHandle.style.cursor);
19171
19157
 
19172
- if (!_this.formatter.currentSpec) {
19173
- return;
19174
- }
19158
+ if (!_this.formatter.currentSpec) {
19159
+ return;
19160
+ }
19175
19161
 
19176
- var target = _this.formatter.currentSpec.getTargetElement();
19177
- if (!target) {
19178
- return;
19179
- }
19162
+ var target = _this.formatter.currentSpec.getTargetElement();
19163
+ if (!target) {
19164
+ return;
19165
+ }
19180
19166
 
19181
- var rect = target.getBoundingClientRect();
19167
+ var rect = target.getBoundingClientRect();
19182
19168
 
19183
- _this.dragStartX = event.clientX;
19184
- _this.preDragWidth = rect.width;
19185
- _this.targetRatio = rect.height / rect.width;
19169
+ _this.dragStartX = event.clientX;
19170
+ _this.preDragWidth = rect.width;
19171
+ _this.targetRatio = rect.height / rect.width;
19186
19172
 
19187
- document.addEventListener('mousemove', _this.onDrag);
19188
- document.addEventListener('mouseup', _this.onMouseUp);
19189
- };
19173
+ document.addEventListener('mousemove', _this.onDrag);
19174
+ document.addEventListener('mouseup', _this.onMouseUp);
19175
+ };
19190
19176
 
19191
- _this.onDrag = function (event) {
19192
- if (!_this.formatter.currentSpec) {
19193
- return;
19194
- }
19177
+ _this.onDrag = function (event) {
19178
+ if (!_this.formatter.currentSpec) {
19179
+ return;
19180
+ }
19195
19181
 
19196
- var target = _this.formatter.currentSpec.getTargetElement();
19197
- if (!target) {
19198
- return;
19199
- }
19182
+ var target = _this.formatter.currentSpec.getTargetElement();
19183
+ if (!target) {
19184
+ return;
19185
+ }
19200
19186
 
19201
- var deltaX = event.clientX - _this.dragStartX;
19202
- var newWidth = 0;
19187
+ var deltaX = event.clientX - _this.dragStartX;
19188
+ var newWidth = 0;
19203
19189
 
19204
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19205
- newWidth = Math.round(_this.preDragWidth - deltaX);
19206
- } else {
19207
- newWidth = Math.round(_this.preDragWidth + deltaX);
19208
- }
19190
+ if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19191
+ newWidth = Math.round(_this.preDragWidth - deltaX);
19192
+ } else {
19193
+ newWidth = Math.round(_this.preDragWidth + deltaX);
19194
+ }
19209
19195
 
19210
- var newHeight = _this.targetRatio * newWidth;
19196
+ var newHeight = _this.targetRatio * newWidth;
19211
19197
 
19212
- target.setAttribute('width', '' + newWidth);
19213
- target.setAttribute('height', '' + newHeight);
19198
+ target.setAttribute('width', '' + newWidth);
19199
+ target.setAttribute('height', '' + newHeight);
19214
19200
 
19215
- _this.formatter.update();
19216
- };
19201
+ _this.formatter.update();
19202
+ };
19217
19203
 
19218
- _this.onMouseUp = function () {
19219
- _this.setCursor('');
19220
- document.removeEventListener('mousemove', _this.onDrag);
19221
- document.removeEventListener('mouseup', _this.onMouseUp);
19222
- };
19204
+ _this.onMouseUp = function () {
19205
+ _this.setCursor('');
19206
+ document.removeEventListener('mousemove', _this.onDrag);
19207
+ document.removeEventListener('mouseup', _this.onMouseUp);
19208
+ };
19223
19209
 
19224
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19225
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19226
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19227
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19228
- _this.dragHandle = null;
19229
- _this.dragStartX = 0;
19230
- _this.preDragWidth = 0;
19231
- _this.targetRatio = 0;
19232
- return _this;
19233
- }
19210
+ _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19211
+ _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19212
+ _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19213
+ _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19214
+ _this.dragHandle = null;
19215
+ _this.dragStartX = 0;
19216
+ _this.preDragWidth = 0;
19217
+ _this.targetRatio = 0;
19218
+ return _this;
19219
+ }
19234
19220
 
19235
- _createClass(ResizeAction, [{
19236
- key: 'onCreate',
19237
- value: function onCreate() {
19238
- this.formatter.overlay.appendChild(this.topLeftHandle);
19239
- this.formatter.overlay.appendChild(this.topRightHandle);
19240
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19241
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19221
+ _createClass$1(ResizeAction, [{
19222
+ key: 'onCreate',
19223
+ value: function onCreate() {
19224
+ this.formatter.overlay.appendChild(this.topLeftHandle);
19225
+ this.formatter.overlay.appendChild(this.topRightHandle);
19226
+ this.formatter.overlay.appendChild(this.bottomRightHandle);
19227
+ this.formatter.overlay.appendChild(this.bottomLeftHandle);
19242
19228
 
19243
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19244
- }
19245
- }, {
19246
- key: 'onDestroy',
19247
- value: function onDestroy() {
19248
- this.setCursor('');
19249
- this.formatter.overlay.removeChild(this.topLeftHandle);
19250
- this.formatter.overlay.removeChild(this.topRightHandle);
19251
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19252
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19253
- }
19254
- }, {
19255
- key: 'createHandle',
19256
- value: function createHandle(position, cursor) {
19257
- var box = document.createElement('div');
19258
- box.classList.add(this.formatter.options.resize.handleClassName);
19259
- box.setAttribute('data-position', position);
19260
- box.style.cursor = cursor;
19261
-
19262
- if (this.formatter.options.resize.handleStyle) {
19263
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19264
- }
19229
+ this.repositionHandles(this.formatter.options.resize.handleStyle);
19230
+ }
19231
+ }, {
19232
+ key: 'onDestroy',
19233
+ value: function onDestroy() {
19234
+ this.setCursor('');
19235
+ this.formatter.overlay.removeChild(this.topLeftHandle);
19236
+ this.formatter.overlay.removeChild(this.topRightHandle);
19237
+ this.formatter.overlay.removeChild(this.bottomRightHandle);
19238
+ this.formatter.overlay.removeChild(this.bottomLeftHandle);
19239
+ }
19240
+ }, {
19241
+ key: 'createHandle',
19242
+ value: function createHandle(position, cursor) {
19243
+ var box = document.createElement('div');
19244
+ box.classList.add(this.formatter.options.resize.handleClassName);
19245
+ box.setAttribute('data-position', position);
19246
+ box.style.cursor = cursor;
19247
+
19248
+ if (this.formatter.options.resize.handleStyle) {
19249
+ Object.assign(box.style, this.formatter.options.resize.handleStyle);
19250
+ }
19265
19251
 
19266
- box.addEventListener('mousedown', this.onMouseDown);
19252
+ box.addEventListener('mousedown', this.onMouseDown);
19267
19253
 
19268
- return box;
19269
- }
19270
- }, {
19271
- key: 'repositionHandles',
19272
- value: function repositionHandles(handleStyle) {
19273
- var handleXOffset = '0px';
19274
- var handleYOffset = '0px';
19275
- if (handleStyle) {
19276
- if (handleStyle.width) {
19277
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19278
- }
19279
- if (handleStyle.height) {
19280
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19281
- }
19282
- }
19254
+ return box;
19255
+ }
19256
+ }, {
19257
+ key: 'repositionHandles',
19258
+ value: function repositionHandles(handleStyle) {
19259
+ var handleXOffset = '0px';
19260
+ var handleYOffset = '0px';
19261
+ if (handleStyle) {
19262
+ if (handleStyle.width) {
19263
+ handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19264
+ }
19265
+ if (handleStyle.height) {
19266
+ handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19267
+ }
19268
+ }
19283
19269
 
19284
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19285
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19286
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19287
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19288
- }
19289
- }, {
19290
- key: 'setCursor',
19291
- value: function setCursor(value) {
19292
- if (document.body) {
19293
- document.body.style.cursor = value;
19294
- }
19270
+ Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19271
+ Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19272
+ Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19273
+ Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19274
+ }
19275
+ }, {
19276
+ key: 'setCursor',
19277
+ value: function setCursor(value) {
19278
+ if (document.body) {
19279
+ document.body.style.cursor = value;
19280
+ }
19295
19281
 
19296
- if (this.formatter.currentSpec) {
19297
- var target = this.formatter.currentSpec.getOverlayElement();
19298
- if (target) {
19299
- target.style.cursor = value;
19300
- }
19301
- }
19302
- }
19303
- }]);
19282
+ if (this.formatter.currentSpec) {
19283
+ var target = this.formatter.currentSpec.getOverlayElement();
19284
+ if (target) {
19285
+ target.style.cursor = value;
19286
+ }
19287
+ }
19288
+ }
19289
+ }]);
19304
19290
 
19305
- return ResizeAction;
19306
- }(_Action3.default);
19291
+ return ResizeAction;
19292
+ }(_Action3.default);
19307
19293
 
19308
- ResizeAction.default = ResizeAction$1;
19309
- return ResizeAction;
19310
- }
19294
+ ResizeAction$1.default = ResizeAction;
19311
19295
 
19312
19296
  var DeleteAction = {};
19313
19297
 
@@ -19327,7 +19311,7 @@ function requireDeleteAction () {
19327
19311
 
19328
19312
  var _quill2 = _interopRequireDefault(_quill);
19329
19313
 
19330
- var _Action2 = requireAction();
19314
+ var _Action2 = Action$1;
19331
19315
 
19332
19316
  var _Action3 = _interopRequireDefault(_Action2);
19333
19317
 
@@ -19406,7 +19390,7 @@ function requireBlotSpec () {
19406
19390
 
19407
19391
  _interopRequireDefault(_BlotFormatter);
19408
19392
 
19409
- var _Action = requireAction();
19393
+ var _Action = Action$1;
19410
19394
 
19411
19395
  _interopRequireDefault(_Action);
19412
19396
 
@@ -19414,7 +19398,7 @@ function requireBlotSpec () {
19414
19398
 
19415
19399
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19416
19400
 
19417
- var _ResizeAction = requireResizeAction();
19401
+ var _ResizeAction = ResizeAction$1;
19418
19402
 
19419
19403
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19420
19404
 
@@ -19546,156 +19530,148 @@ function requireImageSpec () {
19546
19530
 
19547
19531
  var IframeVideoSpec = {};
19548
19532
 
19549
- var UnclickableBlotSpec = {};
19550
-
19551
- var hasRequiredUnclickableBlotSpec;
19533
+ var UnclickableBlotSpec$1 = {};
19552
19534
 
19553
- function requireUnclickableBlotSpec () {
19554
- if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19555
- hasRequiredUnclickableBlotSpec = 1;
19556
-
19557
- Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19558
- value: true
19559
- });
19560
-
19561
- 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; }; }();
19535
+ Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19536
+ value: true
19537
+ });
19562
19538
 
19563
- var _BlotSpec2 = requireBlotSpec();
19539
+ 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; }; }();
19564
19540
 
19565
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19541
+ var _BlotSpec2 = requireBlotSpec();
19566
19542
 
19567
- var _BlotFormatter = requireBlotFormatter();
19543
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19568
19544
 
19569
- _interopRequireDefault(_BlotFormatter);
19545
+ var _BlotFormatter = requireBlotFormatter();
19570
19546
 
19571
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19547
+ _interopRequireDefault(_BlotFormatter);
19572
19548
 
19573
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19549
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19574
19550
 
19575
- 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; }
19551
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19576
19552
 
19577
- 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; }
19553
+ 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; }
19578
19554
 
19579
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19580
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19555
+ 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; }
19581
19556
 
19582
- var UnclickableBlotSpec$1 = function (_BlotSpec) {
19583
- _inherits(UnclickableBlotSpec, _BlotSpec);
19557
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19558
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19584
19559
 
19585
- function UnclickableBlotSpec(formatter, selector) {
19586
- _classCallCheck(this, UnclickableBlotSpec);
19560
+ var UnclickableBlotSpec = function (_BlotSpec) {
19561
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19587
19562
 
19588
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19563
+ function UnclickableBlotSpec(formatter, selector) {
19564
+ _classCallCheck(this, UnclickableBlotSpec);
19589
19565
 
19590
- _this.onTextChange = function () {
19591
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19592
- unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19593
- unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19594
- });
19595
- };
19566
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19596
19567
 
19597
- _this.onMouseEnter = function (event) {
19598
- var unclickable = event.target;
19599
- if (!(unclickable instanceof HTMLElement)) {
19600
- return;
19601
- }
19568
+ _this.onTextChange = function () {
19569
+ Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19570
+ unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19571
+ unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19572
+ });
19573
+ };
19602
19574
 
19603
- _this.nextUnclickable = unclickable;
19604
- _this.repositionProxyImage(_this.nextUnclickable);
19605
- };
19575
+ _this.onMouseEnter = function (event) {
19576
+ var unclickable = event.target;
19577
+ if (!(unclickable instanceof HTMLElement)) {
19578
+ return;
19579
+ }
19606
19580
 
19607
- _this.onProxyImageClick = function () {
19608
- _this.unclickable = _this.nextUnclickable;
19609
- _this.nextUnclickable = null;
19610
- _this.formatter.show(_this);
19611
- _this.hideProxyImage();
19612
- };
19581
+ _this.nextUnclickable = unclickable;
19582
+ _this.repositionProxyImage(_this.nextUnclickable);
19583
+ };
19613
19584
 
19614
- _this.selector = selector;
19615
- _this.unclickable = null;
19616
- _this.nextUnclickable = null;
19617
- return _this;
19618
- }
19585
+ _this.onProxyImageClick = function () {
19586
+ _this.unclickable = _this.nextUnclickable;
19587
+ _this.nextUnclickable = null;
19588
+ _this.formatter.show(_this);
19589
+ _this.hideProxyImage();
19590
+ };
19619
19591
 
19620
- _createClass(UnclickableBlotSpec, [{
19621
- key: 'init',
19622
- value: function init() {
19623
- if (document.body) {
19624
- /*
19625
- it's important that this is attached to the body instead of the root quill element.
19626
- this prevents the click event from overlapping with ImageSpec
19627
- */
19628
- document.body.appendChild(this.createProxyImage());
19629
- }
19592
+ _this.selector = selector;
19593
+ _this.unclickable = null;
19594
+ _this.nextUnclickable = null;
19595
+ return _this;
19596
+ }
19630
19597
 
19631
- this.hideProxyImage();
19632
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19633
- this.formatter.quill.on('text-change', this.onTextChange);
19634
- }
19635
- }, {
19636
- key: 'getTargetElement',
19637
- value: function getTargetElement() {
19638
- return this.unclickable;
19639
- }
19640
- }, {
19641
- key: 'getOverlayElement',
19642
- value: function getOverlayElement() {
19643
- return this.unclickable;
19644
- }
19645
- }, {
19646
- key: 'onHide',
19647
- value: function onHide() {
19648
- this.hideProxyImage();
19649
- this.nextUnclickable = null;
19650
- this.unclickable = null;
19651
- }
19652
- }, {
19653
- key: 'createProxyImage',
19654
- value: function createProxyImage() {
19655
- var canvas = document.createElement('canvas');
19656
- var context = canvas.getContext('2d');
19657
- context.globalAlpha = 0;
19658
- context.fillRect(0, 0, 1, 1);
19659
-
19660
- this.proxyImage = document.createElement('img');
19661
- this.proxyImage.src = canvas.toDataURL('image/png');
19662
- this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19663
-
19664
- Object.assign(this.proxyImage.style, {
19665
- position: 'absolute',
19666
- margin: '0'
19667
- });
19598
+ _createClass(UnclickableBlotSpec, [{
19599
+ key: 'init',
19600
+ value: function init() {
19601
+ if (document.body) {
19602
+ /*
19603
+ it's important that this is attached to the body instead of the root quill element.
19604
+ this prevents the click event from overlapping with ImageSpec
19605
+ */
19606
+ document.body.appendChild(this.createProxyImage());
19607
+ }
19668
19608
 
19669
- return this.proxyImage;
19670
- }
19671
- }, {
19672
- key: 'hideProxyImage',
19673
- value: function hideProxyImage() {
19674
- Object.assign(this.proxyImage.style, {
19675
- display: 'none'
19676
- });
19677
- }
19678
- }, {
19679
- key: 'repositionProxyImage',
19680
- value: function repositionProxyImage(unclickable) {
19681
- var rect = unclickable.getBoundingClientRect();
19609
+ this.hideProxyImage();
19610
+ this.proxyImage.addEventListener('click', this.onProxyImageClick);
19611
+ this.formatter.quill.on('text-change', this.onTextChange);
19612
+ }
19613
+ }, {
19614
+ key: 'getTargetElement',
19615
+ value: function getTargetElement() {
19616
+ return this.unclickable;
19617
+ }
19618
+ }, {
19619
+ key: 'getOverlayElement',
19620
+ value: function getOverlayElement() {
19621
+ return this.unclickable;
19622
+ }
19623
+ }, {
19624
+ key: 'onHide',
19625
+ value: function onHide() {
19626
+ this.hideProxyImage();
19627
+ this.nextUnclickable = null;
19628
+ this.unclickable = null;
19629
+ }
19630
+ }, {
19631
+ key: 'createProxyImage',
19632
+ value: function createProxyImage() {
19633
+ var canvas = document.createElement('canvas');
19634
+ var context = canvas.getContext('2d');
19635
+ context.globalAlpha = 0;
19636
+ context.fillRect(0, 0, 1, 1);
19637
+
19638
+ this.proxyImage = document.createElement('img');
19639
+ this.proxyImage.src = canvas.toDataURL('image/png');
19640
+ this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19641
+
19642
+ Object.assign(this.proxyImage.style, {
19643
+ position: 'absolute',
19644
+ margin: '0'
19645
+ });
19682
19646
 
19683
- Object.assign(this.proxyImage.style, {
19684
- display: 'block',
19685
- left: rect.left + window.pageXOffset + 'px',
19686
- top: rect.top + window.pageYOffset + 'px',
19687
- width: rect.width + 'px',
19688
- height: rect.height + 'px'
19689
- });
19690
- }
19691
- }]);
19647
+ return this.proxyImage;
19648
+ }
19649
+ }, {
19650
+ key: 'hideProxyImage',
19651
+ value: function hideProxyImage() {
19652
+ Object.assign(this.proxyImage.style, {
19653
+ display: 'none'
19654
+ });
19655
+ }
19656
+ }, {
19657
+ key: 'repositionProxyImage',
19658
+ value: function repositionProxyImage(unclickable) {
19659
+ var rect = unclickable.getBoundingClientRect();
19660
+
19661
+ Object.assign(this.proxyImage.style, {
19662
+ display: 'block',
19663
+ left: rect.left + window.pageXOffset + 'px',
19664
+ top: rect.top + window.pageYOffset + 'px',
19665
+ width: rect.width + 'px',
19666
+ height: rect.height + 'px'
19667
+ });
19668
+ }
19669
+ }]);
19692
19670
 
19693
- return UnclickableBlotSpec;
19694
- }(_BlotSpec3.default);
19671
+ return UnclickableBlotSpec;
19672
+ }(_BlotSpec3.default);
19695
19673
 
19696
- UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19697
- return UnclickableBlotSpec;
19698
- }
19674
+ UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19699
19675
 
19700
19676
  var hasRequiredIframeVideoSpec;
19701
19677
 
@@ -19707,7 +19683,7 @@ function requireIframeVideoSpec () {
19707
19683
  value: true
19708
19684
  });
19709
19685
 
19710
- var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19686
+ var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19711
19687
 
19712
19688
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19713
19689
 
@@ -19862,7 +19838,7 @@ function requireOptions () {
19862
19838
  }
19863
19839
  });
19864
19840
 
19865
- var _Action = requireAction();
19841
+ var _Action = Action$1;
19866
19842
 
19867
19843
  Object.defineProperty(exports, 'Action', {
19868
19844
  enumerable: true,
@@ -19907,7 +19883,7 @@ function requireOptions () {
19907
19883
  }
19908
19884
  });
19909
19885
 
19910
- var _ResizeAction = requireResizeAction();
19886
+ var _ResizeAction = ResizeAction$1;
19911
19887
 
19912
19888
  Object.defineProperty(exports, 'ResizeAction', {
19913
19889
  enumerable: true,
@@ -19934,7 +19910,7 @@ function requireOptions () {
19934
19910
  }
19935
19911
  });
19936
19912
 
19937
- var _UnclickableBlotSpec = requireUnclickableBlotSpec();
19913
+ var _UnclickableBlotSpec = UnclickableBlotSpec$1;
19938
19914
 
19939
19915
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
19940
19916
  enumerable: true,
@@ -19968,15 +19944,16 @@ const MoreToolbar = defineComponent({
19968
19944
  type: Object,
19969
19945
  default: () => ({}),
19970
19946
  },
19947
+ showMoreToolbar: {
19948
+ type: Boolean,
19949
+ default: false,
19950
+ },
19971
19951
  },
19972
19952
  emits: ['toolClick'],
19973
19953
  setup(props, { emit }) {
19974
- const showMoreTools = ref(false);
19975
- const moreButtonClick = () => {
19976
- showMoreTools.value = !showMoreTools.value;
19977
- };
19978
19954
  return () => h('div', {
19979
19955
  id: 'toolbar-' + props.editorKey,
19956
+ dataC: props.showMoreToolbar,
19980
19957
  style: {
19981
19958
  ...props.toolbarStyle
19982
19959
  }
@@ -19984,7 +19961,7 @@ const MoreToolbar = defineComponent({
19984
19961
  h('div', {
19985
19962
  class: {
19986
19963
  'short-tools': true,
19987
- 'collapse': showMoreTools.value
19964
+ 'collapse': props.showMoreToolbar
19988
19965
  }
19989
19966
  }, [
19990
19967
  // 第一组:基础格式工具
@@ -20027,15 +20004,15 @@ const MoreToolbar = defineComponent({
20027
20004
  h('button', {
20028
20005
  class: 'ql-more mr-0',
20029
20006
  type: 'button',
20030
- onClick: moreButtonClick
20007
+ onClick: () => emit('toolClick', 'more')
20031
20008
  }, '')
20032
20009
  ])
20033
20010
  ]),
20034
20011
  h('div', {
20035
20012
  class: {
20036
20013
  "more-tools": true,
20037
- "collapse": showMoreTools.value
20038
- }, style: { display: showMoreTools.value ? 'block' : 'none' }
20014
+ "collapse": props.showMoreToolbar
20015
+ }, style: { display: props.showMoreToolbar ? 'block' : 'none' }
20039
20016
  }, [
20040
20017
  h('div', { class: "more-tools-item" }, [
20041
20018
  h('span', { class: 'ql-formats' }, [
@@ -20315,6 +20292,7 @@ const QuillEditor = defineComponent({
20315
20292
  }
20316
20293
  });
20317
20294
  watchEffect(() => {
20295
+ console.log("init");
20318
20296
  applyEditorStyle();
20319
20297
  });
20320
20298
  const registerModule = (moduleName, module) => {
@@ -20466,8 +20444,8 @@ const QuillEditor = defineComponent({
20466
20444
  toolbar.style.display = 'block';
20467
20445
  }
20468
20446
  else {
20469
- showMoreToolbar.value = false;
20470
20447
  toolbar.style.display = 'none';
20448
+ showMoreToolbar.value = false;
20471
20449
  }
20472
20450
  }
20473
20451
  ctx.emit('selectionChange', { range, oldRange, source });
@@ -20582,6 +20560,10 @@ const QuillEditor = defineComponent({
20582
20560
  else if (tool === 'math') {
20583
20561
  ctx.emit('math');
20584
20562
  }
20563
+ else if (tool === 'more') {
20564
+ // 处理更多按钮点击
20565
+ showMoreToolbar.value = !showMoreToolbar.value;
20566
+ }
20585
20567
  };
20586
20568
  watch(() => props.content, (newContent) => {
20587
20569
  if (!quill || !newContent || internalModelEquals(newContent))
@@ -20623,6 +20605,7 @@ const QuillEditor = defineComponent({
20623
20605
  editorKey: String(this.$props.editorKey),
20624
20606
  needCollapse: this.needCollapse,
20625
20607
  toolbarStyle: this.$props.toolbarStyle,
20608
+ showMoreToolbar: this.showMoreToolbar,
20626
20609
  onToolClick: (tool) => {
20627
20610
  this.moreToolbarToolClick(tool);
20628
20611
  }