liuxiaolong
2019-05-06 acc45d2ece02563964d7b8a22ff0c40bd8358889
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export default {
  get _themeSettings () {
    return window.themeSettings
  },
 
  _exec (fn) {
    return this._themeSettings && fn()
  },
 
  get options () {
    return (this._themeSettings && this._themeSettings.settings) || {}
  },
 
  getOption (name) {
    return this.options[name] || null
  },
 
  setRtl (rtl) {
    this._exec(() => this._themeSettings.setRtl(rtl))
  },
 
  setMaterial (rtl) {
    this._exec(() => this._themeSettings.setMaterial(rtl))
  },
 
  setTheme (themeName, updateStorage = true, cb = null) {
    this._exec(() => this._themeSettings.setTheme(themeName, updateStorage, cb))
  },
 
  setLayoutPosition (pos, updateStorage = true) {
    this._exec(() => this._themeSettings.setLayoutPosition(pos, updateStorage))
  },
 
  setLayoutNavbarFixed (fixed, updateStorage = true) {
    this._exec(() => this._themeSettings.setLayoutNavbarFixed(fixed, updateStorage))
  },
 
  setLayoutFooterFixed (fixed, updateStorage = true) {
    this._exec(() => this._themeSettings.setLayoutFooterFixed(fixed, updateStorage))
  },
 
  setLayoutReversed (reversed, updateStorage = true) {
    this._exec(() => this._themeSettings.setLayoutReversed(reversed, updateStorage))
  },
 
  setNavbarBg (bg, updateStorage = true) {
    this._exec(() => this._themeSettings.setNavbarBg(bg, updateStorage))
  },
 
  setSidenavBg (bg, updateStorage = true) {
    this._exec(() => this._themeSettings.setSidenavBg(bg, updateStorage))
  },
 
  setFooterBg (bg, updateStorage = true) {
    this._exec(() => this._themeSettings.setFooterBg(bg, updateStorage))
  },
 
  update () {
    this._exec(() => this._themeSettings.update())
  },
 
  updateNavbarBg () {
    this._exec(() => this._themeSettings.updateNavbarBg())
  },
 
  updateSidenavBg () {
    this._exec(() => this._themeSettings.updateSidenavBg())
  },
 
  updateFooterBg () {
    this._exec(() => this._themeSettings.updateFooterBg())
  },
 
  clearLocalStorage () {
    this._exec(() => this._themeSettings.clearLocalStorage())
  },
 
  destroy () {
    this._exec(() => this._themeSettings.destroy())
  }
}