Skip to content

Commit

Permalink
feat(process): change install & useage process
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongkyuuuu committed Sep 5, 2021
1 parent 90961eb commit e8924c9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
12 changes: 7 additions & 5 deletions playground/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<naver-map
<naver-maps
:width="mapSize.width"
:height="mapSize.height"
:mapOptions="mapOptions"
Expand All @@ -13,7 +13,7 @@
>
안녕하세요
</naver-marker>
</naver-map>
</naver-maps>
<br />
<br />
<br />
Expand All @@ -24,8 +24,10 @@
<script lang="ts">
import { defineComponent, reactive, ref } from "vue";
import type { naverV3 } from "../dist/vue3-naver-maps";
import { NaverMaps, NaverMarker } from "../dist/vue3-naver-maps";
export default defineComponent({
components: { NaverMaps, NaverMarker },
name: "App",
setup: () => {
const map = ref<naver.maps.Map | null>(null);
Expand All @@ -34,14 +36,14 @@ export default defineComponent({
height: "400px",
});
const mapOptions = ref<naverV3.mapOptions>({
latitude: 36,
longitude: 126,
// latitude: 36,
// longitude: 126,
zoom: 12,
zoomControl: false,
zoomControlOptions: { position: "TOP_RIGHT" },
mapTypeControl: false,
});
const initLayers = ref([
const initLayers = ref<naverV3.initLayer[]>([
"BACKGROUND",
"BACKGROUND_DETAIL",
"POI_KOREAN",
Expand Down
9 changes: 0 additions & 9 deletions src/config/components.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./install";
export * from "./components";
2 changes: 0 additions & 2 deletions src/config/install.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { App } from "vue";
import type { naverV3 } from "../types";
import { components } from "./components";

export function install(app: App<Element>, options: naverV3.install.options) {
// const ERROR_MSG_BROWSER =
Expand All @@ -10,7 +9,6 @@ export function install(app: App<Element>, options: naverV3.install.options) {
if (!options.clientId) throw new Error(ERROR_MSG_CLIENT);

_setupScript(options);
components(app);
}

/**
Expand Down
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { install } from "./config";
import NaverMaps from "./components/Map.vue";
import NaverMarker from "./components/Marker.vue";

export * from "./types";

/**
* Export Components
*/
export { NaverMaps, NaverMarker };

export default install;

0 comments on commit e8924c9

Please sign in to comment.