feat: 调整文章编辑器

This commit is contained in:
王念超
2025-03-21 18:48:46 +08:00
parent 4dc0591b5b
commit c760264048
5 changed files with 4897 additions and 4007 deletions

View File

@@ -10,6 +10,7 @@ import {nanoid} from "nanoid";
import dayjs from 'dayjs'
import axios from "axios";
import {env} from "@/config/ENV.ts";
import {nextTick} from "vue";
export function getRandom(a: number, b: number): number {
return Math.random() * (b - a) + a;
@@ -251,4 +252,12 @@ export function _getAccomplishDate(total: number, dayNumber: number) {
//获取学习进度
export function _getStudyProgress(index: number, total: number) {
return Number(((index / total) * 100).toFixed())
}
export function _nextTick(cb: Function, time?: number) {
if (time) {
nextTick(() => setTimeout(cb, time))
} else {
nextTick(cb)
}
}