Skip to content

Commit fcc08a1

Browse files
authored
Merge pull request #238 from niceplugin/examples/svg
예제 번역: /examples/svg
2 parents 1cb2561 + 733ea0a commit fcc08a1

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

ko-KR/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export const sidebar = {
469469
link: '/examples/#tree'
470470
},
471471
{
472-
text: 'SVG Graph',
472+
text: 'SVG 그래프',
473473
link: '/examples/#svg'
474474
},
475475
{

ko-KR/src/examples/src/svg/App/composition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
if (stats.length > 3) {
3131
stats.splice(stats.indexOf(stat), 1)
3232
} else {
33-
alert("Can't delete more!")
33+
alert("더 이상 삭제할 수 없습니다!")
3434
}
3535
}
3636

ko-KR/src/examples/src/svg/App/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default {
2929
if (this.stats.length > 3) {
3030
this.stats.splice(this.stats.indexOf(stat), 1)
3131
} else {
32-
alert("Can't delete more!")
32+
alert("더 이상 삭제할 수 없습니다!")
3333
}
3434
}
3535
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1+
<!-- 그래프 -->
12
<svg width="200" height="200">
23
<PolyGraph :stats="stats"></PolyGraph>
34
</svg>
45

5-
<!-- controls -->
6+
<!-- 컨트롤러 -->
67
<div v-for="stat in stats">
78
<label>{{stat.label}}</label>
89
<input type="range" v-model="stat.value" min="0" max="100">
910
<span>{{stat.value}}</span>
1011
<button @click="remove(stat)" class="remove">X</button>
1112
</div>
1213

14+
<!-- 입력 폼 -->
1315
<form id="add">
1416
<input name="newlabel" v-model="newLabel">
15-
<button @click="add">Add a Stat</button>
17+
<button @click="add">스탯 추가</button>
1618
</form>
1719

20+
<!-- 스탯 배열 시각적인 출력 -->
1821
<pre id="raw">{{ stats }}</pre>

ko-KR/src/examples/src/svg/PolyGraph/composition.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default {
1010
stats: Array
1111
},
1212
setup(props) {
13+
// polygon 태그의 points 속성에 적용할 계산된 속성
1314
const points = computed(() => {
1415
const total = props.stats.length
1516
return props.stats

ko-KR/src/examples/src/svg/PolyGraph/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
stats: Array
1010
},
1111
computed: {
12-
// a computed property for the polygon's points
12+
// polygon 태그의 points 속성에 적용할 계산된 속성
1313
points() {
1414
const total = this.stats.length
1515
return this.stats
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
Say Hello World with Vue!
1+
부모 컴포넌트에서 스탯(stats) 배열을
2+
자식 컴포넌트에게 전달하여 그래프를 그립니다.
3+
컴포넌트 간 공통으로 사용하는 로직은
4+
재사용성을 위해 컴포저블 함수로 되어있습니다.

0 commit comments

Comments
 (0)