This commit is contained in:
parent
647c8969f3
commit
b55405fc6b
|
|
@ -51,11 +51,16 @@
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.password-book-item span:last-child {
|
.password-book-item span:nth-child(2) {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.password-book-item span:nth-child(3) {
|
||||||
|
cursor: pointer;
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
.password-book-title {
|
.password-book-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
@ -142,6 +147,7 @@
|
||||||
'<div class="password-book-item">' +
|
'<div class="password-book-item">' +
|
||||||
'<span>' + item.fileName + '</span>' +
|
'<span>' + item.fileName + '</span>' +
|
||||||
`<span onclick="deleteFile('${item.id}')">删除</span>` + // 直接传 id
|
`<span onclick="deleteFile('${item.id}')">删除</span>` + // 直接传 id
|
||||||
|
`<span onclick="downloadFile('${item.filePtah}')">预览</span>` + // 直接传 id
|
||||||
'</div>'
|
'</div>'
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
|
@ -165,6 +171,10 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 预览文件
|
||||||
|
function downloadFile(filePath) {
|
||||||
|
window.open(filePath)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue