style: 适应lint规则

This commit is contained in:
pipipi-pikachu 2021-02-06 13:56:09 +08:00
parent c0a15d6e0d
commit 2f1dd4d776
7 changed files with 10 additions and 10 deletions

View File

@ -45,7 +45,7 @@ module.exports = {
}],
'default-case': 'error',
'consistent-this': ['error', '_this'],
'max-depth': ['error', 4],
'max-depth': ['error', 5],
'max-lines': ['error', 800],
'no-multi-str': 'error',
'space-infix-ops': 'error',

View File

@ -47,7 +47,7 @@ export default defineComponent({
const pointerTop = computed(() => (-(color.value.v * 100) + 1) + 100 + '%')
const pointerLeft = computed(() => color.value.s * 100 + '%')
const emitChangeEvent = throttle(function (param) {
const emitChangeEvent = throttle(function(param) {
emit('colorChange', param)
}, 20, { leading: true, trailing: false })

View File

@ -81,7 +81,7 @@ $subMenuWidth: 120px;
}
&:hover:not(.disable) {
background-color: #e1e1e1;
background-color: rgba($color: $themeColor, $alpha: .2);
}
&.divider {

View File

@ -5,15 +5,15 @@ import { ActionTypes, useStore } from '@/store'
export default () => {
const store = useStore()
const addHistorySnapshot = debounce(function () {
const addHistorySnapshot = debounce(function() {
store.dispatch(ActionTypes.ADD_SNAPSHOT)
}, 300, { trailing: true })
const redo = throttle(function () {
const redo = throttle(function() {
store.dispatch(ActionTypes.RE_DO)
}, 100, { leading: true, trailing: false })
const undo = throttle(function () {
const undo = throttle(function() {
store.dispatch(ActionTypes.UN_DO)
}, 100, { leading: true, trailing: false })

View File

@ -175,7 +175,7 @@ export default defineComponent({
) execNext()
}
const mousewheelListener = throttle(function (e: WheelEvent) {
const mousewheelListener = throttle(function(e: WheelEvent) {
if (e.deltaY < 0) execPrev()
else if (e.deltaY > 0) execNext()
}, 500, { leading: true, trailing: false })

View File

@ -524,7 +524,7 @@ export default defineComponent({
}
}
const handleInput = debounce(function () {
const handleInput = debounce(function() {
emit('change', tableCells.value)
}, 300, { trailing: true })

View File

@ -137,7 +137,7 @@ export default defineComponent({
const handleBlur = () => {
store.commit(MutationTypes.SET_DISABLE_HOTKEYS_STATE, false)
}
const handleInput = debounce(function () {
const handleInput = debounce(function() {
store.commit(MutationTypes.UPDATE_ELEMENT, {
id: props.elementInfo.id,
props: { content: editorView.dom.innerHTML },
@ -145,7 +145,7 @@ export default defineComponent({
addHistorySnapshot()
}, 300, { trailing: true })
const handleClick = debounce(function () {
const handleClick = debounce(function() {
const attr = getTextAttrs(editorView)
emitter.emit(EmitterEvents.UPDATE_TEXT_STATE, attr)
}, 30, { trailing: true })