Browse Source

add data type

qinyan 1 year ago
parent
commit
d0a5866bd3

+ 1 - 0
src/views/admin/detail/components/DetailEditor.tsx

@@ -46,6 +46,7 @@ export default defineComponent({
       if (!subData._id) {
         subData.title = data?.name;
         subData.cid = data._id;
+        subData.type = data.type;
       }
       let summary = state.data.summary.substring(0, 60);
       summary = summary.replace(/\n/g, "");

+ 1 - 0
src/views/admin/detail/components/DownloadEditor.tsx

@@ -88,6 +88,7 @@ export default defineComponent({
       );
       if (!itemData._id) {
         itemData.cid = data._id;
+        itemData.type = data.type;
       }
       artStore.addOrUpdateArticle(itemData);
     };

+ 1 - 0
src/views/admin/detail/components/ListEditor.tsx

@@ -102,6 +102,7 @@ export default defineComponent({
       );
       if (!itemData._id) {
         itemData.cid = data._id;
+        itemData.type = data.type;
       }
       artStore.addOrUpdateArticle(itemData);
     };