feat:add eslint and fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { IElement } from ".."
|
||||
import { HORIZON_TAB, WRAP, ZERO } from "../dataset/constant/Common"
|
||||
import { TEXTLIKE_ELEMENT_TYPE } from "../dataset/constant/Element"
|
||||
import { ElementType } from "../dataset/enum/Element"
|
||||
import { IElement } from '..'
|
||||
import { HORIZON_TAB, WRAP, ZERO } from '../dataset/constant/Common'
|
||||
import { TEXTLIKE_ELEMENT_TYPE } from '../dataset/constant/Element'
|
||||
import { ElementType } from '../dataset/enum/Element'
|
||||
|
||||
export function writeText(text: string) {
|
||||
if (!text) return
|
||||
@@ -9,7 +9,7 @@ export function writeText(text: string) {
|
||||
}
|
||||
|
||||
export function writeTextByElementList(elementList: IElement[]) {
|
||||
let text: string = ``
|
||||
let text = ``
|
||||
function pickTextFromElement(payload: IElement[]) {
|
||||
for (let e = 0; e < payload.length; e++) {
|
||||
const element = payload[e]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deepClone, getUUID } from "."
|
||||
import { ElementType, IElement } from ".."
|
||||
import { ZERO } from "../dataset/constant/Common"
|
||||
import { EDITOR_ELEMENT_ZIP_ATTR } from "../dataset/constant/Element"
|
||||
import { deepClone, getUUID } from '.'
|
||||
import { ElementType, IElement } from '..'
|
||||
import { ZERO } from '../dataset/constant/Common'
|
||||
import { EDITOR_ELEMENT_ZIP_ATTR } from '../dataset/constant/Element'
|
||||
|
||||
export function formatElementList(elementList: IElement[], isHandleFirstElement = true) {
|
||||
if (isHandleFirstElement && elementList[0]?.value !== ZERO) {
|
||||
|
||||
@@ -50,5 +50,5 @@ export function getUUID(): string {
|
||||
function S4(): string {
|
||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
|
||||
}
|
||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4())
|
||||
return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4())
|
||||
}
|
||||
Reference in New Issue
Block a user