chore: prettier & lint

Former-commit-id: 486f65e137348f400d7b95067bd3cd5a2f23ff44
This commit is contained in:
Jachin
2023-08-04 17:50:25 +08:00
parent a240ff04d2
commit f797606c44
72 changed files with 1234 additions and 484 deletions

View File

@@ -11,7 +11,7 @@
:key="option.value"
:label="option.label"
:value="option.value"
></el-option>
/>
</el-select>
</div>
</template>

View File

@@ -89,8 +89,8 @@ onMounted(() => {
class="cursor-pointer text-[#999] absolute right-[10px] top-0 height-[32px] leading-[32px]"
@click="visible = !visible"
>
<i-ep-caret-top v-show="visible"></i-ep-caret-top>
<i-ep-caret-bottom v-show="!visible"></i-ep-caret-bottom>
<i-ep-caret-top v-show="visible" />
<i-ep-caret-bottom v-show="!visible" />
</div>
</template>

View File

@@ -54,7 +54,7 @@ onBeforeUnmount(() => {
<template>
<div ref="rightPanel" :class="{ show: show }">
<div class="right-panel-overlay" />
<div class="right-panel-overlay"></div>
<div class="right-panel-container">
<div
class="right-panel-btn"
@@ -67,7 +67,7 @@ onBeforeUnmount(() => {
<i-ep-setting v-show="!show" />
</div>
<div>
<slot />
<slot></slot>
</div>
</div>
</div>

View File

@@ -1,17 +1,17 @@
<script setup lang="ts">
import { useAppStore } from '@/store/modules/app';
import { useAppStore } from "@/store/modules/app";
const appStore = useAppStore();
const sizeOptions = ref([
{ label: '默认', value: 'default' },
{ label: '大型', value: 'large' },
{ label: '小型', value: 'small' }
{ label: "默认", value: "default" },
{ label: "大型", value: "large" },
{ label: "小型", value: "small" },
]);
function handleSizeChange(size: string) {
appStore.changeSize(size);
ElMessage.success('切换布局大小成功');
ElMessage.success("切换布局大小成功");
}
</script>

View File

@@ -1,34 +1,34 @@
/**
* getRePosFromStr 正则匹配字段返回位置信息
* */
export function getRePosFromStr(text: any = '', re: any = /\$.+?\$/g) {
const lines = text.split('\n')
const positions: any = []
let m
for (let i = 0; i < lines.length; i++) {
const l = lines[i]
while ((m = re.exec(l)) !== null) {
var tag = m[0].substring(1, m[0].length - 1)
positions.push({
line: i,
start: m.index,
stop: m.index + m[0].length,
tag,
})
}
export function getRePosFromStr(text: any = "", re: any = /\$.+?\$/g) {
const lines = text.split("\n");
const positions: any = [];
let m;
for (let i = 0; i < lines.length; i++) {
const l = lines[i];
while ((m = re.exec(l)) !== null) {
const tag = m[0].substring(1, m[0].length - 1);
positions.push({
line: i,
start: m.index,
stop: m.index + m[0].length,
tag,
});
}
return positions
}
return positions;
}
/**
* 输入框模式
*/
export enum MODE {
// 文本
TEXT = 1,
// 公式
FORMULA,
// 只允许选择tag
ONLYTAG,
// 日期
DATE
}
// 文本
TEXT = 1,
// 公式
FORMULA,
// 只允许选择tag
ONLYTAG,
// 日期
DATE,
}

View File

@@ -71,4 +71,4 @@ onBeforeUnmount(() => {
});
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>
<style src="@wangeditor/editor/dist/css/style.css"></style>