yi-map-web 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ export default {
|
|
|
54
54
|
import { createApp } from "vue";
|
|
55
55
|
import App from "./App.vue";
|
|
56
56
|
import Mars3dVueComponents from "yi-map-web";
|
|
57
|
+
import "yi-map-web/dist/yi-map-web.css";
|
|
57
58
|
import "@fortawesome/fontawesome-free/css/all.min.css"; // 图标库
|
|
58
59
|
|
|
59
60
|
const app = createApp(App);
|
|
@@ -192,6 +193,28 @@ npm run dev
|
|
|
192
193
|
npm run build
|
|
193
194
|
```
|
|
194
195
|
|
|
196
|
+
## 打包后使用
|
|
197
|
+
|
|
198
|
+
组件库打包后,在消费项目中引入组件时,**必须**额外引入样式文件:
|
|
199
|
+
|
|
200
|
+
```ts
|
|
201
|
+
import "yi-map-web/dist/yi-map-web.css";
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
完整的消费项目入口文件示例:
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
import { createApp } from "vue";
|
|
208
|
+
import App from "./App.vue";
|
|
209
|
+
import Mars3dVueComponents from "yi-map-web";
|
|
210
|
+
import "yi-map-web/dist/yi-map-web.css"; // 必须引入,否则样式错乱
|
|
211
|
+
import "@fortawesome/fontawesome-free/css/all.min.css";
|
|
212
|
+
|
|
213
|
+
const app = createApp(App);
|
|
214
|
+
app.use(Mars3dVueComponents);
|
|
215
|
+
app.mount("#app");
|
|
216
|
+
```
|
|
217
|
+
|
|
195
218
|
## 许可证
|
|
196
219
|
|
|
197
220
|
MIT
|