- 根因:页面(_MainLayout 等)加载的是 bundle.js 等由 bundleconfig.json 打包的生成产物,
但 csproj 未接入 BundlerMinifier,dotnet build 不会重生它们,Jenkins 只是把 git 里
陈旧的 bundle.js 原样发布 -> 改了 fastVue.base.js 后回车不生效(部署的 bundle 仍是无
enter 的旧版)。且源文件带 UTF-8 BOM,拼接后每个 BOM 落入文件中间成为 ZWNBSP,提交
diff 充满不可见字符(历史上曾多次在产物上手工清 BOM 打补丁)。
- 修复:
1. YLErpWeb.csproj 新增 BuildBundlerMinifier(3.2.449);其 BundleMinify 目标在
BeforeCompile 自动按 bundleconfig.json 重建全部 bundle,Jenkins 构建即自动产出正确版本,
不再需要手工重建并提交 bundle.js。
2. .gitignore 忽略 8 个生成产物(jquery.js/bundle.js/vue.js/bundle.css/bundleV2.css/
bundleV2.js/bundle.min.css/bundleV2.min.css) 并 git rm --cached 取消跟踪;这些产物
永不再入版本库、永不陈旧。
3. 剥离 15 个喂给 bundle 的源文件(及 css)开头的 UTF-8 BOM,使重建产物不再含 ZWNBSP。
- 验证:本地 dotnet build -t:BundleMinify 重建后 8 个 bundle 全部 BOM=0,bundle.js 含完整
enter 链路(_enterFired/isEnter/$emit('enter'));删除 bundle.min.css 后构建可自动重建。
28 lines
1.5 KiB
CSS
28 lines
1.5 KiB
CSS
/**************************************************
|
|
bootstrap样式扩展(组件前缀相同但自定义修饰类)
|
|
****************************************************/
|
|
/****utils****/
|
|
|
|
/****text****/
|
|
.text-red { color: red; }
|
|
.text-size0 { font-size: 0; }
|
|
.text-lowercase { text-transform: lowercase !important; }
|
|
.text-uppercase { text-transform: uppercase !important; }
|
|
.text-capitalize { text-transform: capitalize !important; }
|
|
|
|
/****nav****/
|
|
.nav-main { display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; padding-left: 0; margin-bottom: 0; list-style: none; }
|
|
.nav-main > li { width: 182px; border: none; border-radius: 0; display: inline-block; }
|
|
.nav-main > li > a { display: block; padding: 4px 13px; border-right: 1px solid #c5d0dc; background: #4b545c; color: #fff; text-align: center; text-decoration: none; cursor: pointer; border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
|
|
.nav-main > li.active > a, .nav-main > li > a.active { background: #e33333; color: #fff; }
|
|
.nav-main.dark > li > a { background: #8c8c8c; }
|
|
.nav-main.dark > li.active > a { background: #00b5f8; }
|
|
|
|
.nav-tabs.nav-main { border: 0; }
|
|
.nav-tabs.nav-main .nav-item { margin: 0; }
|
|
.nav-tabs.nav-main .nav-link { border: 0; border-radius: 0; border-right: 1px solid #c5d0dc; border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
|
|
.nav-tabs.nav-main .nav-link.active { background: #e33333; color: #fff; }
|
|
|
|
/****table****/
|
|
.table-center th, .table-center td { text-align: center !important; vertical-align: middle !important; }
|