goodteditor-ui 1.0.76 → 2.0.1

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.
Files changed (45) hide show
  1. package/.eslintrc.js +10 -8
  2. package/index.html +20 -0
  3. package/package.json +12 -32
  4. package/postcss.config.js +1 -0
  5. package/src/components/ui/Badge.vue +3 -2
  6. package/src/components/ui/ColorPicker/Alpha.vue +1 -0
  7. package/src/components/ui/ColorPicker/Colors.vue +2 -1
  8. package/src/components/ui/ColorPicker/Hue.vue +1 -0
  9. package/src/components/ui/ColorPicker/Saturation.vue +1 -0
  10. package/src/components/ui/ColorPicker.vue +5 -4
  11. package/src/components/ui/Datalist.vue +8 -7
  12. package/src/components/ui/DatePicker.vue +11 -10
  13. package/src/components/ui/FileSelector.vue +2 -1
  14. package/src/components/ui/Grid.vue +14 -9
  15. package/src/components/ui/Image.vue +4 -2
  16. package/src/components/ui/InputAutocomplete.vue +23 -22
  17. package/src/components/ui/InputColorPicker.vue +10 -9
  18. package/src/components/ui/InputDatePicker.vue +11 -10
  19. package/src/components/ui/InputTags.vue +14 -13
  20. package/src/components/ui/InputTimePicker.vue +10 -9
  21. package/src/components/ui/InputUnits.vue +5 -5
  22. package/src/components/ui/Lazy.vue +5 -4
  23. package/src/components/ui/Pagination.vue +5 -4
  24. package/src/components/ui/Paginator.vue +5 -4
  25. package/src/components/ui/Popover.vue +14 -9
  26. package/src/components/ui/Popup.vue +5 -4
  27. package/src/components/ui/ResponsiveContainer.vue +17 -10
  28. package/src/components/ui/Select.vue +16 -14
  29. package/src/components/ui/TimePicker.vue +6 -7
  30. package/src/components/ui/Tooltip.vue +4 -3
  31. package/src/components/ui/WysiwygEditor/WysiwygEditor.vue +11 -10
  32. package/src/components/ui/WysiwygEditor/extensions/font-size.js +1 -1
  33. package/src/components/ui/WysiwygEditor/extensions/formatting.js +1 -1
  34. package/src/components/ui/WysiwygEditor/renders/ColorPicker.vue +3 -3
  35. package/src/components/ui/WysiwygEditor/renders/InputAuto.vue +3 -3
  36. package/src/components/ui/WysiwygEditor/renders/InputUnits.vue +2 -2
  37. package/src/components/ui/WysiwygEditor/renders/Select.vue +2 -2
  38. package/src/components/ui/WysiwygEditor/renders/ToolbarPopover.vue +2 -2
  39. package/src/components/ui/WysiwygEditor/renders/components/Tooltip.vue +2 -1
  40. package/src/components/ui/WysiwygEditor/renders/mixins/RenderMixin.js +1 -0
  41. package/src/components/ui/utils/FormComponent.js +36 -37
  42. package/src/main.js +2 -6
  43. package/vite.config.js +6 -0
  44. package/babel.config.js +0 -5
  45. package/vue.config.js +0 -8
@@ -18,7 +18,7 @@
18
18
  -->
19
19
  <slot
20
20
  name="input"
21
- v-bind="{ id: inputId, value, valueLabel, inputBinds, inputEvents }"
21
+ v-bind="{ id: inputId, value: modelValue, valueLabel, inputBinds, inputEvents }"
22
22
  >
23
23
  <input
24
24
  :id="inputId"
@@ -34,7 +34,7 @@
34
34
  @slot Custom clear icon slot
35
35
  @binding {Function} clear function that clears the value
36
36
  -->
37
- <slot name="clear" v-bind="{ clear }" v-if="value && value.length && allowClear">
37
+ <slot name="clear" v-bind="{ clear }" v-if="modelValue && modelValue.length && allowClear">
38
38
  <div class="icon cursor-pointer w-auto h-auto mar-left-2" @click="clear">
39
39
  <i class="mdi mdi-close"></i>
40
40
  </div>
@@ -49,7 +49,7 @@
49
49
  </div>
50
50
  </slot>
51
51
  </div>
