vue2-client 1.9.26 → 1.9.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.9.26",
3
+ "version": "1.9.28",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
package/src/App.vue CHANGED
@@ -96,11 +96,15 @@ export default {
96
96
  },
97
97
  setMicroApp () {
98
98
  let baseApp = '/login'
99
+ let queryData = {}
99
100
  const that = this
100
101
  if (window.__MICRO_APP_ENVIRONMENT__) {
101
102
  const data = window.microApp.getData() // 获取主应用下发的data数据
102
103
  if (data.baseroute) {
103
104
  baseApp = data.baseroute
105
+ } // 获取主应用下发的data数据
106
+ if (data.queryData) {
107
+ queryData = data.queryData
104
108
  }
105
109
  this.setMicroAppTheme(data.themeStore)
106
110
  window.microApp.addDataListener((_data) => {
@@ -110,7 +114,7 @@ export default {
110
114
  that.setMicroAppTheme(_data.themeStore)
111
115
  })
112
116
  console.log('microApp', window.microApp)
113
- this.$router.replace({ path: baseApp })
117
+ this.$router.replace({ path: baseApp, query: queryData })
114
118
  }
115
119
  },
116
120
  setMicroAppTheme (themeStore) {
@@ -132,14 +132,14 @@ export default {
132
132
  this.showModeChoose = showModeChoose
133
133
  this.modeType = modeType
134
134
  this.ready = true
135
- this.loadFile(fileUrl)
135
+ this.loadFile(fileUrl, bindObject)
136
136
  },
137
137
  // 加载文档
138
- loadFile (fileUrl) {
138
+ loadFile (fileUrl, bindObject) {
139
139
  this.loading = true
140
140
  this.editorRef.loadUrl(fileUrl).then(() => {
141
- if (this.bindObject) {
142
- this.editorRef.setBindObject(this.bindObject)
141
+ if (bindObject) {
142
+ this.editorRef.setBindObject(bindObject)
143
143
  }
144
144
  this.changeMode()
145
145
  this.fileUrl = fileUrl
@@ -164,7 +164,7 @@ export default {
164
164
  }
165
165
  // 保存HTML文档和结构化数据到后端服务
166
166
  runLogic(this.saveDataLogicName, data, this.serviceName).then(res => {
167
- this.loadFile(res.url)
167
+ this.loadFile(res.url, res.bindObject)
168
168
  this.$message.success('保存成功')
169
169
  })
170
170
  } else {
@@ -181,7 +181,7 @@ export default {
181
181
  },
182
182
  // 刷新文档
183
183
  refresh () {
184
- this.loadFile(this.fileUrl)
184
+ this.loadFile(this.fileUrl, this.bindObject)
185
185
  },
186
186
  // 导出下拉菜单
187
187
  handleExportMenuClick (e) {