Commit a78888e0 by Lin

feat: 文件格式化处理

1 parent 30b7bb9e
......@@ -8,8 +8,6 @@
</template>
<script lang="ts">
import type { GLEllipsisProps } from "../../types";
import { ElTooltip } from "element-plus";
export default {
......@@ -20,14 +18,16 @@ export default {
length: { type: Number, default: 20 },
tooltip: { type: Boolean, default: true },
placement: { type: String, default: "top" },
} as { [K in keyof GLEllipsisProps]: any },
},
computed: {
truncatedContent() {
if (!this.content) return "";
return this.content.length <= this.length ? this.content : `${this.content.slice(0, this.length) }...`;
truncatedContent(): string {
const content = this.$props.content;
const length = this.$props.length;
if (!content) return "";
return content.length <= length ? content : `${content.slice(0, length)}...`;
},
showTooltip() {
return this.tooltip && this.content && this.content.length > this.length;
showTooltip(): boolean {
return Boolean(this.tooltip) && typeof this.content === "string" && this.content.length > this.length;
},
},
};
......
......@@ -7,7 +7,7 @@ const rootDir = process.cwd();
const CONCURRENCY_LIMIT = 10;
// 需要跳过的目录,避免进入这些目录进行清理
const SKIP_DIRS = new Set([".DS_Store", ".git", ".idea", ".vscode"]);
const SKIP_DIRS = new Set([ ".DS_Store", ".git", ".idea", ".vscode" ]);
/**
* 处理单个文件/目录项
......@@ -104,9 +104,9 @@ async function cleanTargetsRecursively(currentDir, targets, depth = 0) {
(async function startCleanup() {
// 要删除的目录及文件名称
const targets = ["node_modules", "dist", ".turbo", "dist.zip"];
const targets = [ "node_modules", "dist", ".turbo", "dist.zip" ];
const deleteLockFile = process.argv.includes("--del-lock");
const cleanupTargets = [...targets];
const cleanupTargets = [ ...targets ];
if (deleteLockFile) {
cleanupTargets.push("pnpm-lock.yaml");
......
export default {
extends: ["@venus/stylelint-config"],
extends: [ "@venus/stylelint-config" ],
root: true,
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!