将账本业务页面、表单与审批迁移到 React,并加入旧版对照验收
This commit is contained in:
1 parent
f1a4e69f0d
commit
00dd683116
107 files changed
+31755
-191
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import path from 'node:path';
|
||||
|
||||
// Vite 展开业务页的本地 @import 后,按来源文件限定选择器。
|
||||
// React 页面及其原生 dialog 继承同一套表格、金额和打印状态样式。
|
||||
export default {
|
||||
plugins: [
|
||||
{
|
||||
postcssPlugin: 'scope-business-pages',
|
||||
Once(root) {
|
||||
if (path.basename(root.source.input.file) !== 'business-pages.css') return;
|
||||
root.walkRules(rule => {
|
||||
if (path.basename(rule.source.input.file) !== 'app.css') return;
|
||||
if (rule.selector === ':root' || rule.selector === 'body') {
|
||||
// 外壳统一提供字体和主题变量,原生 dialog 保留浏览器居中方式。
|
||||
rule.remove();
|
||||
} else if (rule.selector === 'html:has(#order-form)') {
|
||||
rule.selector = 'html:has(.business-pages #order-form)';
|
||||
} else {
|
||||
rule.selectors = rule.selectors.map(selector => '.business-pages ' + selector);
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in new issue
Block a user