中英文切换

This commit is contained in:
mmc
2026-08-14 09:02:52 +08:00
parent a8af55a856
commit 62b03bba03
94 changed files with 19723 additions and 2766 deletions

28
tmp_orb.cjs Normal file
View File

@@ -0,0 +1,28 @@
const esbuild = require('esbuild');
const fs = require('fs');
const path = require('path');
(async () => {
const files = [
'components/SystemSetting/BasicSettings.tsx',
'components/SystemSetting/SerialNumGenerate.jsx',
'components/SystemSetting/DroneManagement.tsx',
'components/SystemSetting/SmartDeviceManagement.tsx',
'components/SystemSetting/AlarmSettingsManagement.tsx',
'components/SystemSetting/LogManagement.tsx',
'components/SystemSetting/OnlineUser.tsx',
'components/SystemSetting/VideoManagement.tsx',
'components/SystemSetting/WorkOrderSettingsManagement.tsx'
];
for (const f of files) {
const s = fs.readFileSync('src/' + f, 'utf8');
const ext = path.extname(f);
const loader = ext === '.tsx' ? 'tsx' : ext === '.ts' ? 'ts' : ext === '.jsx' ? 'jsx' : 'js';
try {
await esbuild.transform(s, { loader, target: 'es2020' });
console.log('ORIG OK ' + f);
} catch (e) {
console.log('ORIG FAIL ' + f + ' :: ' + String(e.message).split('\n').slice(0, 4).join(' | '));
}
}
console.log('DONE');
})();