pxx-vue-quill 1.0.16 → 1.0.17

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-25T01:50:19.065Z
10
+ * Date: 2025-08-25T02:25:20.932Z
11
11
  */
12
12
  import { defineComponent, onMounted, onBeforeUnmount, ref, computed, watch, nextTick, h } from 'vue';
13
13
 
@@ -18555,52 +18555,44 @@ var es = /*#__PURE__*/Object.freeze({
18555
18555
 
18556
18556
  var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
18557
18557
 
18558
- var Action = {};
18558
+ var Action$1 = {};
18559
18559
 
18560
- var hasRequiredAction;
18560
+ Object.defineProperty(Action$1, "__esModule", {
18561
+ value: true
18562
+ });
18561
18563
 
18562
- function requireAction () {
18563
- if (hasRequiredAction) return Action;
18564
- hasRequiredAction = 1;
18564
+ 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; }; }();
18565
18565
 
18566
- Object.defineProperty(Action, "__esModule", {
18567
- value: true
18568
- });
18566
+ var _BlotFormatter$1 = requireBlotFormatter();
18569
18567
 
18570
- 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; }; }();
18568
+ _interopRequireDefault$1(_BlotFormatter$1);
18571
18569
 
18572
- var _BlotFormatter = requireBlotFormatter();
18570
+ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18573
18571
 
18574
- _interopRequireDefault(_BlotFormatter);
18572
+ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18575
18573
 
18576
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18574
+ var Action = function () {
18575
+ function Action(formatter) {
18576
+ _classCallCheck$2(this, Action);
18577
18577
 
18578
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18579
-
18580
- var Action$1 = function () {
18581
- function Action(formatter) {
18582
- _classCallCheck(this, Action);
18583
-
18584
- this.formatter = formatter;
18585
- }
18578
+ this.formatter = formatter;
18579
+ }
18586
18580
 
18587
- _createClass(Action, [{
18588
- key: 'onCreate',
18589
- value: function onCreate() {}
18590
- }, {
18591
- key: 'onDestroy',
18592
- value: function onDestroy() {}
18593
- }, {
18594
- key: 'onUpdate',
18595
- value: function onUpdate() {}
18596
- }]);
18581
+ _createClass$2(Action, [{
18582
+ key: 'onCreate',
18583
+ value: function onCreate() {}
18584
+ }, {
18585
+ key: 'onDestroy',
18586
+ value: function onDestroy() {}
18587
+ }, {
18588
+ key: 'onUpdate',
18589
+ value: function onUpdate() {}
18590
+ }]);
18597
18591
 
18598
- return Action;
18599
- }();
18592
+ return Action;
18593
+ }();
18600
18594
 
18601
- Action.default = Action$1;
18602
- return Action;
18603
- }
18595
+ Action$1.default = Action;
18604
18596
 
18605
18597
  var hasRequiredBlotFormatter;
18606
18598
 
@@ -18622,7 +18614,7 @@ function requireBlotFormatter () {
18622
18614
 
18623
18615
  var _Options2 = _interopRequireDefault(_Options);
18624
18616
 
18625
- var _Action = requireAction();
18617
+ var _Action = Action$1;
18626
18618
 
18627
18619
  _interopRequireDefault(_Action);
18628
18620
 
@@ -18780,11 +18772,11 @@ Object.defineProperty(DefaultAligner$1, "__esModule", {
18780
18772
  value: true
18781
18773
  });
18782
18774
 
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; }; }();
18775
+ 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; }; }();
18784
18776
 
18785
18777
  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
18778
 
18787
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18779
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18788
18780
 
18789
18781
  var LEFT_ALIGN = 'left';
18790
18782
  var CENTER_ALIGN = 'center';
@@ -18795,7 +18787,7 @@ var DefaultAligner = function () {
18795
18787
  var _this = this,
18796
18788
  _alignments;
18797
18789
 
18798
- _classCallCheck(this, DefaultAligner);
18790
+ _classCallCheck$1(this, DefaultAligner);
18799
18791
 
18800
18792
  this.applyStyle = options.aligner.applyStyle;
18801
18793
  this.alignAttribute = options.attribute;
@@ -18823,7 +18815,7 @@ var DefaultAligner = function () {
18823
18815
  }), _alignments);
18824
18816
  }
18825
18817
 
