@stencil/vue-output-target
Advanced tools
Comparing version 0.6.1-dev.11676048291.1d2fefc9 to 0.6.1-dev.11681238809.11549fe0
@@ -12,5 +12,7 @@ import { dashToPascalCase } from './utils'; | ||
} | ||
const componentType = `${importTypes}.${tagNameAsPascal}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
const modelType = findModel !== undefined ? `, ${componentType}["${findModel.targetAttr}"]` : ''; | ||
let templateString = ` | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`; | ||
if (props.length > 0) { | ||
@@ -22,3 +24,3 @@ templateString += `, [ | ||
* If there are no props, | ||
* but but v-model is stil used, | ||
* but v-model is still used, | ||
* make sure we pass in an empty array | ||
@@ -25,0 +27,0 @@ * otherwise all of the defineContainer properties |
@@ -100,5 +100,7 @@ 'use strict'; | ||
} | ||
const componentType = `${importTypes}.${tagNameAsPascal}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
const modelType = findModel !== undefined ? `, ${componentType}["${findModel.targetAttr}"]` : ''; | ||
let templateString = ` | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`; | ||
if (props.length > 0) { | ||
@@ -110,3 +112,3 @@ templateString += `, [ | ||
* If there are no props, | ||
* but but v-model is stil used, | ||
* but v-model is still used, | ||
* make sure we pass in an empty array | ||
@@ -113,0 +115,0 @@ * otherwise all of the defineContainer properties |
@@ -91,5 +91,7 @@ import path from 'path'; | ||
} | ||
const componentType = `${importTypes}.${tagNameAsPascal}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
const modelType = findModel !== undefined ? `, ${componentType}["${findModel.targetAttr}"]` : ''; | ||
let templateString = ` | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`; | ||
if (props.length > 0) { | ||
@@ -101,3 +103,3 @@ templateString += `, [ | ||
* If there are no props, | ||
* but but v-model is stil used, | ||
* but v-model is still used, | ||
* make sure we pass in an empty array | ||
@@ -104,0 +106,0 @@ * otherwise all of the defineContainer properties |
{ | ||
"name": "@stencil/vue-output-target", | ||
"version": "0.6.1-dev.11676048291.1d2fefc9", | ||
"version": "0.6.1-dev.11681238809.11549fe0", | ||
"description": "Vue output target for @stencil/core components.", | ||
@@ -39,3 +39,3 @@ "main": "dist/index.cjs.js", | ||
"peerDependencies": { | ||
"@stencil/core": "^2.9.0 || ^3.0.0-beta.0" | ||
"@stencil/core": "^2.9.0 || ^3.0.0" | ||
}, | ||
@@ -56,3 +56,3 @@ "jest": { | ||
}, | ||
"gitHead": "d2fefc950d237782ab8bd4dbf443bddfb7ac1784" | ||
"gitHead": "1549fe0dbcec5dd0927c7aaef10a9032e8b6a4bf" | ||
} |
@@ -187,3 +187,3 @@ import { VNode, defineComponent, getCurrentInstance, h, inject, ref, Ref } from 'vue'; | ||
Container.displayName = name; | ||
Container.name = name; | ||
@@ -190,0 +190,0 @@ Container.props = { |
54982
994