Commit bc24ff2b authored by 曾沂轮's avatar 曾沂轮

更新成API模板

parent ec4c5e15
# svi-cli smart3d-vue3 Template
> 一个基于vite搭建的vue + typescript + smart3d-vue组件库应用模板,提供给svi-cli脚手架获取.
> 提供内部用Vue3 + smart3d-vue开发页面的初始模板
> 一个基于vite搭建的vue + typescript + smart3dapi应用模板,提供给svi-cli脚手架获取.
> 提供内部用Vue3 + smart3d开发页面的初始模板
> 主要包含 `vue`, `smart3d-vue`, `@smart/eslint-config-typescript` 智能的规范
## Usage / 用法
......
......@@ -11,7 +11,7 @@
"prepare": "husky install"
},
"dependencies": {
"smart3d-vue": "^1.2.0",
"smart3d": "^2.0.0",
"vue": "^3.2.13"
},
"devDependencies": {
......
<script setup lang="ts">
import type { Viewer } from 'smart3d';
import { SMap } from 'smart3d-vue';
import { Viewer } from 'smart3d';
import { onMounted, ref } from 'vue';
const viewerReady = (viewer: Viewer) => {
console.log(viewer);
};
const containerRef = ref();
onMounted(() => {
const container = containerRef.value;
viewer = new Viewer(container);
console.log(viewer);
})
</script>
<template>
<SMap class="viewer" @ready="viewerReady" />
<div ref="containerRef"></div>
</template>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment