Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--Arquivo html-->
- <template>
- <lightning-card title="Input com evento" icon-name="custom:custom44">
- <div class="slds-var-m-around_medium">
- <p class="estilo">Olá, {greeting}!</p>
- <lightning-input type="text" value={greeting} onchange={changeHandler} label="Escreva algo"></lightning-input>
- </div>
- </lightning-card>
- </template>
- //Arquivo javascript
- import { LightningElement } from 'lwc';
- export default class PrimeiroComponente extends LightningElement {
- greeting = 'Mundo';
- changeHandler(event){
- this.greeting = event.target.value;
- }
- }
- <!--Arquivo XML-->
- <targets>
- <target>lightning__HomePage</target>
- <target>lightning__RecordPage</target>
- <target>lightning__AppPage</target>
- </targets>
- <targetConfigs>
- <targetConfig targets="lightning__RecordPage">
- <objects>
- <object>Account</object>
- <object>Contact</object>
- <object>Opportunity</object>
- </objects>
- </targetConfig>
- </targetConfigs>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement