pxx-vue-quill 1.0.28 → 1.0.30
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.
- package/dist/vue-quill.cjs.js +18 -11
- package/dist/vue-quill.cjs.prod.js +2 -2
- package/dist/vue-quill.esm-browser.js +165 -166
- package/dist/vue-quill.esm-browser.prod.js +2 -2
- package/dist/vue-quill.esm-bundler.js +19 -12
- package/dist/vue-quill.esm-bundler.prod.js +2 -2
- package/dist/vue-quill.global.js +172 -157
- package/dist/vue-quill.global.prod.js +2 -2
- package/package.json +1 -1
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-08-
|
|
10
|
+
* Date: 2025-08-28T06:39:34.530Z
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent,
|
|
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 :
|
|
@@ -18778,11 +18778,11 @@ Object.defineProperty(DefaultAligner$1, "__esModule", {
|
|
|
18778
18778
|
value: true
|
|
18779
18779
|
});
|
|
18780
18780
|
|
|
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; }; }();
|
|
18781
|
+
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; }; }();
|
|
18782
18782
|
|
|
18783
18783
|
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
18784
|
|
|
18785
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18785
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18786
18786
|
|
|
18787
18787
|
var LEFT_ALIGN = 'left';
|
|
18788
18788
|
var CENTER_ALIGN = 'center';
|
|
@@ -18793,7 +18793,7 @@ var DefaultAligner = function () {
|
|
|
18793
18793
|
var _this = this,
|
|
18794
18794
|
_alignments;
|
|
18795
18795
|
|
|
18796
|
-
_classCallCheck(this, DefaultAligner);
|
|
18796
|
+
_classCallCheck$1(this, DefaultAligner);
|
|
18797
18797
|
|
|
18798
18798
|
this.applyStyle = options.aligner.applyStyle;
|
|
18799
18799
|
this.alignAttribute = options.attribute;
|
|
@@ -18821,7 +18821,7 @@ var DefaultAligner = function () {
|
|
|
18821
18821
|
}), _alignments);
|
|
18822
18822
|
}
|
|
18823
18823
|
|
|
18824
|
-
_createClass(DefaultAligner, [{
|
|
18824
|
+
_createClass$1(DefaultAligner, [{
|
|
18825
18825
|
key: 'getAlignments',
|
|
18826
18826
|
value: function getAlignments() {
|
|
18827
18827
|
var _this2 = this;
|
|
@@ -19124,190 +19124,182 @@ function requireAlignAction () {
|
|
|
19124
19124
|
return AlignAction;
|
|
19125
19125
|
}
|
|
19126
19126
|
|
|
19127
|
-
var ResizeAction = {};
|
|
19127
|
+
var ResizeAction$1 = {};
|
|
19128
19128
|
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
|
|
19132
|
-
if (hasRequiredResizeAction) return ResizeAction;
|
|
19133
|
-
hasRequiredResizeAction = 1;
|
|
19129
|
+
Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
19130
|
+
value: true
|
|
19131
|
+
});
|
|
19134
19132
|
|
|
19135
|
-
|
|
19136
|
-
value: true
|
|
19137
|
-
});
|
|
19133
|
+
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; }; }();
|
|
19138
19134
|
|
|
19139
|
-
|
|
19135
|
+
var _Action2 = requireAction();
|
|
19140
19136
|
|
|
19141
|
-
|
|
19137
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19142
19138
|
|
|
19143
|
-
|
|
19139
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19144
19140
|
|
|
19145
|
-
|
|
19141
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19146
19142
|
|
|
19147
|
-
|
|
19143
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19148
19144
|
|
|
19149
|
-
|
|
19150
|
-
|
|
19151
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19145
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19152
19146
|
|
|
19153
|
-
|
|
19147
|
+
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; }
|
|
19154
19148
|
|
|
19155
|
-
|
|
19149
|
+
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; }
|
|
19156
19150
|
|
|
19157
|
-
|
|
19158
|
-
|
|
19151
|
+
var ResizeAction = function (_Action) {
|
|
19152
|
+
_inherits(ResizeAction, _Action);
|
|
19159
19153
|
|
|
19160
|
-
|
|
19161
|
-
|
|
19154
|
+
function ResizeAction(formatter) {
|
|
19155
|
+
_classCallCheck(this, ResizeAction);
|
|
19162
19156
|
|
|
19163
|
-
|
|
19157
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19164
19158
|
|
|
19165
|
-
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
|
|
19159
|
+
_this.onMouseDown = function (event) {
|
|
19160
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19161
|
+
return;
|
|
19162
|
+
}
|
|
19163
|
+
_this.dragHandle = event.target;
|
|
19164
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19171
19165
|
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19166
|
+
if (!_this.formatter.currentSpec) {
|
|
19167
|
+
return;
|
|
19168
|
+
}
|
|
19175
19169
|
|
|
19176
|
-
|
|
19177
|
-
|
|
19178
|
-
|
|
19179
|
-
|
|
19170
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19171
|
+
if (!target) {
|
|
19172
|
+
return;
|
|
19173
|
+
}
|
|
19180
19174
|
|
|
19181
|
-
|
|
19175
|
+
var rect = target.getBoundingClientRect();
|
|
19182
19176
|
|
|
19183
|
-
|
|
19184
|
-
|
|
19185
|
-
|
|
19177
|
+
_this.dragStartX = event.clientX;
|
|
19178
|
+
_this.preDragWidth = rect.width;
|
|
19179
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19186
19180
|
|
|
19187
|
-
|
|
19188
|
-
|
|
19189
|
-
|
|
19181
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19182
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19183
|
+
};
|
|
19190
19184
|
|
|
19191
|
-
|
|
19192
|
-
|
|
19193
|
-
|
|
19194
|
-
|
|
19185
|
+
_this.onDrag = function (event) {
|
|
19186
|
+
if (!_this.formatter.currentSpec) {
|
|
19187
|
+
return;
|
|
19188
|
+
}
|
|
19195
19189
|
|
|
19196
|
-
|
|
19197
|
-
|
|
19198
|
-
|
|
19199
|
-
|
|
19190
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19191
|
+
if (!target) {
|
|
19192
|
+
return;
|
|
19193
|
+
}
|
|
19200
19194
|
|
|
19201
|
-
|
|
19202
|
-
|
|
19195
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19196
|
+
var newWidth = 0;
|
|
19203
19197
|
|
|
19204
|
-
|
|
19205
|
-
|
|
19206
|
-
|
|
19207
|
-
|
|
19208
|
-
|
|
19198
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19199
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19200
|
+
} else {
|
|
19201
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19202
|
+
}
|
|
19209
19203
|
|
|
19210
|
-
|
|
19204
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19211
19205
|
|
|
19212
|
-
|
|
19213
|
-
|
|
19206
|
+
target.setAttribute('width', '' + newWidth);
|
|
19207
|
+
target.setAttribute('height', '' + newHeight);
|
|
19214
19208
|
|
|
19215
|
-
|
|
19216
|
-
|
|
19209
|
+
_this.formatter.update();
|
|
19210
|
+
};
|
|
19217
19211
|
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
|
|
19212
|
+
_this.onMouseUp = function () {
|
|
19213
|
+
_this.setCursor('');
|
|
19214
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19215
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19216
|
+
};
|
|
19223
19217
|
|
|
19224
|
-
|
|
19225
|
-
|
|
19226
|
-
|
|
19227
|
-
|
|
19228
|
-
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
|
|
19232
|
-
|
|
19233
|
-
|
|
19218
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19219
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19220
|
+
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19221
|
+
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19222
|
+
_this.dragHandle = null;
|
|
19223
|
+
_this.dragStartX = 0;
|
|
19224
|
+
_this.preDragWidth = 0;
|
|
19225
|
+
_this.targetRatio = 0;
|
|
19226
|
+
return _this;
|
|
19227
|
+
}
|
|
19234
19228
|
|
|
19235
|
-
|
|
19236
|
-
|
|
19237
|
-
|
|
19238
|
-
|
|
19239
|
-
|
|
19240
|
-
|
|
19241
|
-
|
|
19229
|
+
_createClass(ResizeAction, [{
|
|
19230
|
+
key: 'onCreate',
|
|
19231
|
+
value: function onCreate() {
|
|
19232
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19233
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19234
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19235
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19242
19236
|
|
|
19243
|
-
|
|
19244
|
-
|
|
19245
|
-
|
|
19246
|
-
|
|
19247
|
-
|
|
19248
|
-
|
|
19249
|
-
|
|
19250
|
-
|
|
19251
|
-
|
|
19252
|
-
|
|
19253
|
-
|
|
19254
|
-
|
|
19255
|
-
|
|
19256
|
-
|
|
19257
|
-
|
|
19258
|
-
|
|
19259
|
-
|
|
19260
|
-
|
|
19261
|
-
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
|
|
19237
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19238
|
+
}
|
|
19239
|
+
}, {
|
|
19240
|
+
key: 'onDestroy',
|
|
19241
|
+
value: function onDestroy() {
|
|
19242
|
+
this.setCursor('');
|
|
19243
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19244
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19245
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19246
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19247
|
+
}
|
|
19248
|
+
}, {
|
|
19249
|
+
key: 'createHandle',
|
|
19250
|
+
value: function createHandle(position, cursor) {
|
|
19251
|
+
var box = document.createElement('div');
|
|
19252
|
+
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19253
|
+
box.setAttribute('data-position', position);
|
|
19254
|
+
box.style.cursor = cursor;
|
|
19255
|
+
|
|
19256
|
+
if (this.formatter.options.resize.handleStyle) {
|
|
19257
|
+
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19258
|
+
}
|
|
19265
19259
|
|
|
19266
|
-
|
|
19260
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19267
19261
|
|
|
19268
|
-
|
|
19269
|
-
|
|
19270
|
-
|
|
19271
|
-
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19277
|
-
|
|
19278
|
-
|
|
19279
|
-
|
|
19280
|
-
|
|
19281
|
-
|
|
19282
|
-
|
|
19262
|
+
return box;
|
|
19263
|
+
}
|
|
19264
|
+
}, {
|
|
19265
|
+
key: 'repositionHandles',
|
|
19266
|
+
value: function repositionHandles(handleStyle) {
|
|
19267
|
+
var handleXOffset = '0px';
|
|
19268
|
+
var handleYOffset = '0px';
|
|
19269
|
+
if (handleStyle) {
|
|
19270
|
+
if (handleStyle.width) {
|
|
19271
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19272
|
+
}
|
|
19273
|
+
if (handleStyle.height) {
|
|
19274
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19275
|
+
}
|
|
19276
|
+
}
|
|
19283
19277
|
|
|
19284
|
-
|
|
19285
|
-
|
|
19286
|
-
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19278
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19279
|
+
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19280
|
+
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19281
|
+
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19282
|
+
}
|
|
19283
|
+
}, {
|
|
19284
|
+
key: 'setCursor',
|
|
19285
|
+
value: function setCursor(value) {
|
|
19286
|
+
if (document.body) {
|
|
19287
|
+
document.body.style.cursor = value;
|
|
19288
|
+
}
|
|
19295
19289
|
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
|
|
19303
|
-
|
|
19290
|
+
if (this.formatter.currentSpec) {
|
|
19291
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19292
|
+
if (target) {
|
|
19293
|
+
target.style.cursor = value;
|
|
19294
|
+
}
|
|
19295
|
+
}
|
|
19296
|
+
}
|
|
19297
|
+
}]);
|
|
19304
19298
|
|
|
19305
|
-
|
|
19306
|
-
|
|
19299
|
+
return ResizeAction;
|
|
19300
|
+
}(_Action3.default);
|
|
19307
19301
|
|
|
19308
|
-
|
|
19309
|
-
return ResizeAction;
|
|
19310
|
-
}
|
|
19302
|
+
ResizeAction$1.default = ResizeAction;
|
|
19311
19303
|
|
|
19312
19304
|
var DeleteAction = {};
|
|
19313
19305
|
|
|
@@ -19414,7 +19406,7 @@ function requireBlotSpec () {
|
|
|
19414
19406
|
|
|
19415
19407
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19416
19408
|
|
|
19417
|
-
var _ResizeAction =
|
|
19409
|
+
var _ResizeAction = ResizeAction$1;
|
|
19418
19410
|
|
|
19419
19411
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19420
19412
|
|
|
@@ -19907,7 +19899,7 @@ function requireOptions () {
|
|
|
19907
19899
|
}
|
|
19908
19900
|
});
|
|
19909
19901
|
|
|
19910
|
-
var _ResizeAction =
|
|
19902
|
+
var _ResizeAction = ResizeAction$1;
|
|
19911
19903
|
|
|
19912
19904
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
19913
19905
|
enumerable: true,
|
|
@@ -19968,15 +19960,16 @@ const MoreToolbar = defineComponent({
|
|
|
19968
19960
|
type: Object,
|
|
19969
19961
|
default: () => ({}),
|
|
19970
19962
|
},
|
|
19963
|
+
showMoreToolbar: {
|
|
19964
|
+
type: Boolean,
|
|
19965
|
+
default: false,
|
|
19966
|
+
},
|
|
19971
19967
|
},
|
|
19972
19968
|
emits: ['toolClick'],
|
|
19973
19969
|
setup(props, { emit }) {
|
|
19974
|
-
const showMoreTools = ref(false);
|
|
19975
|
-
const moreButtonClick = () => {
|
|
19976
|
-
showMoreTools.value = !showMoreTools.value;
|
|
19977
|
-
};
|
|
19978
19970
|
return () => h('div', {
|
|
19979
19971
|
id: 'toolbar-' + props.editorKey,
|
|
19972
|
+
dataC: props.showMoreToolbar,
|
|
19980
19973
|
style: {
|
|
19981
19974
|
...props.toolbarStyle
|
|
19982
19975
|
}
|
|
@@ -19984,7 +19977,7 @@ const MoreToolbar = defineComponent({
|
|
|
19984
19977
|
h('div', {
|
|
19985
19978
|
class: {
|
|
19986
19979
|
'short-tools': true,
|
|
19987
|
-
'collapse':
|
|
19980
|
+
'collapse': props.showMoreToolbar
|
|
19988
19981
|
}
|
|
19989
19982
|
}, [
|
|
19990
19983
|
// 第一组:基础格式工具
|
|
@@ -20027,15 +20020,15 @@ const MoreToolbar = defineComponent({
|
|
|
20027
20020
|
h('button', {
|
|
20028
20021
|
class: 'ql-more mr-0',
|
|
20029
20022
|
type: 'button',
|
|
20030
|
-
onClick:
|
|
20023
|
+
onClick: () => emit('toolClick', 'more')
|
|
20031
20024
|
}, '')
|
|
20032
20025
|
])
|
|
20033
20026
|
]),
|
|
20034
20027
|
h('div', {
|
|
20035
20028
|
class: {
|
|
20036
20029
|
"more-tools": true,
|
|
20037
|
-
"collapse":
|
|
20038
|
-
}, style: { display:
|
|
20030
|
+
"collapse": props.showMoreToolbar
|
|
20031
|
+
}, style: { display: props.showMoreToolbar ? 'block' : 'none' }
|
|
20039
20032
|
}, [
|
|
20040
20033
|
h('div', { class: "more-tools-item" }, [
|
|
20041
20034
|
h('span', { class: 'ql-formats' }, [
|
|
@@ -20315,6 +20308,7 @@ const QuillEditor = defineComponent({
|
|
|
20315
20308
|
}
|
|
20316
20309
|
});
|
|
20317
20310
|
watchEffect(() => {
|
|
20311
|
+
console.log("init");
|
|
20318
20312
|
applyEditorStyle();
|
|
20319
20313
|
});
|
|
20320
20314
|
const registerModule = (moduleName, module) => {
|
|
@@ -20466,8 +20460,8 @@ const QuillEditor = defineComponent({
|
|
|
20466
20460
|
toolbar.style.display = 'block';
|
|
20467
20461
|
}
|
|
20468
20462
|
else {
|
|
20469
|
-
showMoreToolbar.value = false;
|
|
20470
20463
|
toolbar.style.display = 'none';
|
|
20464
|
+
showMoreToolbar.value = false;
|
|
20471
20465
|
}
|
|
20472
20466
|
}
|
|
20473
20467
|
ctx.emit('selectionChange', { range, oldRange, source });
|
|
@@ -20582,9 +20576,13 @@ const QuillEditor = defineComponent({
|
|
|
20582
20576
|
else if (tool === 'math') {
|
|
20583
20577
|
ctx.emit('math');
|
|
20584
20578
|
}
|
|
20579
|
+
else if (tool === 'more') {
|
|
20580
|
+
// 处理更多按钮点击
|
|
20581
|
+
showMoreToolbar.value = !showMoreToolbar.value;
|
|
20582
|
+
}
|
|
20585
20583
|
};
|
|
20586
20584
|
watch(() => props.content, (newContent) => {
|
|
20587
|
-
if (!quill ||
|
|
20585
|
+
if (!quill || internalModelEquals(newContent))
|
|
20588
20586
|
return;
|
|
20589
20587
|
const selection = quill.getSelection();
|
|
20590
20588
|
if (selection) {
|
|
@@ -20623,6 +20621,7 @@ const QuillEditor = defineComponent({
|
|
|
20623
20621
|
editorKey: String(this.$props.editorKey),
|
|
20624
20622
|
needCollapse: this.needCollapse,
|
|
20625
20623
|
toolbarStyle: this.$props.toolbarStyle,
|
|
20624
|
+
showMoreToolbar: this.showMoreToolbar,
|
|
20626
20625
|
onToolClick: (tool) => {
|
|
20627
20626
|
this.moreToolbarToolClick(tool);
|
|
20628
20627
|
}
|