@zhangqingcq/vgce 0.1.26 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangqingcq/vgce",
3
- "version": "0.1.26",
3
+ "version": "0.1.29",
4
4
  "description": "Vector graphics configure editor. svg组态编辑器。基于vue3.3+ts+element-plus+vite",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -142,6 +142,14 @@
142
142
 
143
143
  onMounted(() => {
144
144
  configStore.net.mqtt.useGlobalMqtt = Boolean(props.mqtt?.cover)
145
+ if (!configStore.net.mqtt.global) {
146
+ configStore.net.mqtt.global = {
147
+ url: '',
148
+ user: '',
149
+ pwd: '',
150
+ topics: ''
151
+ }
152
+ }
145
153
  configStore.net.mqtt.global.url = props.mqtt?.url || ''
146
154
  configStore.net.mqtt.global.user = props.mqtt?.user || ''
147
155
  configStore.net.mqtt.global.pwd = props.mqtt?.pwd || ''
package/types/index.d.ts CHANGED
@@ -10,9 +10,10 @@ export declare const SvgEditor: DefineComponent<{
10
10
  customToolbar?: any[]
11
11
  vueComp?: Record<string, any>
12
12
  saveFile?: boolean
13
+ mqtt?: { cover: boolean; url: string; user: string; pwd: string; topics: string }
13
14
  onOnPreview?: (d: Record<string, any>) => void
14
15
  onOnSave?: (d: Record<string, any>) => void
15
- onOnReturn?: () => void
16
+ onOnReturn?: (d: Record<string, any>) => void
16
17
  }>
17
18
  export declare const SvgViewer: DefineComponent<{
18
19
  data?: Record<string, any>