eslint improve

This commit is contained in:
Daniel
2021-09-26 16:34:01 +05:30
parent 844e4a6981
commit 466f34c97c
11 changed files with 188 additions and 334 deletions

View File

@@ -9,7 +9,7 @@ export {
PushMenu,
Treeview,
DirectChat,
CardWidget,
CardWidget
}
//

View File

@@ -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() {

View File

@@ -6,7 +6,7 @@
*/
import {
domReady,
domReady
} from './util/index'
/**

View File

@@ -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
}
})
}
})

View File

@@ -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
}
/**

View File

@@ -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 {

View File

@@ -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
}