52
- <ui-popover :show.sync="popoverShow" v-bind="popoverOptions">
52
+ <ui-popover v-model:show="popoverShow" v-bind="popoverOptions">
53
53
  <date-picker
54
54
  class="ui-input-date-picker-dp pull-left"
55
55
  @change="onDpChange"
@@ -119,7 +119,7 @@ export default {
119
119
  /**
120
120
  * @model
121
121
  */
122
- value: {
122
+ modelValue: {
123
123
  type: [String, Array],
124
124
  default: '',
125
125
  },
@@ -189,6 +189,7 @@ export default {
189
189
  },
190
190
  },
191
191
  },
192
+ emits: ['clear', 'change', 'set-date'],
192
193
  data() {
193
194
  return {
194
195
  date: null,
@@ -207,7 +208,7 @@ export default {
207
208
  return !!this.datepicker.range;
208
209
  },
209
210
  valueLabel() {
210
- return Array.isArray(this.value) ? this.value.join(this.delimiter) : this.value;
211
+ return Array.isArray(this.modelValue) ? this.modelValue.join(this.delimiter) : this.modelValue;
211
212
  },
212
213
  inputBinds() {
213
214
  const { placeholder, readonly, editable } = this;
@@ -218,7 +219,7 @@ export default {
218
219
  }
219
220
  },
220
221
  watch: {
221
- value: {
222
+ modelValue: {
222
223
  handler(val) {
223
224
  this.inputValueRaw = val;
224
225
 
@@ -242,7 +243,7 @@ export default {
242
243
  * Input event
243
244
  * @property {String} date
244
245
  */
245
- this.$emit('input', val ? [] : '');
246
+ this.$emit('update:modelValue', val ? [] : '');
246
247
  }
247
248
  },
248
249
  methods: {
@@ -251,7 +252,7 @@ export default {
251
252
  * Input event
252
253
  * @property {String} date
253
254
  */
254
- this.$emit('input', this.isRange ? [] : '');
255
+ this.$emit('update:modelValue', this.isRange ? [] : '');
255
256
  /**
256
257
  * Clear event
257
258
  */
@@ -280,7 +281,7 @@ export default {
280
281
  * Input event
281
282
  * @property {String} date
282
283
  */
283
- this.$emit('input', model);
284
+ this.$emit('update:modelValue', model);
284
285
  /**
285
286
  * Change event
286
287
  * @property {String|Array} value
@@ -314,7 +315,7 @@ export default {
314
315
  * Input event
315
316
  * @property {String} date
316
317
  */
317
- this.$emit('input', model);
318
+ this.$emit('update:modelValue', model);
318
319
  /**
319
320
  * Change event
320
321
  * @property {String|Array} value
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <div class="ui-input-tags form-elem" :class="cssClass" @focus="onRootFocus" tabindex="0">
3
- <div class="ui-input-tags-tags" v-if="value.length">
3
+ <div class="ui-input-tags-tags" v-if="modelValue.length">
4
4
  <!--
5
5
  @slot Tag slot
6
6
  @binding {String} tag tag
7
7
  @binding {Function} remove remove tag function(tag)
8
8
  -->
9
- <slot name="tag" v-for="tag in value" v-bind="{ tag, remove: removeTag }">
9
+ <slot name="tag" v-for="tag in modelValue" v-bind="{ tag, remove: removeTag }">
10
10
  <ui-badge
11
11
  class="ui-input-tags-badge mar-none mar-right-2 mar-bot-2 pull-left cursor-pointer"
12
12
  :class="{ 'ui-input-tags-badge--selected': tagSelected === tag }"
@@ -43,7 +43,7 @@
43
43
  <input
44
44
  :id="inputId"
45
45
  class="ui-input-tags-input w-100"
46
- :class="{ 'mar-top-2': value.length }"
46
+ :class="{ 'mar-top-2': modelValue.length }"
47
47
  type="text"
48
48
  tabindex="-1"
49
49
  :value="newTag"
@@ -94,7 +94,7 @@ export default {
94
94
  /**
95
95
  * @model
96
96
  */
97
- value: {
97
+ modelValue: {
98
98
  type: Array,
99
99
  default() {
100
100
  return [];
@@ -117,6 +117,7 @@ export default {
117
117
  default: ',',
118
118
  },
119
119
  },
120
+ emits: ['change'],
120
121
  data() {
121
122
  return {
122
123
  newTag: '',
@@ -143,18 +144,18 @@ export default {
143
144
  },
144
145
  addTag() {
145
146
  let newTags = this.valueFilter(
146
- this.value,
147
+ this.modelValue,
147
148
  this.newTag.split(this.delimiter).map(tag => tag.trim())
148
149
  );
149
150
  if (!newTags.length) {
150
151
  return;
151
152
  }
152
- let tags = [...this.value, ...newTags];
153
+ let tags = [...this.modelValue, ...newTags];
153
154
  /**
154
155
  * Input event
155
156
  * @property {Array} tags
156
157
  */
157
- this.$emit('input', tags);
158
+ this.$emit('update:modelValue', tags);
158
159
  /**
159
160
  * Change event
160
161
  * @property {Array} tags
@@ -166,12 +167,12 @@ export default {
166
167
  * @param {string} tag
167
168
  */
168
169
  removeTag(tag) {
169
- let tags = this.value.filter(t => t !== tag);
170
+ let tags = this.modelValue.filter(t => t !== tag);
170
171
  /**
171
172
  * Input event
172
173
  * @property {Array} tags
173
174
  */
174
- this.$emit('input', tags);
175
+ this.$emit('update:modelValue', tags);
175
176
  /**
176
177
  * Change event
177
178
  * @property {Array} tags
@@ -213,20 +214,20 @@ export default {
213
214
  * @param {number} direction
214
215
  */
215
216
  selectTag(direction = -1) {
216
- const lastIndex = this.value.length - 1;
217
+ const lastIndex = this.modelValue.length - 1;
217
218
  let tagSelected = this.tagSelected;
218
219
 
219
220
  if (tagSelected === null) {
220
- tagSelected = this.value[lastIndex] ?? null;
221
+ tagSelected = this.modelValue[lastIndex] ?? null;
221
222
  } else {
222
- let index = this.value.findIndex((tag) => tag === tagSelected) + direction;
223
+ let index = this.modelValue.findIndex((tag) => tag === tagSelected) + direction;
223
224
  if (index > lastIndex) {
224
225
  index = 0;
225
226
  }
226
227
  if (index < 0) {
227
228
  index = lastIndex;
228
229
  }
229
- tagSelected = this.value[index];
230
+ tagSelected = this.modelValue[index];
230
231
  }
231
232
 
232
233
  if (tagSelected === null) {
@@ -15,12 +15,12 @@
15
15
  @binding {Object} inputBinds input props (use v-bind)
16
16
  @binding {Object} inputEvents input events (use v-on)
17
17
  -->
18
- <slot name="input" v-bind="{ id: inputId, value, inputBinds, inputEvents }">
18
+ <slot name="input" v-bind="{ id: inputId, value: modelValue, inputBinds, inputEvents }">
19
19
  <input
20
20
  :id="inputId"
21
21
  class="ui-input-time-picker-input w-100"
22
22
  type="text"
23
- :value="value"
23
+ :value="modelValue"
24
24
  v-bind="inputBinds"
25
25
  v-on="inputEvents"
26
26
  />
@@ -30,7 +30,7 @@
30
30
  @slot Custom clear icon slot
31
31
  @binding {Function} clear function that clears the value
32
32
  -->
33
- <slot name="clear" v-bind="{ clear }" v-if="value && allowClear">
33
+ <slot name="clear" v-bind="{ clear }" v-if="modelValue && allowClear">
34
34
  <div class="icon cursor-pointer w-auto h-auto mar-left-2" @click="clear">
35
35
  <i class="mdi mdi-close"></i>
36
36
  </div>
@@ -45,7 +45,7 @@
45
45
  </div>
46
46
  </slot>
47
47
  </div>
48
- <ui-popover :show.sync="popoverShow" v-bind="popoverOptions">
48
+ <ui-popover v-model:show="popoverShow" v-bind="popoverOptions">
49
49
  <time-picker
50
50
  class="ui-input-time-picker-tp w-100"
51
51
  :value="time"
@@ -168,6 +168,7 @@ export default {
168
168
  default: true,
169
169
  },
170
170
  },
171
+ emits: ['change', 'clear'],
171
172
  data() {
172
173
  return {
173
174
  time: null,
@@ -189,7 +190,7 @@ export default {
189
190
  }
190
191
  },
191
192
  watch: {
192
- value: {
193
+ modelValue: {
193
194
  handler(val) {
194
195
  this.time = this.toTime(val);
195
196
  },
@@ -202,7 +203,7 @@ export default {
202
203
  * Input event
203
204
  * @property {String} time
204
205
  */
205
- this.$emit('input', '');
206
+ this.$emit('update:modelValue', '');
206
207
  /**
207
208
  * Clear event
208
209
  */
@@ -218,7 +219,7 @@ export default {
218
219
  * Input event
219
220
  * @property {String} time
220
221
  */
221
- this.$emit('input', data);
222
+ this.$emit('update:modelValue', data);
222
223
  /**
223
224
  * Change event
224
225
  * @property {String} time
@@ -231,7 +232,7 @@ export default {
231
232
  * Input event
232
233
  * @property {String} time
233
234
  */
234
- this.$emit('input', val);
235
+ this.$emit('update:modelValue', val);
235
236
  },
236
237
  onInputFocus(e) {
237
238
  this.rootHasFocus = true;
@@ -246,7 +247,7 @@ export default {
246
247
  * Input event
247
248
  * @property {String} time
248
249
  */
249
- this.$emit('input', data);
250
+ this.$emit('update:modelValue', data);
250
251
  /**
251
252
  * Change event
252
253
  * @property {String} time
@@ -27,12 +27,12 @@
27
27
  {{ model.unit }}
28
28
  </span>
29
29
  </div>
30
- <ui-popover :show.sync="popoverShow" v-bind="popoverOptions">
30
+ <ui-popover v-model:show="popoverShow" v-bind="popoverOptions">
31
31
  <ui-datalist
32
32
  class="pull-left w-100"
33
33
  ref="datalist"
34
34
  v-bind="{ options: units, size }"
35
- :cursorIndex.sync="dataListCursorIndex"
35
+ v-model:cursorIndex="dataListCursorIndex"
36
36
  @select-option="onUnitChange"
37
37
  >
38
38
  <template #header>
@@ -90,7 +90,6 @@
90
90
  padding: 0;
91
91
  color: inherit;
92
92
  background: transparent;
93
- outline: none;
94
93
  -moz-appearance: textfield;
95
94
  &::-webkit-outer-spin-button,
96
95
  &::-webkit-inner-spin-button {
@@ -141,6 +140,7 @@ export default {
141
140
  default: `${Position.BOTTOM}-${Position.END}`,
142
141
  },
143
142
  },
143
+ emits: ['focus', 'change'],
144
144
  data() {
145
145
  return {
146
146
  model: {
@@ -174,7 +174,7 @@ export default {
174
174
  },
175
175
  },
176
176
  watch: {
177
- value: {
177
+ modelValue: {
178
178
  handler(v) {
179
179
  const a = String(v).match(withUnitRegExp);
180
180
  const [_, n, u] = a ?? [];
@@ -200,7 +200,7 @@ export default {
200
200
  * Change event
201
201
  * @property {String} value
202
202
  */
203
- this.$emit('input', value);
203
+ this.$emit('update:modelValue', value);
204
204
  },
205
205
  emitChange() {
206
206
  const value = this.isModelValid ? this.valuePrivate : '';
@@ -1,4 +1,5 @@
1
1
  <script>
2
+ import { h } from 'vue';
2
3
  import { useIntersectionObserver } from './utils/Helpers';
3
4
 
4
5
  export default {
@@ -45,7 +46,7 @@ export default {
45
46
  this.stopObserver = stop;
46
47
  this.calcMinHeight();
47
48
  },
48
- beforeDestroy() {
49
+ beforeUnmount() {
49
50
  if (this.stopObserver) {
50
51
  this.stopObserver();
51
52
  }
@@ -82,10 +83,10 @@ export default {
82
83
  });
83
84
  },
84
85
  },
85
- render(h) {
86
+ render() {
86
87
  const { tag, shouldRender, cssStyle: style } = this;
87
- const { default: defaultSlot } = this.$scopedSlots;
88
- const children = shouldRender && defaultSlot ? defaultSlot() : [];
88
+ const { default: defaultSlot } = this.$slots;
89
+ const children = shouldRender && defaultSlot ? defaultSlot() : {};
89
90
  return h(tag, { style }, children);
90
91
  },
91
92
  };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="ui-pagination">
3
- <!--
3
+ <!--
4
4
  @slot Custom before slot
5
5
  @binding {Number} page page
6
6
  @binding {Number} pages pages
@@ -8,7 +8,7 @@
8
8
  @binding {Function} next selects next page
9
9
  -->
10
10
  <slot name="before" v-bind="{ page, pages, prev, next }"></slot>
11
- <!--
11
+ <!--
12
12
  @slot Page item slot
13
13
  @binding {Number} page page
14
14
  @binding {Number} index index
@@ -30,7 +30,7 @@
30
30
  </div>
31
31
  </div>
32
32
  </slot>
33
- <!--
33
+ <!--
34
34
  @slot Custom after slot
35
35
  @binding {Number} page page
36
36
  @binding {Number} pages pages
@@ -71,6 +71,7 @@ export default {
71
71
  default: 7,
72
72
  },
73
73
  },
74
+ emits: ['update:page', 'select', 'change'],
74
75
  computed: {
75
76
  pagesComputed() {
76
77
  let arr = [];
@@ -118,7 +119,7 @@ export default {
118
119
  */
119
120
  this.$emit('change', page);
120
121
  /**
121
- * Update page event (for .sync usage)
122
+ * Update page event
122
123
  * @property {Number} page
123
124
  */
124
125
  this.$emit('update:page', page);
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="ui-paginator">
3
- <!--
3
+ <!--
4
4
  @slot Page data slot
5
- @binding {Number} page current page number
5
+ @binding {Number} page current page number
6
6
  @binding {Number} pages total pages number
7
7
  @binding {Array} pageData current page data
8
8
  @binding {(n:number) => {}} setPage sets a new page
@@ -23,7 +23,7 @@ export default {
23
23
  },
24
24
  },
25
25
  /**
26
- * Current page (.sync supported)
26
+ * Current page (v-model supported)
27
27
  */
28
28
  page: {
29
29
  type: Number,
@@ -40,6 +40,7 @@ export default {
40
40
  },
41
41
  },
42
42
  },
43
+ emits: ['update:page', 'change'],
43
44
  data() {
44
45
  return { currentPage: 1 };
45
46
  },
@@ -68,7 +69,7 @@ export default {
68
69
  setPage(page) {
69
70
  this.currentPage = page;
70
71
  /**
71
- * Page change event (page.sync compatibility)
72
+ * Page change event
72
73
  * @property {number} page
73
74
  */
74
75
  this.$emit('update:page', page);
@@ -49,15 +49,15 @@ const Modifier = Object.freeze({
49
49
  export default {
50
50
  directives: {
51
51
  'append-body': {
52
- inserted(el, bindings, { context }) {
53
- let { appendToBody } = context;
52
+ mounted(el, { instance }, { context }) {
53
+ let { appendToBody } = instance;
54
54
  if (!appendToBody) {
55
55
  return;
56
56
  }
57
- const nt = context.$nextTick;
57
+ const nt = instance.$nextTick;
58
58
  nt(() => nt(() => document.body.appendChild(el)));
59
59
  },
60
- unbind(el, bindings, { context }) {
60
+ unmounted(el) {
61
61
  el.parentNode && el.parentNode.removeChild(el);
62
62
  },
63
63
  },
@@ -127,6 +127,7 @@ export default {
127
127
  default: true
128
128
  }
129
129
  },
130
+ emits: ['update:show'],
130
131
  data() {
131
132
  return { cssStyle: {} };
132
133
  },
@@ -184,17 +185,21 @@ export default {
184
185
  created() {
185
186
  this.popper = null;
186
187
  },
187
- destroyed() {
188
+ beforeUnmount() {
188
189
  this.handleReset();
189
190
  },
190
191
  methods: {
191
192
  addEventListeners() {
192
- window.addEventListener('blur', this.onWinBlur);
193
- document.addEventListener('mousedown', this.onDocMouseDown);
193
+ this.controller = new AbortController();
194
+ const { signal } = this.controller;
195
+ window.addEventListener('blur', this.onWinBlur, { signal });
196
+ document.addEventListener('mousedown', this.onDocMouseDown, { signal });
194
197
  },
195
198
  removeEventListeners() {
196
- window.removeEventListener('blur', this.onWinBlur);
197
- document.removeEventListener('mousedown', this.onDocMouseDown);
199
+ if (this.controller != null) {
200
+ this.controller.abort();
201
+ this.controller = null;
202
+ }
198
203
  },
199
204
  calcStyle() {
200
205
  const { zIndex, autoWidth, shouldRespondToPointerEvents } = this;
@@ -25,7 +25,7 @@
25
25
  <div
26
26
  class="popup-dialog-footer"
27
27
  :class="{ 'pad-none': !usePadding }"
28
- v-if="$scopedSlots.footer"
28
+ v-if="$slots.footer != null"
29
29
  >
30
30
  <!--
31
31
  @slot Custom footer slot
@@ -59,7 +59,7 @@
59
59
  export default {
60
60
  props: {
61
61
  /**
62
- * Whether the popup is visible (.sync supported)
62
+ * Whether the popup is visible
63
63
  */
64
64
  visible: {
65
65
  type: Boolean,
@@ -121,6 +121,7 @@ export default {
121
121
  default: 'scroll-hide',
122
122
  },
123
123
  },
124
+ emits: ['close', 'update:visible'],
124
125
  computed: {
125
126
  dialogBodyClass() {
126
127
  const { dialogBody, usePadding } = this;
@@ -146,7 +147,7 @@ export default {
146
147
  immediate: true,
147
148
  },
148
149
  },
149
- beforeDestroy() {
150
+ beforeUnmount() {
150
151
  if (this.visibleBodyClass) {
151
152
  document.body.classList.remove(this.visibleBodyClass);
152
153
  }
@@ -158,7 +159,7 @@ export default {
158
159
  */
159
160
  this.$emit('close');
160
161
  /**
161
- * Visibility update event (visible.sync compatibility)
162
+ * Visibility update event
162
163
  * @property {Boolean} visible
163
164
  */
164
165
  this.$emit('update:visible', false);
@@ -1,4 +1,5 @@
1
1
  <script>
2
+ import { h } from 'vue';
2
3
  import { debounce } from './utils/Helpers';
3
4
 
4
5
  const ObserverManager = {
@@ -14,8 +15,11 @@ const ObserverManager = {
14
15
  },
15
16
  unregister(el) {
16
17
  const { records } = this;
17
- records.delete(el);
18
- this.observer.unobserve(el);
18
+ if (records.has(el)) {
19
+ records.delete(el);
20
+ this.observer.unobserve(el);
21
+ }
22
+
19
23
  if (!records.size) {
20
24
  this.destroyObserver();
21
25
  }
@@ -31,7 +35,7 @@ const ObserverManager = {
31
35
  this.observer = new ResizeObserver(debounce(callback, 50));
32
36
  },
33
37
  destroyObserver() {
34
- this.observer.disconnect();
38
+ this.observer?.disconnect?.();
35
39
  this.observer = null;
36
40
  },
37
41
  };
@@ -70,27 +74,30 @@ export default {
70
74
  },
71
75
  mounted() {
72
76
  const { $el: el } = this;
77
+ if (el.nodeType === Node.COMMENT_NODE) {
78
+ return;
79
+ }
73
80
  const fn = ({ contentRect }) => {
74
81
  this.width = contentRect.width | 0;
75
82
  this.height = contentRect.height | 0;
76
83
  };
77
84
  ObserverManager.register({ fn, el });
78
85
  },
79
- beforeDestroy() {
86
+ beforeUnmount() {
80
87
  ObserverManager.unregister(this.$el);
81
88
  },
82
- render(h) {
89
+ render() {
83
90
  const { breakpoint, width, height } = this;
84
91
  /*
85
92
  @slot Page data slot
86
- @binding {string} breakpoint breakpoint name
87
- @binding {number} width current container width (px)
93
+ @binding {string} breakpoint breakpoint name
94
+ @binding {number} width current container width (px)
88
95
  @binding {number} height current container height (px)
89
96
  */
90
- const content = this.$scopedSlots.default
91
- ? this.$scopedSlots.default({ breakpoint, width, height })
97
+ const content = this.$slots.default?.() != null
98
+ ? this.$slots.default({ breakpoint, width, height })
92
99
  : null;
93
- if (content.length > 1) {
100
+ if (content?.length > 1) {
94
101
  return h('div', 'Slot content should have one child');
95
102
  }
96
103
  return content;