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 +83 -0
- package/dist/001.css +6532 -0
- package/dist/001.html +40 -0
- package/dist/002.html +35 -0
- package/dist/003.html +9 -0
- package/dist/004.css +784 -0
- package/dist/004.html +210 -0
- package/dist/gp-designer.es.js +11993 -0
- package/dist/gp-designer.umd.js +17 -0
- package/dist/iconfont.css +616 -0
- package/dist/images/004/banner.png +0 -0
- package/dist/images/004/tip-trimark.png +0 -0
- package/dist/pageiconfont.css +59 -0
- package/dist/style.css +14 -0
- package/dist/template/img/about_us_banners.png +0 -0
- package/dist/types/App.vue.d.ts +2 -0
- package/dist/types/components/Designer.vue.d.ts +2 -0
- package/dist/types/components/EditorPanel.vue.d.ts +11 -0
- package/dist/types/components/ElementRenderer.vue.d.ts +33 -0
- package/dist/types/components/GpCropperModal/index.vue.d.ts +21 -0
- package/dist/types/components/GpSvgIcon/CustomIcon.vue.d.ts +8 -0
- package/dist/types/components/GpSvgIcon/IconModal.vue.d.ts +11 -0
- package/dist/types/components/Model.d.ts +43 -0
- package/dist/types/components/UploadImage.vue.d.ts +43 -0
- package/dist/types/file.d.ts +22 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/main.d.ts +0 -0
- package/dist/types/utils/base64Conver.d.ts +20 -0
- package/package.json +46 -0
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
|
+

|
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
|