UNPKG

@omni-door/tpl-component-vue

Version:
10 lines (9 loc) 792 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tpl_new_index = void 0; var utils_1 = require("@omni-door/utils"); var tpl = "`import ${componentName} from './${type === 'sfc' ? componentName + '.vue' : componentName}';\n${ts ? `import type { App, defineComponent } from 'vue';\n\nexport type ${componentName} = ReturnType<typeof defineComponent> & {\n install(app: App): void\n}\n` : ''}\n${ts ? `(${componentName} as ${componentName}).install` : `${componentName}.install`} = (${ts ? `app: App` : 'app'}): void => {\n app.component(${componentName}.${ts ? 'name!' : 'name'}, ${componentName});\n};\n\nexport default ${componentName};\n`"; exports.tpl_new_index = { tpl: tpl }; exports.default = utils_1.tplEngineNew(exports.tpl_new_index, 'tpl');