mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 19:22:57 +00:00
refactor: Freeze property to improve performance
This commit is contained in:
parent
897ac75281
commit
12d6415f7f
@ -10,7 +10,7 @@ export default {
|
|||||||
name: 'languages',
|
name: 'languages',
|
||||||
props: [ 'locale' ],
|
props: [ 'locale' ],
|
||||||
data() {
|
data() {
|
||||||
return {
|
let dataObj = {
|
||||||
locales: {
|
locales: {
|
||||||
ar: 'ar',
|
ar: 'ar',
|
||||||
de: 'de',
|
de: 'de',
|
||||||
@ -32,6 +32,10 @@ export default {
|
|||||||
'zh-tw': 'zhTW'
|
'zh-tw': 'zhTW'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Object.defineProperty(dataObj, "locales", { configurable: false, writable: false });
|
||||||
|
|
||||||
|
return dataObj;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
change (event) {
|
change (event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user