Skip to content

Commit 745ea1e

Browse files
committed
fix: streamline appList handling by directly assigning to component property and simplifying list construction
1 parent 4f495fd commit 745ea1e

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

packages/ldp/src/Target.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,26 +246,25 @@ export default {
246246
methods: {
247247
async init() {
248248
let connectionList = await this.getData()
249-
let appList = []
249+
this.appList = []
250250
251251
connectionList = connectionList.filter(
252252
(item) => !this.fdmAndMdmId.includes(item.id),
253253
)
254254
255255
if (this.isDaas) {
256-
appList = await this.getApiAppList()
257-
Promise.all(appList.map(({ id }) => this.loadApiModule(id))).then(
256+
this.appList = await this.getApiAppList()
257+
Promise.all(this.appList.map(({ id }) => this.loadApiModule(id))).then(
258258
(list) => {
259-
appList.forEach((app, i) => {
259+
this.appList.forEach((app, i) => {
260260
app.modules = list[i]
261261
})
262262
},
263263
)
264264
}
265265
266266
this.connectionIds = connectionList.map((item) => item.id)
267-
this.appList = appList
268-
this.list = appList
267+
this.list = this.appList
269268
.concat(connectionList)
270269
.sort(
271270
(obj1, obj2) => new Date(obj2.createTime) - new Date(obj1.createTime),

0 commit comments

Comments
 (0)