Przeglądaj źródła

Merge branch 'dev_1.1.7.1' of https://git.yishihui.com/DeNet/de-net into dev_1.1.7.1

zhangwei 2 lat temu
rodzic
commit
fb1e669919

+ 7 - 4
src/view/iframe/publish/tool-box/child/preview.vue

@@ -257,11 +257,10 @@ const submitPublish = () => {
     if (submitIng.value) {
         return;
     }
-
-    setHistoryData(currentApp);
-
     let linkTitle = props.resourceInfo.title;
 
+    setHistoryData(currentApp, {linkTitle: !appId ? linkTitle : ''});
+
     let postBizData = {
         convertUrl,
         originUrl,
@@ -306,9 +305,13 @@ const submitPublish = () => {
     });
 }
 
-const setHistoryData = async (params) => {
+const setHistoryData = async (params, {linkTitle = ''}) => {
     const maxLength = 9;
     let { list = [] } = await getChromeStorage('toolBoxAppHistoryData') || {};
+    if (linkTitle) {
+      params.name = linkTitle;
+    }
+
     if (list.length) {
         let hasSite = list.find(item => item.defaultUrl == params.defaultUrl);
         if (hasSite) {