@suyouwanggang/p-ui
Version:
`p-ui`是一套使用原生`Web Components`规范开发的跨框架UI组件库,基于`lit-elment`库开发。 [github项目地址](https://github.com/suyouwanggang/p-ui)
42 lines (37 loc) • 2.31 kB
TypeScript
import { LitElement } from 'lit-element';
export declare class PSwitch extends LitElement {
disabled: boolean;
value: string;
checked: boolean;
name: string;
static get formAssociated(): boolean;
static styles: import("lit-element").CSSResult;
constructor();
changeCheck(): void;
dispatchChangeEvent(): void;
render(): import("lit-element").TemplateResult;
log(methodName: string, array: any[]): void;
/**(method) PSwitch.attributeChangedCallback(name: string, old: string | null, value: string | null): void
Synchronizes property values when attributes change. */
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
connectedCallback(): void;
/**Invoked when the element is first updated. Implement to perform one time work on the element after update.
Setting properties inside this method will trigger the element to update again after this update cycle completes.
@param _changedProperties Map of changed properties with old values */
firstUpdated(_changedProperties: Map<string | number | symbol, unknown>): void;
/**
* Performs element initialization. By default this calls createRenderRoot to create the element renderRoot node and captures any pre-set values for registered properties.
*
*/
initialize(): void;
performUpdate(): void | Promise<unknown>;
/**Controls whether or not update should be called when the element requests an update. By default, this method always returns true, but this can be customized to control when to update.
@param _changedProperties Map of changed properties with old values */
shouldUpdate(_changedProperties: Map<string | number | symbol, unknown>): boolean;
update(changedProperties: Map<string | number | symbol, unknown>): void;
/**Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.
Setting properties inside this method will trigger the element to update again after this update cycle completes.
@param _changedProperties Map of changed properties with old values */
updated(_changedProperties: Map<string | number | symbol, unknown>): void;
}
//# sourceMappingURL=p-switch.d.ts.map