EP.12

호롤롤·2023년 8월 2일
0

뽀스모

목록 보기
10/11

🔒 정리중 🔒 정리중 🔒 정리중 🔒 정리중 🔒 정리중 🔒 정리중 🔒 정리중 🔒 정리중 🔒
23.08.02 ~ 23.08.08 하루에 20분씩/ 지난 영상들 통한 예제

🪓예제


1) apiProperty

  • html
 <template>
    <lightning-card title="ApiProperty" icon-name="standard:product_consumed">
        <div class="slds-m-around_medium">
            <lightning-input
                label="Percentage"
                type="number"
                min="0"
                max="100"
                value={percentage}
                onchange={handlePercentageChange}>
            </lightning-input>
            <c-chart-bar percentage={percentage}></c-chart-bar>
        </div>
    </lightning-card>
    <c-view-source source="lwc/apiProperty" slot="footer">
        Parent-to-Child communication, Pass data to a child component using
        its public (@api) properties.
    </c-view-source>
</template>
  • js
import { LightningElement } from 'lwc';
export default class ApiProperty extends LightningElement {
    percentage;
    handlePercentageChange(event) {
        this.percentage = event.target.value;
        // console.log('#percentage : ' + this.pen)
    }
}

2) apiFuction

3) apiGetterSetter

할 수 있 다 할 수 있다ㅑ할 수 있 다 할 수 있다ㅑ할 수 있 다 할 수 있다ㅑ할 수 있 다 할 수 있다ㅑ할 수 있 다 할 수 있다ㅑ할 수 있 다 할 수 있다ㅑ할 수 있 다 할 수 있다ㅑ할 수 있 다 할 수 있다ㅑ

1개의 댓글

comment-user-thumbnail
2023년 8월 2일

정보 감사합니다.

답글 달기