fix: fix internal components render signature

This commit is contained in:
Evan You 2018-10-03 13:14:22 -04:00
parent 70947771dc
commit 8024f058cc
3 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ export function createAsyncComponent(
} }
} }
render(props: any, slots: Slots) { render(_: any, { props, slots }: { props: any; slots: Slots }) {
if (this.err || (this.timedOut && !this.comp)) { if (this.err || (this.timedOut && !this.comp)) {
const error = const error =
this.err || new Error(`Async component timed out after ${timeout}ms.`) this.err || new Error(`Async component timed out after ${timeout}ms.`)

View File

@ -31,7 +31,7 @@ export class Provide extends Component {
beforeUpdate() { beforeUpdate() {
this.updateValue() this.updateValue()
} }
render(_: any, slots: Slots) { render(_: any, { slots }: { slots: Slots }) {
return slots.default && slots.default() return slots.default && slots.default()
} }
} }
@ -49,7 +49,7 @@ Provide.options = {
} }
export class Inject extends Component { export class Inject extends Component {
render(props: any, slots: Slots) { render(_: any, { props, slots }: { props: any; slots: Slots }) {
return slots.default && slots.default(contextStore[props.id]) return slots.default && slots.default(contextStore[props.id])
} }
} }

View File

@ -49,7 +49,7 @@ export class KeepAlive extends Component<{}, KeepAliveProps> {
this.keys.delete(key) this.keys.delete(key)
} }
render(props: any, slots: Slots) { render(_: any, { props, slots }: { props: any; slots: Slots }) {
if (!slots.default) { if (!slots.default) {
return return
} }