feat: 新增阿里云OSS适配器及分类图标优化

- 新增阿里云OSS SDK核心类库文件
- 新增OSS插件配置文件及钩子监听
- 新增分类图标SVG资源并优化为轻量化格式
- 替换定位接口为天地图逆地理编码接口
- 新增OSS图片缩略处理工具方法
这个提交包含在:
2026-11-20 11:11:03 +08:00
父节点 134267fcd9
当前提交 133d425ec0
共有 228 个文件被更改,包括 26656 次插入 和 604 次删除

查看文件

@@ -218,3 +218,31 @@ test('frontend metadata is escaped without double-encoding upload filenames', ()
assert.equal(typeof column.formatter, 'function', field + ' has a frontend formatter');
}
});
/**
* 校验附件列表图片点击放大预览特性配置
*/
test('attachment image preview adds img-preview class and preview event handler', () => {
const imgRow = attachment({
filename: 'test-pic.jpg',
fullurl: '/uploads/test-pic.jpg',
mimetype: 'image/jpeg'
});
const html = formatters.thumb('', imgRow, 0);
assert.ok(html.includes('class="img-preview"'), 'Image preview link should have img-preview class');
assert.ok(html.includes('data-caption="test-pic.jpg"'), 'Image preview link should contain caption');
const nonImgRow = attachment({
filename: 'document.pdf',
fullurl: '/uploads/document.pdf',
mimetype: 'application/pdf',
imagetype: 'pdf'
});
const nonImgHtml = formatters.thumb('', nonImgRow, 0);
assert.ok(!nonImgHtml.includes('class="img-preview"'), 'Non-image file should not have img-preview class');
const previewColumn = columns.find(column => column.field === 'preview');
assert.ok(previewColumn, 'Preview column exists');
assert.ok(previewColumn.events, 'Preview column has events defined');
assert.equal(typeof previewColumn.events['click .img-preview'], 'function', 'Preview column has click .img-preview event handler');
});