binxie
2023-06-26 de9565270a88b0749d17c1961cd41399c8483c96
force-app/main/default/lwc/childComponentTest/childComponentTest.js
New file
@@ -0,0 +1,18 @@
import { LightningElement,api } from 'lwc';
export default class ChildComponentTest extends LightningElement {
    _currentCount = 0;
    priorCount = 0;
    @api counter = 0;
    get counter() {
        return this._currentCount;
    }
    set counter(value) {
        this.priorCount = this._currentCount;
        this._currentCount = value;
    }
    @api
    maximizeCounter() {
      this.counter += 1000000;
    }
}