18826
- _createClass(DefaultAligner, [{
18818
+ _createClass$1(DefaultAligner, [{
18827
18819
  key: 'getAlignments',
18828
18820
  value: function getAlignments() {
18829
18821
  var _this2 = this;
@@ -19061,7 +19053,7 @@ function requireAlignAction () {
19061
19053
 
19062
19054
  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; }; }();
19063
19055
 
19064
- var _Action2 = requireAction();
19056
+ var _Action2 = Action$1;
19065
19057
 
19066
19058
  var _Action3 = _interopRequireDefault(_Action2);
19067
19059
 
@@ -19140,7 +19132,7 @@ function requireResizeAction () {
19140
19132
 
19141
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; }; }();
19142
19134
 
19143
- var _Action2 = requireAction();
19135
+ var _Action2 = Action$1;
19144
19136
 
19145
19137
  var _Action3 = _interopRequireDefault(_Action2);
19146
19138
 
@@ -19329,7 +19321,7 @@ function requireDeleteAction () {
19329
19321
 
19330
19322
  var _quill2 = _interopRequireDefault(_quill);
19331
19323
 
19332
- var _Action2 = requireAction();
19324
+ var _Action2 = Action$1;
19333
19325
 
19334
19326
  var _Action3 = _interopRequireDefault(_Action2);
19335
19327
 
@@ -19408,7 +19400,7 @@ function requireBlotSpec () {
19408
19400
 
19409
19401
  _interopRequireDefault(_BlotFormatter);
19410
19402
 
19411
- var _Action = requireAction();
19403
+ var _Action = Action$1;
19412
19404
 
19413
19405
  _interopRequireDefault(_Action);
19414
19406
 
@@ -19548,156 +19540,148 @@ function requireImageSpec () {
19548
19540
 
19549
19541
  var IframeVideoSpec = {};
19550
19542
 
19551
- var UnclickableBlotSpec = {};
19552
-
19553
- var hasRequiredUnclickableBlotSpec;
19554
-
19555
- function requireUnclickableBlotSpec () {
19556
- if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19557
- hasRequiredUnclickableBlotSpec = 1;
19558
-
19559
- Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19560
- value: true
19561
- });
19543
+ var UnclickableBlotSpec$1 = {};
19562
19544
 
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; }; }();
19545
+ Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19546
+ value: true
19547
+ });
19564
19548
 
19565
- var _BlotSpec2 = requireBlotSpec();
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; }; }();
19566
19550
 
19567
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19551
+ var _BlotSpec2 = requireBlotSpec();
19568
19552
 
19569
- var _BlotFormatter = requireBlotFormatter();
19553
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19570
19554
 
19571
- _interopRequireDefault(_BlotFormatter);
19555
+ var _BlotFormatter = requireBlotFormatter();
19572
19556
 
19573
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19557
+ _interopRequireDefault(_BlotFormatter);
19574
19558
 
19575
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19559
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19576
19560
 
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; }
19561
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19578
19562
 
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; }
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; }
19580
19564
 
19581
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19582
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
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; }
19583
19566
 
19584
- var UnclickableBlotSpec$1 = function (_BlotSpec) {
19585
- _inherits(UnclickableBlotSpec, _BlotSpec);
19567
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19568
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19586
19569
 
19587
- function UnclickableBlotSpec(formatter, selector) {
19588
- _classCallCheck(this, UnclickableBlotSpec);
19570
+ var UnclickableBlotSpec = function (_BlotSpec) {
19571
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19589
19572
 
19590
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19573
+ function UnclickableBlotSpec(formatter, selector) {
19574
+ _classCallCheck(this, UnclickableBlotSpec);
19591
19575
 
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
- };
19576
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19598
19577
 
19599
- _this.onMouseEnter = function (event) {
19600
- var unclickable = event.target;
19601
- if (!(unclickable instanceof HTMLElement)) {
19602
- return;
19603
- }
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
+ };
19604
19584
 
19605
- _this.nextUnclickable = unclickable;
19606
- _this.repositionProxyImage(_this.nextUnclickable);
19607
- };
19585
+ _this.onMouseEnter = function (event) {
19586
+ var unclickable = event.target;
19587
+ if (!(unclickable instanceof HTMLElement)) {
19588
+ return;
19589
+ }
19608
19590
 
19609
- _this.onProxyImageClick = function () {
19610
- _this.unclickable = _this.nextUnclickable;
19611
- _this.nextUnclickable = null;
19612
- _this.formatter.show(_this);
19613
- _this.hideProxyImage();
19614
- };
19591
+ _this.nextUnclickable = unclickable;
19592
+ _this.repositionProxyImage(_this.nextUnclickable);
19593
+ };
19615
19594
 
19616
- _this.selector = selector;
19617
- _this.unclickable = null;
19618
- _this.nextUnclickable = null;
19619
- return _this;
19620
- }
19595
+ _this.onProxyImageClick = function () {
19596
+ _this.unclickable = _this.nextUnclickable;
19597
+ _this.nextUnclickable = null;
19598
+ _this.formatter.show(_this);
19599
+ _this.hideProxyImage();
19600
+ };
19621
19601
 
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
- }
19602
+ _this.selector = selector;
19603
+ _this.unclickable = null;
19604
+ _this.nextUnclickable = null;
19605
+ return _this;
19606
+ }
19632
19607
 
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
- });
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
+ }
19670
19618
 
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();
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
+ });
19684
19656
 
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
- }]);
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
+ }]);
19694
19680
 
