diff --git a/app/components.d.ts b/app/components.d.ts index b4c9ad0..9564824 100644 --- a/app/components.d.ts +++ b/app/components.d.ts @@ -7,28 +7,22 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { - NAtePicker: typeof import('naive-ui')['NAtePicker'] NAvatar: typeof import('naive-ui')['NAvatar'] NBadge: typeof import('naive-ui')['NBadge'] NButton: typeof import('naive-ui')['NButton'] - NCard: typeof import('naive-ui')['NCard'] NCascader: typeof import('naive-ui')['NCascader'] NCheckbox: typeof import('naive-ui')['NCheckbox'] NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NDatePicker: typeof import('naive-ui')['NDatePicker'] NDropdown: typeof import('naive-ui')['NDropdown'] - NDynamicTags: typeof import('naive-ui')['NDynamicTags'] + NFor: typeof import('naive-ui')['NFor'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] - NFormItemGi: typeof import('naive-ui')['NFormItemGi'] - NFormTtem: typeof import('naive-ui')['NFormTtem'] - NGrid: typeof import('naive-ui')['NGrid'] NIcon: typeof import('naive-ui')['NIcon'] + NInfiniteScroll: typeof import('naive-ui')['NInfiniteScroll'] NInput: typeof import('naive-ui')['NInput'] - NInputgroup: typeof import('naive-ui')['NInputgroup'] NInputGroup: typeof import('naive-ui')['NInputGroup'] - NInputNumber: typeof import('naive-ui')['NInputNumber'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NModal: typeof import('naive-ui')['NModal'] NQrCode: typeof import('naive-ui')['NQrCode'] @@ -36,14 +30,10 @@ declare module 'vue' { NRadioButton: typeof import('naive-ui')['NRadioButton'] NRadioGroup: typeof import('naive-ui')['NRadioGroup'] NSelect: typeof import('naive-ui')['NSelect'] - NSlider: typeof import('naive-ui')['NSlider'] NSpace: typeof import('naive-ui')['NSpace'] - NSwitch: typeof import('naive-ui')['NSwitch'] NTabPane: typeof import('naive-ui')['NTabPane'] NTabs: typeof import('naive-ui')['NTabs'] - NTimePicker: typeof import('naive-ui')['NTimePicker'] NTooltip: typeof import('naive-ui')['NTooltip'] - NTransfer: typeof import('naive-ui')['NTransfer'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } diff --git a/app/components/Authentication.vue b/app/components/Authentication.vue index 4a70a27..ec7b778 100644 --- a/app/components/Authentication.vue +++ b/app/components/Authentication.vue @@ -1,77 +1,79 @@ + + + + diff --git a/app/components/BaseComment.vue b/app/components/BaseComment.vue new file mode 100644 index 0000000..6731b03 --- /dev/null +++ b/app/components/BaseComment.vue @@ -0,0 +1,569 @@ + + + + + diff --git a/app/components/EditUserInfo.vue b/app/components/EditUserInfo.vue index a1d3110..4e14f35 100644 --- a/app/components/EditUserInfo.vue +++ b/app/components/EditUserInfo.vue @@ -1,5 +1,4 @@ + + + + diff --git a/app/components/Payment.vue b/app/components/Payment.vue index 456b693..541cd7f 100644 --- a/app/components/Payment.vue +++ b/app/components/Payment.vue @@ -1,77 +1,175 @@ diff --git a/app/components/PersonalCenterCard.vue b/app/components/PersonalCenterCard.vue index 385784b..35f026c 100644 --- a/app/components/PersonalCenterCard.vue +++ b/app/components/PersonalCenterCard.vue @@ -39,6 +39,22 @@ function toDetails() { } } +// 获取图片详情进行编辑 +const publishPictureData = ref({}) +async function getPublishPicture() { + try { + const res = await request.get(`/image/detail?id=${props.item.id}`) + if (res.code === 200) { + publishPictureData.value = res.data + publishPictureData.value.imagePaths = res.data.imagePaths.split(',') + // publishPictureData.value.tags = res.data.tags.split(',') + } + } + catch (e) { + console.log(e) + } +} + // 处理下拉菜单选项 编辑/删除/置顶 function handleSelect(event: Event, key: string) { event.stopPropagation() // 阻止事件冒泡 @@ -48,6 +64,21 @@ function handleSelect(event: Event, key: string) { else if (key === 'delete') { handleDelete() } + else if (key === 'edit') { + if (props.currentType === '2') { + getPublishPicture() + showPublishImg() + } + else if (props.currentType === '1') { + router.push({ + path: `/publish-workflow`, + query: { + type: 'edit', + id: props.item.id, + }, + }) + } + } } // 置顶 @@ -112,6 +143,23 @@ function getFirstImagePath(imagePaths: string): string { return '' return imagePaths.split(',')[0] || '' } +// 关闭图片 +const isShowPublishPicture = ref(false) +const PublishPictureRef = ref(null) + +function showPublishImg() { + isShowPublishPicture.value = true + if (PublishPictureRef.value) { + PublishPictureRef.value.isVisible = true + } +} + +function closePublishImg() { + isShowPublishPicture.value = false + if (PublishPictureRef.value) { + PublishPictureRef.value.isVisible = false + } +} diff --git a/app/components/Publish-picture.vue b/app/components/Publish-picture.vue new file mode 100644 index 0000000..6921eeb --- /dev/null +++ b/app/components/Publish-picture.vue @@ -0,0 +1,183 @@ + + + + + diff --git a/app/components/TimeLine.vue b/app/components/TimeLine.vue new file mode 100644 index 0000000..d02df7b --- /dev/null +++ b/app/components/TimeLine.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/app/components/WangEditor.vue b/app/components/WangEditor.vue index 3d737cd..a480a53 100644 --- a/app/components/WangEditor.vue +++ b/app/components/WangEditor.vue @@ -1,49 +1,117 @@ + + diff --git a/app/components/WechatLoginQr.vue b/app/components/WechatLoginQr.vue index 26d6827..ca19798 100644 --- a/app/components/WechatLoginQr.vue +++ b/app/components/WechatLoginQr.vue @@ -56,18 +56,6 @@ async function onGetUUid() { }) userStore.setUserInfo(res1.user) window.location.href = '/' - // const parent = getCurrentInstance().parent - // parent.exposed.onCloseLogin() - // store.userInfo = res.data - // router.push('./home') - - // store.dispatch("uuidLogin", res) - // that.$store.dispatch("uuidLogin", res) - // setTimeout(() => { - // that.$router.push({ - // path: that.redirect || "/" - // }).catch(() => {}); - // }, 1500) } }).catch(() => { clearTimeout(pollingTimer) diff --git a/app/components/publishModel/EditVersion.vue b/app/components/publishModel/EditVersion.vue index 6d44460..faf1ffc 100644 --- a/app/components/publishModel/EditVersion.vue +++ b/app/components/publishModel/EditVersion.vue @@ -14,24 +14,25 @@ const props = defineProps({ }) const emit = defineEmits(['update:modelValue', 'createModelsNext']) const acceptTypes = '.safetensors,.ckpt,.pt,.bin,.pth,.zip,.json,.flow,.lightflow,.yaml,.yml,.onnx,.gguf,.sft' -const isDataReady = ref(false) const modelVersionItem = { - versionName: '1.0', // 版本名称 - modelId: 1, // 基础模型 + versionName: '', // 版本名称 + modelId: null, // 基础模型 versionDescription: '"

这是一个描述

这是两张图片之间的一些文字说明

"', // 版本描述 - filePath: 'https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/JANUARY/2/19/4/877e449c-3c0d-4630-a304-91ec110499f2.png', // 文件路径 - fileName: 'ddefd反问句说的', // 文档里没有 ,表里没有 + filePath: '', // 文件路径 + fileName: '', // 文档里没有 ,表里没有 sampleImagePaths: 'https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/JANUARY/2/19/4/877e449c-3c0d-4630-a304-91ec110499f2.png,https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/JANUARY/2/19/4/877e449c-3c0d-4630-a304-91ec110499f2.png,https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/JANUARY/2/19/4/877e449c-3c0d-4630-a304-91ec110499f2.png', // 第三部的图片路径最多20张,切割 - triggerWords: '触发词', // 触发词 + triggerWords: '', // 触发词 isPublic: 1, // 权限是否公开权限 1公开 2自见 - allowFusion: 1, // 待确定 - allowDownloadImage: 1, // 允许下载生图 - allowUsage: 1, // 是否允许使用 isFree: 0, // 是否免费 0免费 1会员 ???? + isOnlineUse: 1, // 是否允许在线使用 + allowDownloadImage: 1, // 允许下载生图 allowSoftwareUse: 1, // 允许在软件旗下使用 + allowFusion: 1, // 是否允许融合 allowCommercialUse: 1, // 是否允许商用 + + // allowUsage: 1, // 是否允许使用 // 允许模型转售或者融合手出售字段没找到? - isExclusiveModel: 1, // 是否为独家模型这个字段 + isExclusiveModel: 0, // 是否为独家模型这个字段 } const isPublicList = [ { @@ -46,12 +47,7 @@ const isPublicList = [ defineExpose({ addVersion, }) -onMounted(() => { - // 确保数据初始化完成 - nextTick(() => { - isDataReady.value = true - }) -}) + const localForm = computed({ get() { return props.modelValue @@ -74,17 +70,22 @@ const formRef = ref(null) const rules = { versionName: { required: true, - message: '请输入模型名称', + message: '', trigger: 'blur', }, modelId: { + required: true, + message: '', + trigger: 'blur', + }, + triggerWords: { required: true, message: '请输入模型名称', trigger: 'blur', }, } function addVersion() { - localForm.value.modelVersionList.push(modelVersionItem) + localForm.value.modelVersionList.unshift(modelVersionItem) } const originalBtnList = ref([ { @@ -132,165 +133,198 @@ async function handleFileChange(event: Event) {