This commit is contained in:
张成
2025-10-28 16:11:23 +08:00
parent 0a723c4dfe
commit 970edeb759
6 changed files with 101 additions and 15 deletions

View File

@@ -31,6 +31,30 @@ app.$mount('#app')
**完整代码只需 12 行:**
## 📁 文件下载功能
框架内置了便捷的文件下载功能:
```javascript
// 在组件中使用
export default {
methods: {
exportData() {
// 调用 API 获取数据
this.$http.fileExport('/api/export', params).then(res => {
// 下载文件(自动处理换行符)
this.$uiTool.downloadFile(res, '数据导出.csv')
})
}
}
}
```
**特性:**
- ✅ 自动处理 CSV 换行符
- ✅ 支持多种文件格式
- ✅ 浏览器兼容性好
```javascript
// main.js
import AdminFramework from './admin-framework.js'