浏览代码

Insert attachment links
插入附件链接

star7th 6 年之前
父节点
当前提交
62432bf357
共有 3 个文件被更改,包括 10 次插入0 次删除
  1. 6 0
      web_src/src/components/page/edit/AttachmentList.vue
  2. 2 0
      web_src/static/lang/en.js
  3. 2 0
      web_src/static/lang/zh-CN.js

+ 6 - 0
web_src/src/components/page/edit/AttachmentList.vue

@@ -26,6 +26,7 @@
             width="150">
             width="150">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-button @click="downloadFile(scope.row)" type="text" size="small">{{$t('download')}}</el-button>
               <el-button @click="downloadFile(scope.row)" type="text" size="small">{{$t('download')}}</el-button>
+              <el-button @click="insertFile(scope.row)" type="text" size="small">{{$t('insert')}}</el-button>
               <el-button type="text" size="small" @click="deleteFile(scope.row)" v-if="manage">{{$t('delete')}}</el-button>
               <el-button type="text" size="small" @click="deleteFile(scope.row)" v-if="manage">{{$t('delete')}}</el-button>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -134,6 +135,11 @@ export default {
         let childRef = this.$refs.uploadFile ;//获取子组件
         let childRef = this.$refs.uploadFile ;//获取子组件
         childRef.clearFiles() ; 
         childRef.clearFiles() ; 
         this.get_content();
         this.get_content();
+    },
+    insertFile(row){
+        var val = '['+row['display_name']+']('+row['url']+' "['+row['display_name']+'")';
+        this.callback(val);
+        this.dialogTableVisible = false;
     }
     }
 
 
   },
   },

+ 2 - 0
web_src/static/lang/en.js

@@ -277,5 +277,7 @@ exports.default = {
     "item_exit":"Exit item",
     "item_exit":"Exit item",
     "confirm_exit_item":"Are you sure to exit this item?",
     "confirm_exit_item":"Are you sure to exit this item?",
 
 
+     "insert":"Insert",
+
        
        
 };
 };

+ 2 - 0
web_src/static/lang/zh-CN.js

@@ -283,4 +283,6 @@ exports.default = {
 
 
     "item_exit":"退出项目",
     "item_exit":"退出项目",
     "confirm_exit_item":"你确定要退出该项目吗?",   
     "confirm_exit_item":"你确定要退出该项目吗?",   
+
+     "insert":"插入",
 };
 };