eslint improve
This commit is contained in:
@@ -9,7 +9,7 @@ export {
|
||||
PushMenu,
|
||||
Treeview,
|
||||
DirectChat,
|
||||
CardWidget,
|
||||
CardWidget
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import {
|
||||
domReady,
|
||||
slideUp,
|
||||
slideDown,
|
||||
slideDown
|
||||
} from './util/index'
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ const Default = {
|
||||
collapseIcon: 'fa-minus',
|
||||
expandIcon: 'fa-plus',
|
||||
maximizeIcon: 'fa-expand',
|
||||
minimizeIcon: 'fa-compress',
|
||||
minimizeIcon: 'fa-compress'
|
||||
}
|
||||
|
||||
interface Config {
|
||||
@@ -65,7 +65,7 @@ class CardWidget {
|
||||
this._parent = element
|
||||
}
|
||||
|
||||
this._config = Object.assign({}, Default, config)
|
||||
this._config = {...Default, ...config}
|
||||
}
|
||||
|
||||
collapse() {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
domReady,
|
||||
domReady
|
||||
} from './util/index'
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
domReady,
|
||||
domReady
|
||||
} from './util/index'
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,7 @@ const SELECTOR_SIDEBAR = '.sidebar'
|
||||
|
||||
const Default = {
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'leave',
|
||||
scrollbarAutoHide: 'leave'
|
||||
}
|
||||
|
||||
interface Config {
|
||||
@@ -40,7 +40,7 @@ class Layout {
|
||||
|
||||
constructor(element: HTMLElement, config: Config) {
|
||||
this._element = element
|
||||
this._config = Object.assign({}, Default, config)
|
||||
this._config = {...Default, ...config}
|
||||
}
|
||||
|
||||
holdTransition(): void {
|
||||
@@ -69,8 +69,8 @@ domReady(() => {
|
||||
sizeAutoCapable: true,
|
||||
scrollbars: {
|
||||
autoHide: Default.scrollbarAutoHide,
|
||||
clickScrolling: true,
|
||||
},
|
||||
clickScrolling: true
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
domReady,
|
||||
domReady
|
||||
} from './util/index'
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ const SELECTOR_SIDEBAR_SM = `.${CLASS_NAME_LAYOUT_MOBILE}`
|
||||
const SELECTOR_CONTENT_WRAPPER = '.content-wrapper'
|
||||
|
||||
const Defaults = {
|
||||
onLayouMobile: 992,
|
||||
onLayouMobile: 992
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import {
|
||||
domReady,
|
||||
slideDown,
|
||||
slideUp,
|
||||
slideUp
|
||||
} from './util/index'
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ const SELECTOR_TREEVIEW_MENU = '.nav-treeview'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-lte-toggle="treeview"]'
|
||||
|
||||
const Default = {
|
||||
animationSpeed: 300,
|
||||
animationSpeed: 300
|
||||
}
|
||||
|
||||
interface Config {
|
||||
|
||||
@@ -47,6 +47,7 @@ const slideUp = (target: HTMLElement, duration = 500) => {
|
||||
const slideDown = (target: HTMLElement, duration = 500) => {
|
||||
target.style.removeProperty('display')
|
||||
let {display} = window.getComputedStyle(target)
|
||||
|
||||
if (display === 'none') {
|
||||
display = 'block'
|
||||
}
|
||||
@@ -94,5 +95,5 @@ export {
|
||||
windowReady,
|
||||
slideUp,
|
||||
slideDown,
|
||||
slideToggle,
|
||||
slideToggle
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user