- 根因:页面(_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 后构建可自动重建。
36 lines
2.9 KiB
CSS
36 lines
2.9 KiB
CSS
/*******************************************
|
||
重写bootstrap样式
|
||
*********************************************/
|
||
/***layout***/
|
||
.row { margin-right: 0; margin-left: 0; }
|
||
.container > .row { margin-right: -15px; margin-left: -15px; }
|
||
|
||
/***btn***/
|
||
.btn-primary:not(:disabled):not(.disabled).active:focus, .btn-primary:not(:disabled):not(.disabled):active:focus, .show > .btn-primary.dropdown-toggle:focus { box-shadow: none; }
|
||
.btn-primary, .btn-default { min-width: 70px; background: #e33333 !important; border-radius: 5px !important; border-color: #e33333 !important; padding: 4px 12px; outline: none !important; color: #fff !important; margin: 0 5px 1px 0; }
|
||
.btn-primary:hover, .btn-default:hover { background: #e33333 !important; border-color: #e33333; }
|
||
.btn-primary:focus, .btn-default:focus { border-color: #e33333 !important; outline: none; box-shadow: none; }
|
||
.btn-primary:active, .btn-default:active, .open .btn-primary.dropdown-toggle { border-color: #e33333 }
|
||
|
||
/***nav-tabs***/
|
||
.nav-tabs > li > a, .nav-tabs > li > a:focus { border-color: #c5d0dc; background-color: #00b5f8; color: #fff; }
|
||
.nav-tabs > li.active > a, .nav-tabs > li.active > a:focus, .nav-tabs > li.active > a:hover { background: #ff6462; color: #fff; border-top: none; margin-top: 0px; box-shadow: none; }
|
||
|
||
/***form***/
|
||
.form-group { height: auto; min-height: 28px; }
|
||
.form-control:focus { box-shadow: none; }
|
||
.form-control.is-invalid:focus, .was-validated .form-control:invalid:focus { box-shadow: none; }
|
||
/***table***/
|
||
.table > thead > tr > td, .table > thead > tr > th { background: #F9F9F9; vertical-align: middle; }
|
||
.table-hover > tbody > tr:hover { background: #F2FBFF; }
|
||
.table-hover > thead > tr > td:hover, .table-hover > thead > tr > th:hover { background: #F2FBFF; }
|
||
.table-bordered select { margin-top: 5px; }
|
||
.table-bordered > thead > tr > td, .table-bordered > thead > tr > th { border-bottom: 1px; }
|
||
.table-bordered > tbody > tr > td, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > td, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > thead > tr > th { border-color: #ccc; }
|
||
|
||
|
||
/***input***/
|
||
textarea:disabled, input:not([type]):disabled, input[type="color"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="email"]:disabled, input[type="month"]:disabled, input[type="password"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="text"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="week"]:disabled { background-color: rgb(235,235,228); }
|
||
|
||
input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, input[type="file"]:disabled::-webkit-file-upload-button, button:disabled, select:disabled, keygen:disabled, optgroup:disabled, option:disabled, select[disabled] > option { background-color: rgb(235,235,228); color: graytext; }
|