|
@@ -66,6 +66,7 @@ export default defineUI({
|
|
|
item.published
|
|
|
? items.push("取消发布")
|
|
|
: items.push("发布平台");
|
|
|
+ items.push("替换封面");
|
|
|
}
|
|
|
return (
|
|
|
<Draggable>
|
|
@@ -108,6 +109,16 @@ export default defineUI({
|
|
|
queenApi.messageSuccess("删除成功!");
|
|
|
return;
|
|
|
}
|
|
|
+ if (name == "替换封面") {
|
|
|
+ const url = await editor.controls.pickCtrl.pickOneImage();
|
|
|
+ if (!url) return;
|
|
|
+ await resource.https.updateComp({_id: item._id, thumbnail: url});
|
|
|
+ item.thumbnail = url;
|
|
|
+ queenApi.messageSuccess("替换成功");
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
const pub = name == "发布平台";
|
|
|
await resource.actions.publishFrame(item, pub);
|
|
|
item.published = pub;
|