Trying to improve some of my slow vue code by pre-computing some things.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3718 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-12-29 16:01:34 +00:00
parent 0bf216bb1a
commit 62e9dfea90
5 changed files with 40 additions and 39 deletions

View File

@@ -1,3 +1,4 @@
"use strict";
Vue.component('tf-user', {
data: function() { return {
show_user_dialog: false,
@@ -49,7 +50,7 @@ Vue.component('tf-user', {
},
},
template: `<span @click="show_user()">
{{users[id] && users[id].name ? users[id].name : id}}
{{users[id] && users[id].name ? users[id].name : id}}
<md-tooltip v-if="users[id] && users[id].name">{{id}}</md-tooltip>
<md-dialog :md-active.sync="show_user_dialog">
<md-dialog-title>{{users[id] && users[id].name ? users[id].name : id}}</md-dialog-title>