]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix: fix internal components render signature
authorEvan You <yyx990803@gmail.com>
Wed, 3 Oct 2018 17:14:22 +0000 (13:14 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 3 Oct 2018 17:14:22 +0000 (13:14 -0400)
packages/core/src/optional/asyncComponent.ts
packages/core/src/optional/context.ts
packages/core/src/optional/keepAlive.ts

index 752035a3a7d02e062debd1bc87f74a9f9a6fb2ce..1267fa3fd91dc278b9b3569b9b26a935a1d55c4a 100644 (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)) {
         const error =
           this.err || new Error(`Async component timed out after ${timeout}ms.`)
index c04eb228e10412f616d66205add8c1798335a140..59793040264ec9a77c33211d985ba7023ca0970b 100644 (file)
@@ -31,7 +31,7 @@ export class Provide extends Component {
   beforeUpdate() {
     this.updateValue()
   }
-  render(_: any, slots: Slots) {
+  render(_: any, { slots }: { slots: Slots }) {
     return slots.default && slots.default()
   }
 }
@@ -49,7 +49,7 @@ Provide.options = {
 }
 
 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])
   }
 }
index c36fc52c108cf5060a101a548982175777c908ba..ca3de37cf13ffa1d81bd6d8ed6e0f1ef7e9613b0 100644 (file)
@@ -49,7 +49,7 @@ export class KeepAlive extends Component<{}, KeepAliveProps> {
     this.keys.delete(key)
   }
 
-  render(props: any, slots: Slots) {
+  render(_: any, { props, slots }: { props: any; slots: Slots }) {
     if (!slots.default) {
       return
     }