@stencil/vue-output-target
Advanced tools
Comparing version 0.6.1-dev.11655499531.137e1d26 to 0.6.1-dev.11657573317.16e0205c
{ | ||
"name": "@stencil/vue-output-target", | ||
"version": "0.6.1-dev.11655499531.137e1d26", | ||
"version": "0.6.1-dev.11657573317.16e0205c", | ||
"description": "Vue output target for @stencil/core components.", | ||
@@ -52,3 +52,3 @@ "main": "dist/index.cjs.js", | ||
}, | ||
"gitHead": "37e1d26a7f4f1fd4c6085af5b4abea974ac4c68b" | ||
"gitHead": "6e0205c1e021addd4683bd5fc976cc6c9a126c3a" | ||
} |
import { VNode, defineComponent, getCurrentInstance, h, inject, ref, Ref } from 'vue'; | ||
export interface InputProps extends Object { | ||
modelValue?: string | boolean; | ||
export interface InputProps<T> { | ||
modelValue?: T; | ||
} | ||
@@ -52,3 +52,3 @@ | ||
*/ | ||
export const defineContainer = <Props>( | ||
export const defineContainer = <Props, VModelType=string|number|boolean>( | ||
name: string, | ||
@@ -71,3 +71,3 @@ defineCustomElement: any, | ||
const Container = defineComponent<Props & InputProps>((props: any, { attrs, slots, emit }) => { | ||
const Container = defineComponent<Props & InputProps<VModelType>>((props: any, { attrs, slots, emit }) => { | ||
let modelPropValue = props[modelProp]; | ||
@@ -81,3 +81,3 @@ const containerRef = ref<HTMLElement>(); | ||
eventsNames.forEach((eventName: string) => { | ||
vnode.el.addEventListener(eventName.toLowerCase(), (e: Event) => { | ||
vnode.el!.addEventListener(eventName.toLowerCase(), (e: Event) => { | ||
modelPropValue = (e?.target as any)[modelProp]; | ||
@@ -84,0 +84,0 @@ emit(UPDATE_VALUE_EVENT, modelPropValue); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54508