This commit is contained in:
张成
2025-11-06 13:56:53 +08:00
parent b02853d5f7
commit c734e698de
12 changed files with 742 additions and 36 deletions

View File

@@ -35,7 +35,7 @@ export default class uiTool {
*/
static downloadFile(res, fileName) {
// 开头和结尾去掉 中间不去掉
let tempFileName = fileName || `${new Date().getTime()}.csv`
let tempFileName = fileName || `${new Date().getTime()}.csv`
const blob = new Blob([res.data || res])
const downloadElement = document.createElement('a')
@@ -130,20 +130,20 @@ export default class uiTool {
}
static delConfirm(callback) {
const Modal = (window.framework && window.framework.ViewUI && window.framework.ViewUI.Modal) || window.$Modal
if (Modal) {
Modal.confirm({
title: '温馨提示',
content: '<p>你确定删除吗?</p>',
onOk: () => {
callback && callback()
}
})
}
const Modal = window.rootVue.$Modal
Modal.confirm({
title: '温馨提示',
content: '<p>你确定删除吗?</p>',
onOk: () => {
callback && callback()
}
})
}
static showConfirm({ title = '温馨提示', content = '内容' }, callback) {
const Modal = (window.framework && window.framework.ViewUI && window.framework.ViewUI.Modal) || window.$Modal
const Modal = window.rootVue.$Modal
if (Modal) {
Modal.confirm({
title,