docs: 说明文档调整和已知警告问题修复
BIN
src/assets/images/preview/app-01.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
src/assets/images/preview/app-02.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
src/assets/images/preview/app-03.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
src/assets/images/preview/app-04.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
src/assets/images/preview/pc-01.png
Normal file
|
After Width: | Height: | Size: 487 KiB |
BIN
src/assets/images/preview/pc-02.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
src/assets/images/preview/pc-03.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
src/assets/images/preview/pc-04.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
src/assets/images/preview/pc-05.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
src/assets/images/preview/pc-06.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
src/assets/images/qr/wechat-mp.jpg
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
src/assets/images/qr/wechat-offical.png
Normal file
|
After Width: | Height: | Size: 4.1 MiB |
BIN
src/assets/images/qr/wechat-personal.png
Normal file
|
After Width: | Height: | Size: 306 KiB |
@@ -88,6 +88,8 @@
|
||||
:overwrite-mode="overwriteMode"
|
||||
:write-progress="writeProgress"
|
||||
:write-running="writeRunning"
|
||||
@update:write-scope="writeScope = $event"
|
||||
@update:overwrite-mode="overwriteMode = $event"
|
||||
@pick-frontend-dir="pickFrontendDir"
|
||||
@pick-backend-dir="pickBackendDir"
|
||||
@confirm-write="confirmWrite"
|
||||
|
||||
@@ -162,10 +162,10 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "update:previewScope", val: "all" | "frontend" | "backend"): void;
|
||||
(e: "update:previewTypes", val: string[]): void;
|
||||
(e: "file-click", data: any): void;
|
||||
(e: "copy"): void;
|
||||
(_e: "update:previewScope", _val: "all" | "frontend" | "backend"): void;
|
||||
(_e: "update:previewTypes", _val: string[]): void;
|
||||
(_e: "file-click", _data: any): void;
|
||||
(_e: "copy"): void;
|
||||
}>();
|
||||
|
||||
const cmRef = ref<CmComponentRef>();
|
||||
|
||||
@@ -93,7 +93,8 @@ export function useLocalWrite(genConfigFormData: Ref<GenConfigForm>) {
|
||||
) {
|
||||
const normalized = filePath.replace(/\\/g, "/");
|
||||
const parts = normalized.split("/").filter(Boolean);
|
||||
const fileName = parts.pop()!;
|
||||
const fileName = parts.pop();
|
||||
if (!fileName) return;
|
||||
const targetDir = await ensureDir(dirHandle, parts, true);
|
||||
const fileHandle = await targetDir.getFileHandle(fileName, { create: true });
|
||||
const writable = await fileHandle.createWritable();
|
||||
@@ -108,7 +109,8 @@ export function useLocalWrite(genConfigFormData: Ref<GenConfigForm>) {
|
||||
try {
|
||||
const normalized = filePath.replace(/\\/g, "/");
|
||||
const parts = normalized.split("/").filter(Boolean);
|
||||
const fileName = parts.pop()!;
|
||||
const fileName = parts.pop();
|
||||
if (!fileName) return false;
|
||||
const targetDir = await ensureDir(dirHandle, parts, false);
|
||||
await targetDir.getFileHandle(fileName, { create: false });
|
||||
return true;
|
||||
@@ -125,7 +127,8 @@ export function useLocalWrite(genConfigFormData: Ref<GenConfigForm>) {
|
||||
try {
|
||||
const normalized = filePath.replace(/\\/g, "/");
|
||||
const parts = normalized.split("/").filter(Boolean);
|
||||
const fileName = parts.pop()!;
|
||||
const fileName = parts.pop();
|
||||
if (!fileName) return false;
|
||||
const targetDir = await ensureDir(dirHandle, parts, false);
|
||||
const fileHandle = await targetDir.getFileHandle(fileName, { create: false });
|
||||
const file = await fileHandle.getFile();
|
||||
@@ -172,7 +175,8 @@ export function useLocalWrite(genConfigFormData: Ref<GenConfigForm>) {
|
||||
|
||||
async function worker() {
|
||||
while (queue.length) {
|
||||
const item = queue.shift()!;
|
||||
const item = queue.shift();
|
||||
if (!item) break;
|
||||
try {
|
||||
await (async () => {
|
||||
const root = resolveRootForItem(item);
|
||||
@@ -180,7 +184,9 @@ export function useLocalWrite(genConfigFormData: Ref<GenConfigForm>) {
|
||||
writeProgress.current = relativePath;
|
||||
|
||||
const targetRoot =
|
||||
root === "frontend" ? frontendDirHandle.value! : backendDirHandle.value!;
|
||||
root === "frontend" ? frontendDirHandle.value : backendDirHandle.value;
|
||||
|
||||
if (!targetRoot) return;
|
||||
|
||||
if (overwriteMode.value === "ifChanged") {
|
||||
const same = await isSameFile(targetRoot, relativePath, item.content || "");
|
||||
|
||||