vue-facing-decorator
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -22,4 +22,5 @@ import { WatchConfig } from './option/watch'; | ||
provide?: Record<string, any> | Function; | ||
components?: Record<string, any>; | ||
modifier?: (raw: any) => any; | ||
}): any; | ||
//# sourceMappingURL=component.d.ts.map |
@@ -37,2 +37,5 @@ import { defineComponent } from 'vue'; | ||
} | ||
if (arg.components) { | ||
option.components = arg.components; | ||
} | ||
if (arg.provide) { | ||
@@ -39,0 +42,0 @@ option.provide = arg.provide; |
{ | ||
"name": "vue-facing-decorator", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Vue typescript class and decorator based component.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -20,3 +20,3 @@ # Read me | ||
} from "vue-facing-decorator"; | ||
import AnotherComponent from "./AnotherComponent.vue"; | ||
//super class, DO NOT SUPPORT ANY DECORATOR now | ||
@@ -44,2 +44,6 @@ class Sup extends Base { | ||
}, | ||
//OPTION, components | ||
components: { | ||
AnotherComponent, | ||
}, | ||
//OPTION, use modifier to modify component option built by vue-facing-decorator | ||
@@ -132,4 +136,8 @@ modifier: (option: any) => { | ||
import { defineComponent} from "vue"; | ||
import AnotherComponent from "./AnotherComponent.vue"; | ||
export default defineComponent({ | ||
name: "MyComponent", | ||
components:{ | ||
AnotherComponent | ||
}, | ||
emits: ["update:modelValue"], | ||
@@ -136,0 +144,0 @@ provide: { |
@@ -50,2 +50,3 @@ import { defineComponent } from 'vue'; | ||
provide?: Record<string, any> | Function | ||
components?:Record<string,any> | ||
modifier?: (raw: any) => any | ||
@@ -64,2 +65,5 @@ }): any { | ||
} | ||
if(arg.components){ | ||
option.components=arg.components | ||
} | ||
if (arg.provide) { | ||
@@ -66,0 +70,0 @@ option.provide = arg.provide |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
51294
814
206