Procházet zdrojové kódy

types: add refInFor to VNodeData (#8229)

Kael před 7 roky
rodič
revize
bfd722bb5d
2 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 2 1
      types/test/options-test.ts
  2. 1 0
      types/vnode.d.ts

+ 2 - 1
types/test/options-test.ts

@@ -176,7 +176,8 @@ Vue.component('component', {
         fontSize: '14px'
         fontSize: '14px'
       },
       },
       key: 'myKey',
       key: 'myKey',
-      ref: 'myRef'
+      ref: 'myRef',
+      refInFor: true
     }, [
     }, [
       createElement(),
       createElement(),
       createElement("div", "message"),
       createElement("div", "message"),

+ 1 - 0
types/vnode.d.ts

@@ -36,6 +36,7 @@ export interface VNodeData {
   slot?: string;
   slot?: string;
   scopedSlots?: { [key: string]: ScopedSlot };
   scopedSlots?: { [key: string]: ScopedSlot };
   ref?: string;
   ref?: string;
+  refInFor?: boolean;
   tag?: string;
   tag?: string;
   staticClass?: string;
   staticClass?: string;
   class?: any;
   class?: any;