diff --git a/src/pages/repository/source/index.vue b/src/pages/repository/source/index.vue index 727f71f4439b3c2138017090ea766c1b09062ca8..4407e9505efd1cc0e13f7d853c46fcfbfa885e89 100644 --- a/src/pages/repository/source/index.vue +++ b/src/pages/repository/source/index.vue @@ -315,7 +315,7 @@ export default { analysisData(data) { return data.split('\n').map(item => { let obj = {} - let urlPre = true // 该标记是否循环到http://或ssh://或ftp:// + let urlPre = true const reg = /^(http|ssh|ftp):\/\// item.split(' ').forEach((item, index) => { if (item) { @@ -347,6 +347,20 @@ export default { this.selectPlan.sourceList = this.analysisData(row.sourceList) this.editVisible = true }, + deleteSource(id) { + this.$confirm({ + title: '系统提示', + content: '确定删除该条软件源模板?', + onOk: () => { + deleteSource({ id }).then(res => { + if (res.code === 200) { + this.$notification.success({ message: '删除成功' }) + this.getPlanList() + } + }) + } + }) + }, } } \ No newline at end of file