Retrieve external data in data

This commit is contained in:
Pig Fang 2018-08-17 14:49:11 +08:00
parent 3bf29b529d
commit 9000bd6916
4 changed files with 12 additions and 18 deletions

View File

@ -128,14 +128,14 @@ export default {
isPrivate: false,
files: [],
texture: '',
uploading: false
uploading: false,
textureNameRule: __bs_data__.rule,
privacyNotice: __bs_data__.privacyNotice,
scorePublic: __bs_data__.scorePublic,
scorePrivate: __bs_data__.scorePrivate,
};
},
computed: {
textureNameRule: () => __bs_data__.rule,
privacyNotice: () => __bs_data__.privacyNotice,
scorePublic: () => __bs_data__.scorePublic,
scorePrivate: () => __bs_data__.scorePrivate,
scoreCost() {
const size = Math.round(this.files[0].size / 1024) || 1;
return size * (this.isPrivate ? this.scorePrivate : this.scorePublic);

View File

@ -220,11 +220,9 @@ export default {
capeUrl: '',
players: [],
selectedPlayer: 0,
linkToSkin: `${blessing.base_url}/skinlib?filter=skin`,
linkToCape: `${blessing.base_url}/skinlib?filter=cape`,
}),
computed: {
linkToSkin: () => `${blessing.base_url}/skinlib?filter=skin`,
linkToCape: () => `${blessing.base_url}/skinlib?filter=cape`,
},
created() {
this.search = debounce(this.loadCloset, 350);
},

View File

@ -281,13 +281,11 @@ export default {
steve: false,
alex: false,
cape: false
}
},
playerNameRule: __bs_data__.rule,
playerNameLength: __bs_data__.length
};
},
computed: {
playerNameRule: () => __bs_data__.rule,
playerNameLength: () => __bs_data__.length
},
beforeMount() {
this.fetchPlayers();
},

View File

@ -210,11 +210,9 @@ export default {
email: '',
currentPassword: '',
deleteConfirm: '',
siteName: blessing.site_name,
isAdmin: __bs_data__.admin
}),
computed: {
siteName: () => blessing.site_name,
isAdmin: () => __bs_data__.admin
},
methods: {
nl2br: str => str.replace(/\n/g, '<br>'),
async changePassword() {