gp-designer 1.0.5

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 ADDED
@@ -0,0 +1,83 @@
1
+ # GP 网页设计器
2
+
3
+
4
+ ---
5
+
6
+ ## 1.百度地图显示
7
+
8
+ ```ts
9
+ yarn add gp-designer
10
+ import { GpBaiduMap } from "gp-designer";
11
+ import 'gp-designer/dist/style.css';
12
+ ```
13
+
14
+ ![预览](./docs/images/GpBaiduMap.png)
15
+
16
+ ```ts
17
+ <GpBaiduMap class="w-[360px]" :lng="lng" :lat="lat" :title="title" />
18
+
19
+ <h2>1.百度地图显示组件</h2>
20
+ <h3>a.单个标记点</h3>
21
+ <button class="bg-blue-200" @click="onChanageLngLat">修改经纬度</button>
22
+ <GpBaiduMap class="w-[360px]" :lng="lng" :lat="lat" :title="title" />
23
+
24
+ <h2 class="mt-8">b.多个标记点</h2>
25
+ <button class="bg-blue-200" @click="items = items2">修改经纬度</button>
26
+ <GpBaiduMap :zoom="13" class="w-[360px]" :items="items" />
27
+
28
+ <h2 class="mt-8">c.不显示未选中标记点文字,自定义 zoom</h2>
29
+ <button class="bg-blue-200" @click="onChangeCenter">切换中心点</button>
30
+ <GpBaiduMap :zoom="12" class="w-[360px]" :items="items" :no-select-show-text="false" />
31
+ ```
32
+
33
+ ## SSR 项目中使用
34
+
35
+ > 注意配置 nuxt.config.ts
36
+
37
+ ```ts
38
+ export default defineNuxtConfig({
39
+ // ...
40
+ build: {
41
+ transpile: ["gp-designer"],
42
+ },
43
+ vite: {
44
+ optimizeDeps: {
45
+ include: ["gp-designer"],
46
+ },
47
+ },
48
+ //...
49
+ });
50
+ ```
51
+
52
+ ## 发布 npm 包
53
+
54
+ ```ts
55
+ npm run push
56
+ ```
57
+
58
+ ## 项目说明
59
+
60
+ Vue 3 + TypeScript + Vite + tailwindcss
61
+
62
+ ## 初始化项目
63
+
64
+ ```bash
65
+ npm init vite@latest gp-city-selector --template vue-ts
66
+
67
+ npm install -D tailwindcss postcss autoprefixer
68
+ npx tailwindcss init
69
+ ```
70
+
71
+ ## Vue 3 + TypeScript + Vite
72
+
73
+ npm init vite@latest gp-designer -- --template vue-ts
74
+ cd my-vue3-lib
75
+ npm install
76
+
77
+ This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
78
+
79
+ Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
80
+
81
+ ## 问题参考
82
+
83
+ - 打包 ts 类型问题:https://blog.csdn.net/Wrysmile0308/article/details/134318030