-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathmaterial.js
57 lines (53 loc) · 1.51 KB
/
material.js
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
import './base/index.scss'
import MdReactive from 'core/utils/MdReactive'
import MdTheme from 'core/MdTheme'
const init = () => {
let material = new MdReactive({
ripple: true,
theming: {},
locale: {
startYear: 1900,
endYear: 2099,
dateFormat: 'yyyy-MM-dd',
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
shorterDays: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'],
shorterMonths: ['J', 'F', 'M', 'A', 'M', 'Ju', 'Ju', 'A', 'Se', 'O', 'N', 'D'],
firstDayOfAWeek: 0,
cancel: 'Cancel',
confirm: 'Ok'
},
router: {
linkActiveClass: 'router-link-active'
}
})
Object.defineProperties(material.theming, {
metaColors: {
get: () => MdTheme.metaColors,
set (metaColors) {
MdTheme.metaColors = metaColors
}
},
theme: {
get: () => MdTheme.theme,
set (theme) {
MdTheme.theme = theme
}
},
enabled: {
get: () => MdTheme.enabled,
set (enabled) {
MdTheme.enabled = enabled
}
}
})
return material
}
export default Vue => {
if (!Vue.material) {
Vue.material = init()
Vue.prototype.$material = Vue.material
}
}