Left file: appwork-v1_1_0/vue-starter/src/globals.js  
Right file: appwork-v1_2_0/vue-starter/src/globals.js  
1 import layoutHelpers from '@/layout/helpers.js' = 1 import layoutHelpers from '@/layout/helpers.js'
2     2  
3 export default function () {   3 export default function () {
4   return {   4   return {
    -+ 5     // Base url
      6     baseUrl: process.env.BASE_URL,
      7  
5     // Layout helpers = 8     // Layout helpers
6     layoutHelpers,   9     layoutHelpers,
7     10  
8     // Check for RTL layout   11     // Check for RTL layout
9     get isRTL () {   12     get isRTL () {
10       return document.documentElement.getAttribute('dir') === 'rtl' ||   13       return document.documentElement.getAttribute('dir') === 'rtl' ||
11              document.body.getAttribute('dir') === 'rtl'   14              document.body.getAttribute('dir') === 'rtl'
12     },   15     },
13     16  
14     // Check if IE   17     // Check if IE
15     get isIE () { <> 18     get isIEMode () {
16       return typeof document['documentMode'] === 'number' = 19       return typeof document['documentMode'] === 'number'
17     },   20     },
18     21  
19     // Check if IE10   22     // Check if IE10
20     get isIE10 () { <> 23     get isIE10Mode () {
21       return this.isIE && document['documentMode'] === 10   24       return this.isIEMode && document['documentMode'] === 10
22     }, = 25     },
23     26  
24     // Layout navbar color   27     // Layout navbar color
25     get layoutNavbarBg () {   28     get layoutNavbarBg () {
26       return 'navbar-theme'   29       return 'navbar-theme'
27     },   30     },
28     31  
29     // Layout sidenav color   32     // Layout sidenav color
30     get layoutSidenavBg () {   33     get layoutSidenavBg () {
31       return 'sidenav-theme'   34       return 'sidenav-theme'
32     },   35     },
33     36  
34     // Layout footer color   37     // Layout footer color
35     get layoutFooterBg () {   38     get layoutFooterBg () {
36       return 'footer-theme'   39       return 'footer-theme'
37     },   40     },
38     41  
39     // Animate scrollTop   42     // Animate scrollTop
40     scrollTop (to, duration, element = document.scrollingElement || document.documentElement) {   43     scrollTop (to, duration, element = document.scrollingElement || document.documentElement) {
41       if (element.scrollTop === to) return   44       if (element.scrollTop === to) return
42       const start = element.scrollTop   45       const start = element.scrollTop
43       const change = to - start   46       const change = to - start
44       const startDate = +new Date()   47       const startDate = +new Date()
45     48  
46       // t = current time; b = start value; c = change in value; d = duration   49       // t = current time; b = start value; c = change in value; d = duration
47       const easeInOutQuad = (t, b, c, d) => {   50       const easeInOutQuad = (t, b, c, d) => {
48         t /= d / 2   51         t /= d / 2
49         if (t < 1) return c / 2 * t * t + b   52         if (t < 1) return c / 2 * t * t + b
50         t--   53         t--
51         return -c / 2 * (t * (t - 2) - 1) + b   54         return -c / 2 * (t * (t - 2) - 1) + b
52       }   55       }
53     56  
54       const animateScroll = () => {   57       const animateScroll = () => {
55         const currentDate = +new Date()   58         const currentDate = +new Date()
56         const currentTime = currentDate - startDate   59         const currentTime = currentDate - startDate
57         element.scrollTop = parseInt(easeInOutQuad(currentTime, start, change, duration))   60         element.scrollTop = parseInt(easeInOutQuad(currentTime, start, change, duration))
58         if (currentTime < duration) {   61         if (currentTime < duration) {
59           requestAnimationFrame(animateScroll)   62           requestAnimationFrame(animateScroll)
60         } else {   63         } else {
61           element.scrollTop = to   64           element.scrollTop = to
62         }   65         }
63       }   66       }
64     67  
65       animateScroll()   68       animateScroll()
66     }   69     }
67   }   70   }
68 }   71 }