mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-14 16:52:26 +08:00
feat(picker): add ability to use picker inline (#26336)
This commit is contained in:
@ -17,7 +17,6 @@ function generateOverlays() {
|
||||
},
|
||||
{
|
||||
tag: 'ion-picker',
|
||||
controller: 'pickerController',
|
||||
name: 'IonPicker'
|
||||
},
|
||||
{
|
||||
@ -34,7 +33,6 @@ function generateOverlays() {
|
||||
}
|
||||
]
|
||||
|
||||
let controllerImports = [];
|
||||
let componentImports = [];
|
||||
let componentDefinitions = [];
|
||||
|
||||
@ -46,14 +44,8 @@ function generateOverlays() {
|
||||
|
||||
componentImports.push(`import { defineCustomElement as ${defineCustomElementFn} } from '@ionic/core/components/${component.tag}.js'`);
|
||||
|
||||
if (component.controller) {
|
||||
controllerImports.push(component.controller);
|
||||
}
|
||||
|
||||
const controllerParam = (component.controller) ? `, ${component.controller}` : '';
|
||||
|
||||
componentDefinitions.push(`
|
||||
export const ${component.name} = /*@__PURE__*/ defineOverlayContainer<JSX.${component.name}>('${component.tag}', ${defineCustomElementFn}, [${props.join(', ')}]${controllerParam});
|
||||
export const ${component.name} = /*@__PURE__*/ defineOverlayContainer<JSX.${component.name}>('${component.tag}', ${defineCustomElementFn}, [${props.join(', ')}]);
|
||||
`);
|
||||
});
|
||||
|
||||
@ -64,7 +56,6 @@ export const ${component.name} = /*@__PURE__*/ defineOverlayContainer<JSX.${comp
|
||||
|
||||
import {
|
||||
JSX,
|
||||
${controllerImports.join(',\n ')},
|
||||
} from '@ionic/core/components';
|
||||
|
||||
${componentImports.join('\n')}
|
||||
|
Reference in New Issue
Block a user