Skip to content

Commit 126467f

Browse files
committed
chore(compat): do not pollute Vue.extend
1 parent 1055afd commit 126467f

File tree

175 files changed

+449
-454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+449
-454
lines changed

src/components/alert/alert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { COMPONENT_UID_KEY, Vue } from '../../vue'
1+
import { COMPONENT_UID_KEY, defineComponent } from '../../vue'
22
import { NAME_ALERT } from '../../constants/components'
33
import { EVENT_NAME_DISMISSED, EVENT_NAME_DISMISS_COUNT_DOWN } from '../../constants/events'
44
import {
@@ -68,7 +68,7 @@ export const props = makePropsConfigurable(
6868
// --- Main component ---
6969

7070
// @vue/component
71-
export const BAlert = /*#__PURE__*/ Vue.extend({
71+
export const BAlert = /*#__PURE__*/ defineComponent({
7272
name: NAME_ALERT,
7373
compatConfig: {
7474
MODE: 3,

src/components/aspect/aspect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_ASPECT } from '../../constants/components'
33
import { PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props'
44
import { RX_ASPECT, RX_ASPECT_SEPARATOR } from '../../constants/regex'
@@ -26,7 +26,7 @@ export const props = makePropsConfigurable(
2626
// --- Main component ---
2727

2828
// @vue/component
29-
export const BAspect = /*#__PURE__*/ Vue.extend({
29+
export const BAspect = /*#__PURE__*/ defineComponent({
3030
name: NAME_ASPECT,
3131
mixins: [normalizeSlotMixin],
3232
props,

src/components/avatar/avatar-group.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_AVATAR_GROUP } from '../../constants/components'
33
import {
44
PROP_TYPE_BOOLEAN,
@@ -33,7 +33,7 @@ export const props = makePropsConfigurable(
3333
// --- Main component ---
3434

3535
// @vue/component
36-
export const BAvatarGroup = /*#__PURE__*/ Vue.extend({
36+
export const BAvatarGroup = /*#__PURE__*/ defineComponent({
3737
name: NAME_AVATAR_GROUP,
3838
mixins: [normalizeSlotMixin],
3939
provide() {

src/components/avatar/avatar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_AVATAR } from '../../constants/components'
33
import { EVENT_NAME_CLICK, EVENT_NAME_IMG_ERROR } from '../../constants/events'
44
import {
@@ -67,7 +67,7 @@ export const props = makePropsConfigurable(
6767
// --- Main component ---
6868

6969
// @vue/component
70-
export const BAvatar = /*#__PURE__*/ Vue.extend({
70+
export const BAvatar = /*#__PURE__*/ defineComponent({
7171
name: NAME_AVATAR,
7272
mixins: [normalizeSlotMixin],
7373
inject: {

src/components/badge/badge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_BADGE } from '../../constants/components'
33
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
44
import { omit, sortKeys } from '../../utils/object'
@@ -25,7 +25,7 @@ export const props = makePropsConfigurable(
2525
// --- Main component ---
2626

2727
// @vue/component
28-
export const BBadge = /*#__PURE__*/ Vue.extend({
28+
export const BBadge = /*#__PURE__*/ defineComponent({
2929
name: NAME_BADGE,
3030
functional: true,
3131
props,

src/components/breadcrumb/breadcrumb-item.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_BREADCRUMB_ITEM } from '../../constants/components'
33
import { makePropsConfigurable } from '../../utils/props'
44
import { BBreadcrumbLink, props as BBreadcrumbLinkProps } from './breadcrumb-link'
@@ -10,7 +10,7 @@ export const props = makePropsConfigurable(BBreadcrumbLinkProps, NAME_BREADCRUMB
1010
// --- Main component ---
1111

1212
// @vue/component
13-
export const BBreadcrumbItem = /*#__PURE__*/ Vue.extend({
13+
export const BBreadcrumbItem = /*#__PURE__*/ defineComponent({
1414
name: NAME_BREADCRUMB_ITEM,
1515
functional: true,
1616
props,

src/components/breadcrumb/breadcrumb-link.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_BREADCRUMB_LINK } from '../../constants/components'
33
import { PROP_TYPE_STRING } from '../../constants/props'
44
import { htmlOrText } from '../../utils/html'
@@ -21,7 +21,7 @@ export const props = makePropsConfigurable(
2121
// --- Main component ---
2222

2323
// @vue/component
24-
export const BBreadcrumbLink = /*#__PURE__*/ Vue.extend({
24+
export const BBreadcrumbLink = /*#__PURE__*/ defineComponent({
2525
name: NAME_BREADCRUMB_LINK,
2626
functional: true,
2727
props,

src/components/breadcrumb/breadcrumb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_BREADCRUMB } from '../../constants/components'
33
import { PROP_TYPE_ARRAY } from '../../constants/props'
44
import { isArray, isObject } from '../../utils/inspect'
@@ -18,7 +18,7 @@ export const props = makePropsConfigurable(
1818
// --- Main component ---
1919

2020
// @vue/component
21-
export const BBreadcrumb = /*#__PURE__*/ Vue.extend({
21+
export const BBreadcrumb = /*#__PURE__*/ defineComponent({
2222
name: NAME_BREADCRUMB,
2323
functional: true,
2424
props,

src/components/button-group/button-group.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_BUTTON_GROUP } from '../../constants/components'
33
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
44
import { pick, sortKeys } from '../../utils/object'
@@ -21,7 +21,7 @@ export const props = makePropsConfigurable(
2121
// --- Main component ---
2222

2323
// @vue/component
24-
export const BButtonGroup = /*#__PURE__*/ Vue.extend({
24+
export const BButtonGroup = /*#__PURE__*/ defineComponent({
2525
name: NAME_BUTTON_GROUP,
2626
functional: true,
2727
props,

src/components/button-toolbar/button-toolbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_BUTTON_TOOLBAR } from '../../constants/components'
33
import { PROP_TYPE_BOOLEAN } from '../../constants/props'
44
import { CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_UP } from '../../constants/key-codes'
@@ -30,7 +30,7 @@ export const props = makePropsConfigurable(
3030
// --- Main component ---
3131

3232
// @vue/component
33-
export const BButtonToolbar = /*#__PURE__*/ Vue.extend({
33+
export const BButtonToolbar = /*#__PURE__*/ defineComponent({
3434
name: NAME_BUTTON_TOOLBAR,
3535
mixins: [normalizeSlotMixin],
3636
props,

src/components/button/button-close.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_BUTTON_CLOSE } from '../../constants/components'
33
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
44
import { SLOT_NAME_DEFAULT } from '../../constants/slots'
@@ -22,7 +22,7 @@ export const props = makePropsConfigurable(
2222
// --- Main component ---
2323

2424
// @vue/component
25-
export const BButtonClose = /*#__PURE__*/ Vue.extend({
25+
export const BButtonClose = /*#__PURE__*/ defineComponent({
2626
name: NAME_BUTTON_CLOSE,
2727
compatConfig: {
2828
MODE: 3,

src/components/button/button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_BUTTON } from '../../constants/components'
33
import { CODE_ENTER, CODE_SPACE } from '../../constants/key-codes'
44
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
@@ -115,7 +115,7 @@ const computeAttrs = (props, data) => {
115115
// --- Main component ---
116116

117117
// @vue/component
118-
export const BButton = /*#__PURE__*/ Vue.extend({
118+
export const BButton = /*#__PURE__*/ defineComponent({
119119
name: NAME_BUTTON,
120120
functional: true,
121121
props,

src/components/calendar/calendar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_CALENDAR } from '../../constants/components'
33
import {
44
CALENDAR_GREGORY,
@@ -180,7 +180,7 @@ export const props = makePropsConfigurable(
180180
// --- Main component ---
181181

182182
// @vue/component
183-
export const BCalendar = Vue.extend({
183+
export const BCalendar = defineComponent({
184184
name: NAME_CALENDAR,
185185
compatConfig: {
186186
MODE: 3,

src/components/card/card-body.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_BODY } from '../../constants/components'
33
import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props'
44
import { sortKeys } from '../../utils/object'
@@ -29,7 +29,7 @@ export const props = makePropsConfigurable(
2929
// --- Main component ---
3030

3131
// @vue/component
32-
export const BCardBody = /*#__PURE__*/ Vue.extend({
32+
export const BCardBody = /*#__PURE__*/ defineComponent({
3333
name: NAME_CARD_BODY,
3434
functional: true,
3535
props,

src/components/card/card-footer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_FOOTER } from '../../constants/components'
33
import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props'
44
import { htmlOrText } from '../../utils/html'
@@ -21,7 +21,7 @@ export const props = makePropsConfigurable(
2121
// --- Main component ---
2222

2323
// @vue/component
24-
export const BCardFooter = /*#__PURE__*/ Vue.extend({
24+
export const BCardFooter = /*#__PURE__*/ defineComponent({
2525
name: NAME_CARD_FOOTER,
2626
functional: true,
2727
props,

src/components/card/card-group.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_GROUP } from '../../constants/components'
33
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
44
import { makeProp, makePropsConfigurable } from '../../utils/props'
@@ -17,7 +17,7 @@ export const props = makePropsConfigurable(
1717
// --- Main component ---
1818

1919
// @vue/component
20-
export const BCardGroup = /*#__PURE__*/ Vue.extend({
20+
export const BCardGroup = /*#__PURE__*/ defineComponent({
2121
name: NAME_CARD_GROUP,
2222
functional: true,
2323
props,

src/components/card/card-header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_HEADER } from '../../constants/components'
33
import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props'
44
import { htmlOrText } from '../../utils/html'
@@ -21,7 +21,7 @@ export const props = makePropsConfigurable(
2121
// --- Main component ---
2222

2323
// @vue/component
24-
export const BCardHeader = /*#__PURE__*/ Vue.extend({
24+
export const BCardHeader = /*#__PURE__*/ defineComponent({
2525
name: NAME_CARD_HEADER,
2626
functional: true,
2727
props,

src/components/card/card-img-lazy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_IMG_LAZY } from '../../constants/components'
33
import { keys, omit, sortKeys } from '../../utils/object'
44
import { makePropsConfigurable } from '../../utils/props'
@@ -19,7 +19,7 @@ export const props = makePropsConfigurable(
1919
// --- Main component ---
2020

2121
// @vue/component
22-
export const BCardImgLazy = /*#__PURE__*/ Vue.extend({
22+
export const BCardImgLazy = /*#__PURE__*/ defineComponent({
2323
name: NAME_CARD_IMG_LAZY,
2424
functional: true,
2525
props,

src/components/card/card-img.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_IMG } from '../../constants/components'
33
import { PROP_TYPE_BOOLEAN } from '../../constants/props'
44
import { pick, sortKeys } from '../../utils/object'
@@ -21,7 +21,7 @@ export const props = makePropsConfigurable(
2121
// --- Main component ---
2222

2323
// @vue/component
24-
export const BCardImg = /*#__PURE__*/ Vue.extend({
24+
export const BCardImg = /*#__PURE__*/ defineComponent({
2525
name: NAME_CARD_IMG,
2626
functional: true,
2727
props,

src/components/card/card-sub-title.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_SUB_TITLE } from '../../constants/components'
33
import { PROP_TYPE_STRING } from '../../constants/props'
44
import { makeProp, makePropsConfigurable } from '../../utils/props'
@@ -18,7 +18,7 @@ export const props = makePropsConfigurable(
1818
// --- Main component ---
1919

2020
// @vue/component
21-
export const BCardSubTitle = /*#__PURE__*/ Vue.extend({
21+
export const BCardSubTitle = /*#__PURE__*/ defineComponent({
2222
name: NAME_CARD_SUB_TITLE,
2323
functional: true,
2424
props,

src/components/card/card-text.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_TEXT } from '../../constants/components'
33
import { PROP_TYPE_STRING } from '../../constants/props'
44
import { makeProp, makePropsConfigurable } from '../../utils/props'
@@ -15,7 +15,7 @@ export const props = makePropsConfigurable(
1515
// --- Main component ---
1616

1717
// @vue/component
18-
export const BCardText = /*#__PURE__*/ Vue.extend({
18+
export const BCardText = /*#__PURE__*/ defineComponent({
1919
name: NAME_CARD_TEXT,
2020
functional: true,
2121
props,

src/components/card/card-title.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD_TITLE } from '../../constants/components'
33
import { PROP_TYPE_STRING } from '../../constants/props'
44
import { makeProp, makePropsConfigurable } from '../../utils/props'
@@ -17,7 +17,7 @@ export const props = makePropsConfigurable(
1717
// --- Main component ---
1818

1919
// @vue/component
20-
export const BCardTitle = /*#__PURE__*/ Vue.extend({
20+
export const BCardTitle = /*#__PURE__*/ defineComponent({
2121
name: NAME_CARD_TITLE,
2222
functional: true,
2323
props,

src/components/card/card.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue, mergeData } from '../../vue'
1+
import { defineComponent, mergeData } from '../../vue'
22
import { NAME_CARD } from '../../constants/components'
33
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
44
import { SLOT_NAME_DEFAULT, SLOT_NAME_FOOTER, SLOT_NAME_HEADER } from '../../constants/slots'
@@ -40,7 +40,7 @@ export const props = makePropsConfigurable(
4040
// --- Main component ---
4141

4242
// @vue/component
43-
export const BCard = /*#__PURE__*/ Vue.extend({
43+
export const BCard = /*#__PURE__*/ defineComponent({
4444
name: NAME_CARD,
4545
compatConfig: {
4646
MODE: 3,

src/components/carousel/carousel-slide.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_CAROUSEL_SLIDE } from '../../constants/components'
33
import { HAS_TOUCH_SUPPORT } from '../../constants/env'
44
import { PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props'
@@ -43,7 +43,7 @@ export const props = makePropsConfigurable(
4343
// --- Main component ---
4444

4545
// @vue/component
46-
export const BCarouselSlide = /*#__PURE__*/ Vue.extend({
46+
export const BCarouselSlide = /*#__PURE__*/ defineComponent({
4747
name: NAME_CAROUSEL_SLIDE,
4848
mixins: [idMixin, normalizeSlotMixin],
4949
inject: {

src/components/carousel/carousel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_CAROUSEL } from '../../constants/components'
33
import { IS_BROWSER, HAS_POINTER_EVENT_SUPPORT, HAS_TOUCH_SUPPORT } from '../../constants/env'
44
import {
@@ -132,7 +132,7 @@ export const props = makePropsConfigurable(
132132
// --- Main component ---
133133

134134
// @vue/component
135-
export const BCarousel = /*#__PURE__*/ Vue.extend({
135+
export const BCarousel = /*#__PURE__*/ defineComponent({
136136
name: NAME_CAROUSEL,
137137
compatConfig: {
138138
MODE: 3,

src/components/collapse/collapse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Vue } from '../../vue'
1+
import { defineComponent } from '../../vue'
22
import { NAME_COLLAPSE } from '../../constants/components'
33
import { CLASS_NAME_SHOW } from '../../constants/classes'
44
import { IS_BROWSER } from '../../constants/env'
@@ -55,7 +55,7 @@ export const props = makePropsConfigurable(
5555
// --- Main component ---
5656

5757
// @vue/component
58-
export const BCollapse = /*#__PURE__*/ Vue.extend({
58+
export const BCollapse = /*#__PURE__*/ defineComponent({
5959
name: NAME_COLLAPSE,
6060
compatConfig: {
6161
MODE: 3,

0 commit comments

Comments
 (0)