mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
style: 适应lint规则
This commit is contained in:
parent
c0a15d6e0d
commit
2f1dd4d776
@ -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',
|
||||
|
@ -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 })
|
||||
|
||||
|
@ -81,7 +81,7 @@ $subMenuWidth: 120px;
|
||||
}
|
||||
|
||||
&:hover:not(.disable) {
|
||||
background-color: #e1e1e1;
|
||||
background-color: rgba($color: $themeColor, $alpha: .2);
|
||||
}
|
||||
|
||||
&.divider {
|
||||
|
@ -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 })
|
||||
|
||||
|
@ -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 })
|
||||
|
@ -524,7 +524,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const handleInput = debounce(function () {
|
||||
const handleInput = debounce(function() {
|
||||
emit('change', tableCells.value)
|
||||
}, 300, { trailing: true })
|
||||
|
||||
|
@ -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 })
|
||||
|
Loading…
x
Reference in New Issue
Block a user