Skip to content

Commit 78b0ca6

Browse files
committed
index.ts
1 parent d3cf61b commit 78b0ca6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function ComponentBase(arg: ComponentConsOption, ctx?: ClassDecoratorCont
182182
}, arg, ctx)
183183
}
184184

185-
export const Component = ComponentBase
185+
186186

187187
export function toNative<T extends Cons>(cons: T): T {
188188
const slot = obtainSlot(cons.prototype)

src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { Component, ComponentBase } from './component'
1+
export { ComponentBase, ComponentBase as Component } from './component'
22
export { decorator as Setup } from './option/setup'
33
export { decorator as Ref } from './option/ref'
44
export { decorator as Watch } from './option/watch'
@@ -12,7 +12,5 @@ export { decorator as Hook } from './option/methodsAndHooks'
1212
export { createDecorator } from './custom/custom'
1313
export { mixins } from './mixins'
1414
export { TSX } from './tsx/type'
15-
import { Base } from './class'
16-
export { Base }
17-
export const Vue = Base
15+
export { Base, Base as Vue } from './class'
1816
export { toNative } from './component'

src/mixins.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ComponentBase } from './component'
22
import { obtainSlot } from './utils'
33
import type { VueCons } from './class'
44
import { Vue } from './index'
5+
56
import type { MergeIdentityType, IdentitySymbol } from './identity'
67
type MixedClass<Mixins extends VueCons[], Base extends VueCons = VueCons> =
78
Mixins extends [infer T extends VueCons, ...infer E extends VueCons[]] ?
@@ -14,7 +15,7 @@ type MixedClass<Mixins extends VueCons[], Base extends VueCons = VueCons> =
1415
export function mixins<T extends VueCons[]>(...conses: T) {
1516
class MixinsClass extends Vue {
1617
}
17-
18+
1819
ComponentBase({
1920
mixins: conses.map((cons => obtainSlot(cons.prototype).cachedVueComponent))
2021
})(MixinsClass)

0 commit comments

Comments
 (0)