-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add new docs migration from 3.x (#10)
- Loading branch information
1 parent
65f073d
commit 6db989f
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# 3.x λ²μ μΌλ‘ λΆν° λ§μ΄κ·Έλ μ΄μ | ||
|
||
4.x λ²μ μ 3.xμμ μ 체μ μΈ μ½λ 리ν©ν λ§ μμ κ³Ό `install` λΆλΆμ΄ λ³κ²½ λμμ΅λλ€. | ||
|
||
## vue3-naver-maps μ€μΉ μ, μ€μΉ λͺ¨λ μ΄λ¦ λ³κ²½ | ||
|
||
μμΈν μμ μ½λλ [μ€μΉνκΈ° - μ€μ λ°©λ²](../start/install.md)μμ νμΈ κ°λ₯ν©λλ€. | ||
|
||
### 3.x μ΄μ | ||
|
||
3.x μ΄μ μλ `vue3-naver-maps`μμ `export default`λ‘ νΈμΆ λ κ°μ install moduleλ‘ μ¬μ© νμμ΅λλ€. | ||
|
||
```javascript | ||
import { createApp } from "vue"; | ||
import App from "./app.vue"; | ||
import naver from "vue3-naver-maps"; | ||
|
||
const app = createApp(App); | ||
|
||
app.use(naver, { clientId: "your clientId" }).mount("#app"); | ||
``` | ||
|
||
### 4.x μ΄ν | ||
|
||
4.x μ΄ν λΆν°λ `createNaverMap`μ΄λΌλ λͺ νν install moduleμ μ¬μ©ν©λλ€. | ||
|
||
```javascript | ||
import { createApp } from "vue"; | ||
import App from "./app.vue"; | ||
import { createNaverMap } from "vue3-naver-maps"; | ||
|
||
const app = createApp(App); | ||
|
||
app.use(createNaverMap, { clientId: "your clientId" }).mount("#app"); | ||
``` | ||
|
||
## μ€μΉ μ΅μ `subModules` λ³κ²½ | ||
|
||
κΈ°μ‘΄ `string`μ `,`λ‘ μ¬λ¬ λͺ¨λμ μ¬μ© νλ€λ©΄, 4.x μ΄ν λΆν° `array`λ‘ νμν λͺ¨λμ λΆλ¬μμ μ¬μ© ν©λλ€. | ||
|
||
λν `SubModules` νμ μ€ν¬λ¦½νΈ μ μ λ₯Ό μν νμ μ μ 곡ν©λλ€. | ||
|
||
```typescript | ||
import { createApp } from "vue"; | ||
import App from "./app.vue"; | ||
import { createNaverMap } from "vue3-naver-maps"; | ||
import type { SubModules } from "vue3-naver-maps"; // subModule type | ||
|
||
const app = createApp(App); | ||
|
||
app | ||
.use(createNaverMap, { | ||
clientId: "your clientId", // Required | ||
subModules: [] as SubModules, | ||
}) | ||
.mount("#app"); | ||
``` |