constructor(data?:Customer) {
if(data) {
Object.assign(this, data)
}
}
์์ ์์๋ Typescipt Class ๋ด์ ์์ฑ์ ๋ฉ์๋ ์ด๋ค.
class์ ์ ์๋ ๊ฐ์ฒด์ ๋งค๊ฐ๋ณ์๋ก ๋์ด์จ data ๊ฐ์ฒด์ ๊ฐ์ ๋ฎ์ด์ฐ์ด๋ค.
๋ฐ์ํ
'๐ป dev' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๋งํ์ css ๋ก๋ง ๋ง๋ค๊ธฐ (0) | 2023.06.15 |
---|---|
[VUE] vue3 v-model props ๋ก ๋๊ธฐ๊ธฐ (0) | 2023.04.20 |
[vue] vue3 route ๊ฐ์ฒด (0) | 2023.03.03 |
[JS] target vs current target (0) | 2023.01.16 |
[Vue] Vue-router ๋ค๋น๊ฒ์ด์ ๊ฐ๋ (0) | 2023.01.13 |