Run
Auto Run
define('my-app', class extends WeElement { data = { ios_show: false, android_show: false, menus: [{ label: 'Option 1', onClick: () => { } }, { label: 'Option 2', onClick: () => { } }], actions: [ { label: 'Cancel', onClick: this.hide } ] }; hide = () => { Object.assign(this.data, { auto_show: false, ios_show: false, android_show: false, }) this.update() } render() { return (
{ this.data.ios_show = true; this.update(); }} > IOS ActionSheet
{ this.data.ios_show = false; this.update(); }} />
{ this.data.android_show = true; this.update(); }}> Android ActionSheet
{ this.data.android_show = false; this.update(); }} />
); } }) render(
, 'body')