24 lines
692 B
JavaScript
24 lines
692 B
JavaScript
/**
|
||
* uView u-input 组件补丁
|
||
* 直接用预存的补丁文件覆盖原始文件
|
||
* 使下拉选择框(readonly/disabled)超长文字可自动换行完整显示
|
||
*/
|
||
const fs = require('fs');
|
||
const path = require('path');
|
||
|
||
const target = path.join('node_modules', 'uview-plus', 'components', 'u-input', 'u-input.vue');
|
||
const source = path.join('scripts', 'u-input.vue');
|
||
|
||
if (!fs.existsSync(target)) {
|
||
console.log('[patch-u-input] target not found, skipping');
|
||
process.exit(0);
|
||
}
|
||
|
||
if (!fs.existsSync(source)) {
|
||
console.log('[patch-u-input] source not found, skipping');
|
||
process.exit(0);
|
||
}
|
||
|
||
fs.copyFileSync(source, target);
|
||
console.log('[patch-u-input] Patched successfully');
|