19695
- return UnclickableBlotSpec;
19696
- }(_BlotSpec3.default);
19681
+ return UnclickableBlotSpec;
19682
+ }(_BlotSpec3.default);
19697
19683
 
19698
- UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19699
- return UnclickableBlotSpec;
19700
- }
19684
+ UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19701
19685
 
19702
19686
  var hasRequiredIframeVideoSpec;
19703
19687
 
@@ -19709,7 +19693,7 @@ function requireIframeVideoSpec () {
19709
19693
  value: true
19710
19694
  });
19711
19695
 
19712
- var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19696
+ var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19713
19697
 
19714
19698
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19715
19699
 
@@ -19864,7 +19848,7 @@ function requireOptions () {
19864
19848
  }
19865
19849
  });
19866
19850
 
19867
- var _Action = requireAction();
19851
+ var _Action = Action$1;
19868
19852
 
19869
19853
  Object.defineProperty(exports, 'Action', {
19870
19854
  enumerable: true,
@@ -19936,7 +19920,7 @@ function requireOptions () {
19936
19920
  }
19937
19921
  });
19938
19922
 
19939
- var _UnclickableBlotSpec = requireUnclickableBlotSpec();
19923
+ var _UnclickableBlotSpec = UnclickableBlotSpec$1;
19940
19924
 
19941
19925
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
19942
19926
  enumerable: true,
@@ -20002,6 +19986,12 @@ const QuillEditor = defineComponent({
20002
19986
  return ['fixed-top', 'embedded'].includes(value);
20003
19987
  },
20004
19988
  },
19989
+ // 传入toolbar的自定义style
19990
+ toolbarStyle: {
19991
+ type: Object,
19992
+ required: false,
19993
+ default: () => ({})
19994
+ },
20005
19995
  theme: {
20006
19996
  type: String,
20007
19997
  default: 'snow',
@@ -20086,6 +20076,22 @@ const QuillEditor = defineComponent({
20086
20076
  updateEditorHeight();
20087
20077
  });
20088
20078
  });
20079
+ // 应用自定义toolbar样式
20080
+ const applyToolbarStyle = () => {
20081
+ var _a;
20082
+ if (quill && props.toolbarStyle) {
20083
+ const toolbar = (_a = quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container;
20084
+ if (toolbar) {
20085
+ Object.assign(toolbar.style, props.toolbarStyle);
20086
+ }
20087
+ }
20088
+ };
20089
+ // 监听 toolbarStyle 变化
20090
+ watch(() => props.toolbarStyle, () => {
20091
+ nextTick(() => {
20092
+ applyToolbarStyle();
20093
+ });
20094
+ });
20089
20095
  // Register Module if not already registered
20090
20096
  const registerModule = (moduleName, module) => {
20091
20097
  // For Quill 1.x, we can't check if module is already registered
@@ -20139,6 +20145,8 @@ const QuillEditor = defineComponent({
20139
20145
  });
20140
20146
  // 设置初始编辑器高度
20141
20147
  updateEditorHeight();
20148
+ // 应用初始toolbar样式
20149
+ applyToolbarStyle();
20142
20150
  // Emit ready event
20143
20151
  ctx.emit('ready', quill);
20144
20152
  };
@@ -20162,7 +20170,6 @@ const QuillEditor = defineComponent({
20162
20170
  handlers: {
20163
20171
  ocr: function () {
20164
20172
  // 按钮点击逻辑
20165
- console.log('ocr');
20166
20173
  ctx.emit('ocr');
20167
20174
  },
20168
20175
  math: function () {
@@ -20225,14 +20232,7 @@ const QuillEditor = defineComponent({
20225
20232
  const isEditorFocus = ref();
20226
20233
  const handleSelectionChange = (range, oldRange, source) => {
20227
20234
  var _a;
20228
- console.log("----------------------------------");
20229
- console.log(range);
20230
- console.log(oldRange);
20231
- console.log(source);
20232
- // Set isEditorFocus if quill.hasFocus()
20233
20235
  isEditorFocus.value = !!(quill === null || quill === void 0 ? void 0 : quill.hasFocus());
20234
- console.log(isEditorFocus.value);
20235
- console.log("----------------------------------");
20236
20236
  // 动态显示/隐藏toolbar
20237
20237
  const toolbar = (_a = quill === null || quill === void 0 ? void 0 : quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container;
20238
20238
  if (toolbar) {