How to use the vue-property-decorator.Vue.set function in vue-property-decorator

To help you get started, we’ve selected a few vue-property-decorator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leek-wars / leek-wars-client / src / component / forum / forum-topic.vue View on Github external
LeekWars.get('forum/get-messages/' + topic + '/' + this.page).then(data => {
				this.topic = data.topic
				if (!this.topic) { return }
				this.category = data.category
				if (this.topic) {
					Vue.set(this.topic, 'messages', data.messages)
					if (this.topic.messages) {
						for (const message of this.topic.messages) {
							Vue.set(message, 'editing', false)
							Vue.set(message, 'height', 100)
						}
					}
				}
				this.pages = data.pages
				LeekWars.setTitle(this.topic.name, this.$t('forum_topic.n_messages', [data.total]))
				LeekWars.setActions([this.action])
				if (this.topic.subscribed) { this.action.icon = 'notifications_active' }
				this.$root.$emit('loaded')
				this.newMessage = localStorage.getItem('forum/draft') as string
			})
		}
github LulumiProject / lulumi-browser / src / renderer / mainBrowserWindow / components / BrowserMainView.vue View on Github external
} else if (alarmInfo.delayInMinutes) {
      timeout = alarmInfo.delayInMinutes * 60 * 1000;
    } else if (alarmInfo.periodInMinutes) {
      timeout = alarmInfo.periodInMinutes * 60 * 1000;
    }
    if (timeout !== 0) {
      alarm.handler
        = setTimeout(() => this.onAlarmEvent.emit(this.getAlarm(name)), timeout);
      if (alarmInfo.periodInMinutes) {
        timeout = alarmInfo.periodInMinutes * 60 * 1000;
        alarm.handler
          = setInterval(() => this.onAlarmEvent.emit(this.getAlarm(name)), timeout);
        alarm.periodInMinutes = alarmInfo.periodInMinutes;
      }

      Vue.set(this.alarms, name, alarm);
    }
  }
  addContextMenus(menuItems, webContentsId: number): void {
github yunweb / huobi-PC / src / renderer / components / BrowserMainView / Navbar.vue View on Github external
setBrowserActionBadgeBackgroundColor(extensionId: string, details): void {
      if (this.badgeBackgroundColorArray[extensionId] === undefined) {
        Vue.set(this.badgeBackgroundColorArray, extensionId, []);
      }
      const badge = this.badgeBackgroundColorArray[extensionId];
      if (badge) {
        if (details.tabId) {
          Vue.set(badge,
                  `${require('lulumi').tabs.get(details.tabId).index}`,
                  details.color);
        } else {
          Vue.set(badge, '-1', details.color);
        }
      }
    }
    showBrowserActionBadgeBackgroundColor(extensionId: string): string | number {
github leek-wars / leek-wars-client / src / component / help / line-of-sight.vue View on Github external
clickCell(x: number, y: number) {
			if (this.map[y][x] === 1) {
				for (let h = 0; h < this.height; ++h) {
					for (let w = 0; w < this.width; ++w) {
						if (this.map[h][w] !== 1) {
							Vue.set(this.map[h], w, 0)
						}
					}
				}
			} else {
				for (let h = 0; h < this.height; ++h) {
					for (let w = 0; w < this.width; ++w) {
						if (this.map[h][w] !== 1) {
							Vue.set(this.map[h], w, this.los(x, y, w, h) ? 2 : 0)
						}
					}
				}
				Vue.set(this.map[y], x, 3)
			}
		}
		los(x1: number, y1: number, x2: number, y2: number) {
github yunweb / huobi-PC / src / renderer / components / BrowserMainView / Navbar.vue View on Github external
setBrowserActionBadgeText(extensionId: string, details): void {
      if (this.badgeTextArray[extensionId] === undefined) {
        Vue.set(this.badgeTextArray, extensionId, []);
      }
      const badge = this.badgeTextArray[extensionId];
      if (badge) {
        if (details.tabId) {
          Vue.set(badge,
                  `${require('lulumi').tabs.get(details.tabId).index}`,
                  details.text);
        } else {
          Vue.set(badge, '-1', details.text);
        }
      }
    }
    showBrowserActionBadgeText(extensionId: string): string | number {
github leek-wars / leek-wars-client / src / component / editor / editor-page.vue View on Github external
folder.expanded = localStorage.getItem('editor/folder/' + id) === 'true'
					}
					folder.items = data.folders
						.filter((f: any) => f.folder === id)
						.map((f: any) => buildFolder(f.id, folder))
					folder.items.push(...(data.ais
						.filter((ai: any) => ai.folder === id)
						.map((ai: any) => new AIItem(ai, folder))
					))
					this.folderById[folder.id] = folder
					return folder
				}
				this.rootFolder = buildFolder(0, this.rootFolder as Folder)
				for (const ai of data.ais) {
					ai.path = this.getAIFullPath(ai)
					Vue.set(ai, 'modified', false)
					Vue.set(this.ais, '' + ai.id, ai)
					this.items[ai.name] = ai
				}
				this.update()
				LeekWars.setTitle(this.$t('editor.title'), this.$t('editor.n_ais', [LeekWars.objectSize(data.ais)]))
			})
		}
github dawg / vusic / src / dawg / extensions / core / menu / ContextMenu.vue View on Github external
function mouseover(i: number) {
      Vue.set(active.value, i, true);
    }
github leek-wars / leek-wars-client / src / component / editor / editor-page.vue View on Github external
}
					folder.items = data.folders
						.filter((f: any) => f.folder === id)
						.map((f: any) => buildFolder(f.id, folder))
					folder.items.push(...(data.ais
						.filter((ai: any) => ai.folder === id)
						.map((ai: any) => new AIItem(ai, folder))
					))
					this.folderById[folder.id] = folder
					return folder
				}
				this.rootFolder = buildFolder(0, this.rootFolder as Folder)
				for (const ai of data.ais) {
					ai.path = this.getAIFullPath(ai)
					Vue.set(ai, 'modified', false)
					Vue.set(this.ais, '' + ai.id, ai)
					this.items[ai.name] = ai
				}
				this.update()
				LeekWars.setTitle(this.$t('editor.title'), this.$t('editor.n_ais', [LeekWars.objectSize(data.ais)]))
			})
		}
github Wikidata / SQID / src / components / Entity.vue View on Github external
this.getClassUsageCounts(record.nonemptySubClasses).then((usage) => {
            for (const subclassId of record.nonemptySubClasses) {
              const instances = usage.get(subclassId)!
              const subclasses = this.getHierarchyRecord(subclassId).allSubclasses

              if (instances) {
                Vue.set(this.subclassesInstances, subclassId, instances)
              }

              if (subclasses) {
                Vue.set(this.subclassesSubclasses, subclassId, subclasses)
              }
            }
          })
        }
github pa001024 / riven-mirror / src / components / VisualSkill.vue View on Github external
set hasDamageReduce(value) {
    if (!this.abilityData.props)
      this.abilityData.props = {};
    if (!value)
      Vue.delete(this.abilityData.props, "DamageReduce");
    else if (!this.abilityData.props.DamageReduce)
      Vue.set(this.abilityData.props, "DamageReduce", {})
  }