dsh-workbench-salary 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +82 -39
- package/package.json +3 -3
package/lib/client.js
CHANGED
|
@@ -512,18 +512,21 @@ var require_client_base_styles = __commonJS({
|
|
|
512
512
|
s + "-table th{font-weight:600;color:var(--wb-muted,#6b7280);white-space:nowrap}",
|
|
513
513
|
s + "-btn{border:1px solid var(--wb-border,#d1d5db);background:var(--wb-surface,#fff);color:inherit;border-radius:7px;padding:5px 10px;font-size:12px;cursor:pointer}",
|
|
514
514
|
s + "-btn:hover:not(:disabled){border-color:var(--wb-accent,#2563eb)}" + s + "-btn:disabled{opacity:.5;cursor:default}",
|
|
515
|
-
s + "-btn.primary{background:var(--wb-accent,#2563eb);border-color:var(--wb-accent,#2563eb);color
|
|
516
|
-
s + "-btn.danger{color
|
|
515
|
+
s + "-btn.primary{background:var(--wb-accent,#2563eb);border-color:var(--wb-accent,#2563eb);color:var(--dsw-alias-label-primary-inverted,#fff)}",
|
|
516
|
+
s + "-btn.danger{color:var(--wb-danger,#b91c1c);border-color:color-mix(in oklab,var(--wb-danger,#b91c1c) 35%,transparent)}",
|
|
517
517
|
s + "-field{display:flex;flex-direction:column;gap:4px;font-size:12px}" + s + "-label{font-weight:600}",
|
|
518
518
|
s + "-field input," + s + "-field select," + s + "-field textarea{border:1px solid var(--wb-border,#d1d5db);border-radius:7px;padding:6px 8px;font:inherit;background:var(--wb-surface,#fff);color:inherit;min-width:0}",
|
|
519
|
-
s + "-hint{color:var(--wb-muted,#6b7280);font-size:11px}" + s + "-notice{padding:8px 10px;border-radius:8px;font-size:12px;background
|
|
520
|
-
s + "-notice.error{background
|
|
519
|
+
s + "-hint{color:var(--wb-muted,#6b7280);font-size:11px}" + s + "-notice{padding:8px 10px;border-radius:8px;font-size:12px;background:color-mix(in oklab,var(--wb-accent,#2563eb) 9%,transparent);color:var(--dsw-alias-label-primary,inherit)}",
|
|
520
|
+
s + "-notice.error{background:color-mix(in oklab,var(--wb-danger,#b91c1c) 10%,transparent);color:var(--wb-danger,#b91c1c)}" + s + "-notice.ok{background:color-mix(in oklab,var(--wb-ok,#047857) 10%,transparent);color:var(--wb-ok,#047857)}",
|
|
521
521
|
s + "-empty{padding:18px;text-align:center;color:var(--wb-muted,#6b7280);font-size:12px;border:1px dashed var(--wb-border,#e5e7eb);border-radius:8px}",
|
|
522
|
-
s + "-pill{display:inline-block;padding:1px 7px;border-radius:999px;font-size:11px;background
|
|
523
|
-
s + "-pill.ok{background
|
|
524
|
-
s + "-json{margin:0;padding:8px;background
|
|
522
|
+
s + "-pill{display:inline-block;padding:1px 7px;border-radius:999px;font-size:11px;background:color-mix(in oklab,currentColor 7%,transparent);color:inherit}",
|
|
523
|
+
s + "-pill.ok{background:color-mix(in oklab,var(--wb-ok,#047857) 12%,transparent);color:var(--wb-ok,#047857)}" + s + "-pill.error{background:color-mix(in oklab,var(--wb-danger,#b91c1c) 12%,transparent);color:var(--wb-danger,#b91c1c)}" + s + "-pill.warn{background:color-mix(in oklab,var(--wb-warn,#b45309) 14%,transparent);color:var(--wb-warn,#b45309)}",
|
|
524
|
+
s + "-json{margin:0;padding:8px;background:color-mix(in oklab,currentColor 4%,transparent);border-radius:8px;font-size:11px;max-height:240px;overflow:auto}",
|
|
525
525
|
s + "-muted{color:var(--wb-muted,#6b7280)}" + s + "-link{color:var(--wb-accent,#2563eb);cursor:pointer;text-decoration:none}",
|
|
526
|
-
s + "-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}"
|
|
526
|
+
s + "-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}",
|
|
527
|
+
// 窄屏:页面容器不再自带左右内边距(宿主的 .wb-immersive-main 已经给过),
|
|
528
|
+
// 卡片与栅格收紧,把宽度尽量留给内容——窄屏下两侧留白比桌面更影响可读性。
|
|
529
|
+
"@media(max-width:760px){" + s + "-wrap{padding:0 0 8px;gap:10px}" + s + "-card{padding:12px;border-radius:10px}" + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}" + s + "-form{grid-template-columns:minmax(0,1fr)}" + s + "-title{font-size:15px}" + s + "-table-wrap{overflow-x:auto;max-width:100%}" + s + "-table{width:max-content;min-width:100%}}@media(max-width:420px){" + s + "-wrap{padding:0 0 6px}" + s + "-card{padding:10px}" + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}}"
|
|
527
530
|
]);
|
|
528
531
|
};
|
|
529
532
|
module2.exports.secretFieldStyles = SECRET_FIELD;
|
|
@@ -1223,7 +1226,7 @@ var require_styles = __commonJS({
|
|
|
1223
1226
|
".wbsal-field{display:flex;flex-direction:column;gap:4px;font-size:12px;min-width:0}",
|
|
1224
1227
|
".wbsal-label{font-size:11.5px;font-weight:600;color:var(--wb-muted,#8b94a6)}",
|
|
1225
1228
|
".wbsal-hint{font-size:11px;color:var(--wb-muted,#8b94a6)}",
|
|
1226
|
-
".wbsal-muted{font-size:12px;color:var(--wb-muted,#8b94a6)}",
|
|
1229
|
+
".wbsal-muted{font-size:12px;color:var(--wb-muted,#8b94a6);min-width:0;overflow-wrap:anywhere}",
|
|
1227
1230
|
".wbsal-danger{color:var(--wb-danger,#b91c1c);font-size:12px}",
|
|
1228
1231
|
/* 月份分组 + 记录表 */
|
|
1229
1232
|
".wbsal-months{display:flex;flex-direction:column;gap:10px}",
|
|
@@ -1406,7 +1409,10 @@ var require_styles = __commonJS({
|
|
|
1406
1409
|
/* 响应式 */
|
|
1407
1410
|
"@media (max-width:1100px){.wbsal-detail{grid-template-columns:repeat(2,minmax(0,1fr))}}",
|
|
1408
1411
|
"@media (max-width:900px){.wbsal-table th.hide-md,.wbsal-table td.hide-md{display:none}}",
|
|
1409
|
-
"@media (max-width:760px){.wbsal-detail{grid-template-columns:minmax(0,1fr)}.wbsal-page{padding:
|
|
1412
|
+
"@media (max-width:760px){.wbsal-detail{grid-template-columns:minmax(0,1fr)}.wbsal-page{padding:0 0 32px}.wbsal-table th,.wbsal-table td{padding:9px 10px}.wbsal-opt,.wbsal-table th.opt{display:none}.wbsal-comp-row{grid-template-columns:80px minmax(50px,1fr) 112px}.wbsal-chart{height:170px}.wbsal-month{flex-wrap:wrap;gap:2px}.wbsal-toolbar{padding:10px 12px}}",
|
|
1413
|
+
// 手机宽度:记录表只留「发薪日 / 实发 / 展开」三列。结算方式与用工类型在展开详情里已有,
|
|
1414
|
+
// 不再和金额抢宽度;表格外层允许横向滚动兜底,避免列被直接裁掉。
|
|
1415
|
+
"@media (max-width:600px){.wbsal-c-cycle,.wbsal-c-emp{display:none}.wbsal-table-wrap{overflow-x:auto}.wbsal-toolbar{flex-direction:column;align-items:stretch;gap:10px}.wbsal-toolbar .wbsal-field{width:100%}.wbsal-toolbar .wbsal-input{width:100%;box-sizing:border-box}.wbsal-toolbar-end{margin-left:0;justify-content:space-between}.wbsal-month-total{font-size:11.5px}.wbsal-record-row td{padding-top:8px;padding-bottom:8px}}"
|
|
1410
1416
|
];
|
|
1411
1417
|
var DATE = require_date_picker_styles()("wbsal");
|
|
1412
1418
|
var AMOUNT = [
|
|
@@ -1420,6 +1426,37 @@ var require_styles = __commonJS({
|
|
|
1420
1426
|
}
|
|
1421
1427
|
});
|
|
1422
1428
|
|
|
1429
|
+
// packages/addons/lib/inject-styles.cjs
|
|
1430
|
+
var require_inject_styles = __commonJS({
|
|
1431
|
+
"packages/addons/lib/inject-styles.cjs"(exports2, module2) {
|
|
1432
|
+
"use strict";
|
|
1433
|
+
function toCss(value) {
|
|
1434
|
+
var v = typeof value === "function" ? value() : value;
|
|
1435
|
+
if (Array.isArray(v)) return v.filter(Boolean).join("\n");
|
|
1436
|
+
if (v === null || v === void 0) return "";
|
|
1437
|
+
return String(v);
|
|
1438
|
+
}
|
|
1439
|
+
module2.exports = function injectStyles(options) {
|
|
1440
|
+
var opts = options || {};
|
|
1441
|
+
var css = toCss(opts.css);
|
|
1442
|
+
if (typeof document === "undefined" || !document.head) return "";
|
|
1443
|
+
var id = opts.id;
|
|
1444
|
+
var old = id ? document.getElementById(id) : null;
|
|
1445
|
+
if (old) {
|
|
1446
|
+
if (old.textContent !== css) old.textContent = css;
|
|
1447
|
+
return css;
|
|
1448
|
+
}
|
|
1449
|
+
var style = document.createElement("style");
|
|
1450
|
+
if (id) style.id = id;
|
|
1451
|
+
if (opts.addon) style.setAttribute("data-wb-addon", opts.addon);
|
|
1452
|
+
style.textContent = css;
|
|
1453
|
+
document.head.appendChild(style);
|
|
1454
|
+
return css;
|
|
1455
|
+
};
|
|
1456
|
+
module2.exports.toCss = toCss;
|
|
1457
|
+
}
|
|
1458
|
+
});
|
|
1459
|
+
|
|
1423
1460
|
// packages/addons/lib/switch.cjs
|
|
1424
1461
|
var require_switch = __commonJS({
|
|
1425
1462
|
"packages/addons/lib/switch.cjs"(exports2, module2) {
|
|
@@ -3988,12 +4025,12 @@ var require_records = __commonJS({
|
|
|
3988
4025
|
h("td", { className: "left" }, h("span", { className: "wbsal-date" }, h("b", null, String(item.payDate).slice(5)), h("span", null, F.weekday(item.payDate)))),
|
|
3989
4026
|
h(
|
|
3990
4027
|
"td",
|
|
3991
|
-
{ className: "left" },
|
|
4028
|
+
{ className: "left wbsal-c-cycle" },
|
|
3992
4029
|
h(C.Pill, { h, kind: item.cycle === "daily" ? "warn" : "ok" }, item.cycle === "daily" ? "\u65E5\u7ED3" : "\u6708\u7ED3"),
|
|
3993
4030
|
h("div", { className: "wbsal-muted" }, item.incomePeriod ? F.monthLabel(item.incomePeriod) : "\u672A\u5F52\u5C5E")
|
|
3994
4031
|
),
|
|
3995
|
-
h("td", { className: "left" }, h(C.Pill, { h, kind: item.employmentType === "regular" ? "ok" : item.employmentType === "probation" ? "warn" : "" }, F.employmentLabel(item.employmentType))),
|
|
3996
|
-
h("td",
|
|
4032
|
+
h("td", { className: "left wbsal-c-emp" }, h(C.Pill, { h, kind: item.employmentType === "regular" ? "ok" : item.employmentType === "probation" ? "warn" : "" }, F.employmentLabel(item.employmentType))),
|
|
4033
|
+
h("td", { className: "wbsal-c-net" }, h("span", { className: "wbsal-net" }, F.money(item.netPay))),
|
|
3997
4034
|
h("td", { className: "wbsal-opt" }, F.money(item.grossPay)),
|
|
3998
4035
|
h("td", { className: "wbsal-opt hide-md" }, F.money(F.sumValues(item, F.SOCIAL_KEYS))),
|
|
3999
4036
|
h("td", { className: "wbsal-opt hide-md" }, F.money(item.incomeTax)),
|
|
@@ -4050,10 +4087,10 @@ var require_records = __commonJS({
|
|
|
4050
4087
|
"tr",
|
|
4051
4088
|
null,
|
|
4052
4089
|
h("th", { className: "left" }, "\u53D1\u85AA\u65E5"),
|
|
4053
|
-
h("th", { className: "left" }, "\u7ED3\u7B97"),
|
|
4054
|
-
h("th", { className: "left" }, "\u7528\u5DE5\u7C7B\u578B"),
|
|
4055
|
-
h("th",
|
|
4056
|
-
h("th",
|
|
4090
|
+
h("th", { className: "left wbsal-c-cycle" }, "\u7ED3\u7B97"),
|
|
4091
|
+
h("th", { className: "left wbsal-c-emp" }, "\u7528\u5DE5\u7C7B\u578B"),
|
|
4092
|
+
h("th", { className: "wbsal-c-net" }, "\u5B9E\u53D1"),
|
|
4093
|
+
h("th", { className: "wbsal-opt" }, "\u5E94\u53D1"),
|
|
4057
4094
|
h("th", { className: "hide-md" }, "\u793E\u4FDD\u516C\u79EF\u91D1"),
|
|
4058
4095
|
h("th", { className: "hide-md" }, "\u4E2A\u7A0E"),
|
|
4059
4096
|
h("th", null, "")
|
|
@@ -5334,18 +5371,19 @@ var require_action_schema_style = __commonJS({
|
|
|
5334
5371
|
"use strict";
|
|
5335
5372
|
module2.exports = function(PREFIX, DOMAIN) {
|
|
5336
5373
|
var P = PREFIX + "-as";
|
|
5374
|
+
var hairline = "1px solid color-mix(in oklab,currentColor 8%,transparent)";
|
|
5337
5375
|
var CSS = [
|
|
5338
5376
|
"." + P + "{display:flex;flex-direction:column;gap:12px;width:100%;min-width:0;font-size:13px;color:inherit}",
|
|
5339
5377
|
"." + P + "-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
5340
5378
|
"." + P + "-title{font-size:15px;font-weight:660;margin:0}",
|
|
5341
|
-
"." + P + "-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--wb-border,#e3e5e9);border-radius:999px;padding:1px 8px;font-size:11px;color:var(--dsw-alias-label-secondary,currentColor);font-variant-numeric:tabular-nums}",
|
|
5379
|
+
"." + P + "-badge{display:inline-flex;align-items:center;gap:4px;max-width:100%;border:1px solid var(--wb-border,#e3e5e9);border-radius:999px;padding:1px 8px;font-size:11px;color:var(--dsw-alias-label-secondary,currentColor);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}",
|
|
5342
5380
|
"." + P + "-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px}",
|
|
5343
5381
|
"." + P + "-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
5344
5382
|
"." + P + "-search{position:relative;flex:1 1 220px;min-width:0;display:flex;align-items:center}",
|
|
5345
5383
|
"." + P + "-search input{width:100%;border:1px solid var(--wb-border,#e3e5e9);border-radius:8px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));color:inherit;font:inherit;padding:6px 10px 6px 30px}",
|
|
5346
5384
|
"." + P + "-search input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}",
|
|
5347
5385
|
"." + P + "-search .wbi-svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--dsw-alias-label-tertiary,inherit)}",
|
|
5348
|
-
"." + P + " select{border:1px solid var(--wb-border,#e3e5e9);border-radius:8px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));color:inherit;font:inherit;padding:6px 8px}",
|
|
5386
|
+
"." + P + " select{border:1px solid var(--wb-border,#e3e5e9);border-radius:8px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));color:inherit;font:inherit;padding:6px 8px;max-width:100%}",
|
|
5349
5387
|
"." + P + " select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}",
|
|
5350
5388
|
"." + P + "-list{display:flex;flex-direction:column;gap:8px}",
|
|
5351
5389
|
"." + P + "-card{border:1px solid var(--wb-border,#e3e5e9);border-radius:10px;padding:10px 12px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));display:flex;flex-direction:column;gap:8px;min-width:0}",
|
|
@@ -5353,7 +5391,7 @@ var require_action_schema_style = __commonJS({
|
|
|
5353
5391
|
"." + P + "-cardmeta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;min-height:24px}",
|
|
5354
5392
|
"." + P + "-cardhead code{font-weight:640;overflow-wrap:anywhere;min-width:0}",
|
|
5355
5393
|
"." + P + "-hintline{margin:0;color:var(--dsw-alias-label-tertiary,inherit);font-size:11.5px;line-height:1.5}",
|
|
5356
|
-
"." + P + "-origins{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}",
|
|
5394
|
+
"." + P + "-origins{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;min-width:0}",
|
|
5357
5395
|
"." + P + "-origins-label{font-size:11px;color:var(--wb-muted);white-space:nowrap}",
|
|
5358
5396
|
"." + P + "-origin{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;color:var(--wb-muted);cursor:pointer;user-select:none}",
|
|
5359
5397
|
// 该 action 本身不支持的来源:整项置灰、不可点,示意「不是没开,是开不了」。
|
|
@@ -5361,17 +5399,17 @@ var require_action_schema_style = __commonJS({
|
|
|
5361
5399
|
"." + P + "-origin input[type=checkbox]{width:13px;height:13px;margin:0;accent-color:var(--wb-accent);cursor:inherit}",
|
|
5362
5400
|
"." + P + "-origin input[type=checkbox]:focus-visible{outline:2px solid var(--wb-accent);outline-offset:2px}",
|
|
5363
5401
|
"." + P + "-locked{border-color:var(--wb-warn,#b7791f);color:var(--wb-warn,#b7791f)}",
|
|
5364
|
-
"." + P + "-desc{margin:0;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55;font-size:12.5px}",
|
|
5402
|
+
"." + P + "-desc{margin:0;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55;font-size:12.5px;overflow-wrap:anywhere}",
|
|
5365
5403
|
// 搜索命中:用品牌色透明度叠加而不是写死浅色,深浅主题都可读;继承文字颜色、不覆盖 ::selection。
|
|
5366
5404
|
"." + P + " mark." + P + "-hit{background:color-mix(in oklab,var(--dsw-alias-brand-primary,#4f6ef7) 22%,transparent);color:inherit;border-radius:2px;padding:0;font:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}",
|
|
5367
5405
|
"." + P + "-table{width:100%;border-collapse:collapse;font-size:12px;table-layout:auto}",
|
|
5368
5406
|
"." + P + "-table th{text-align:left;font-weight:620;font-size:11px;letter-spacing:.4px;text-transform:uppercase;color:var(--dsw-alias-label-tertiary,inherit);padding:4px 8px 4px 0;white-space:nowrap}",
|
|
5369
|
-
"." + P + "-table td{padding:4px 8px 4px 0;vertical-align:top;border-top:
|
|
5407
|
+
"." + P + "-table td{padding:4px 8px 4px 0;vertical-align:top;border-top:" + hairline + ";line-height:1.5;overflow-wrap:anywhere}",
|
|
5370
5408
|
"." + P + "-req{color:var(--dsw-alias-state-error-primary,#d9534f);font-weight:620}",
|
|
5371
5409
|
"." + P + "-opt{color:var(--dsw-alias-label-tertiary,inherit)}",
|
|
5372
5410
|
"." + P + "-none{color:var(--dsw-alias-label-tertiary,inherit);font-size:12px}",
|
|
5373
|
-
"." + P + "-example{position:relative;display:flex;flex-direction:column;gap:4px}",
|
|
5374
|
-
"." + P + "-examplehead{display:flex;align-items:center;justify-content:space-between;gap:8px}",
|
|
5411
|
+
"." + P + "-example{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0}",
|
|
5412
|
+
"." + P + "-examplehead{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}",
|
|
5375
5413
|
"." + P + "-pre{margin:0;padding:8px 10px;border-radius:8px;background:var(--dsw-alias-bg-skeleton,#f2f3f5);color:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;line-height:1.5;overflow:auto;max-height:280px;white-space:pre-wrap;word-break:break-word}",
|
|
5376
5414
|
"." + P + "-copy{border:1px solid var(--wb-border,#e3e5e9);border-radius:7px;background:transparent;color:inherit;font:inherit;font-size:11.5px;padding:2px 8px;cursor:pointer}",
|
|
5377
5415
|
"." + P + "-copy:hover{background:var(--dsw-alias-interactive-bg-hover,color-mix(in oklab,currentColor 5%,transparent))}",
|
|
@@ -5379,9 +5417,14 @@ var require_action_schema_style = __commonJS({
|
|
|
5379
5417
|
"." + P + " details>summary{cursor:pointer;font-size:11.5px;color:var(--dsw-alias-label-secondary,inherit);width:max-content}",
|
|
5380
5418
|
"." + P + " details>summary:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:2px}",
|
|
5381
5419
|
"." + P + "-empty{padding:24px;text-align:center;border:1px dashed var(--wb-border,#e3e5e9);border-radius:10px;color:var(--dsw-alias-label-tertiary,inherit)}",
|
|
5382
|
-
"." + P + "-error{padding:12px;border:1px solid var(--dsw-alias-state-error-primary,#d9534f);border-radius:10px;color:var(--dsw-alias-state-error-primary,#d9534f);display:flex;gap:10px;align-items:center}",
|
|
5383
|
-
"." + P + "-toast{position:sticky;bottom:8px;align-self:flex-start;border-radius:999px;padding:3px 10px;background:var(--dsw-alias-bg-skeleton,#f2f3f5);font-size:11.5px}",
|
|
5384
|
-
|
|
5420
|
+
"." + P + "-error{padding:12px;border:1px solid var(--dsw-alias-state-error-primary,#d9534f);border-radius:10px;color:var(--dsw-alias-state-error-primary,#d9534f);display:flex;gap:10px;align-items:center;flex-wrap:wrap;overflow-wrap:anywhere}",
|
|
5421
|
+
"." + P + "-toast{position:sticky;bottom:8px;align-self:flex-start;border-radius:999px;padding:3px 10px;background:var(--dsw-alias-bg-skeleton,#f2f3f5);font-size:11.5px;max-width:100%}",
|
|
5422
|
+
// 窄屏:五列参数表压成一列会丢失列名、且 table 布局按最小内容宽度撑破容器,
|
|
5423
|
+
// 这里整体改成块级网格:每行 = 名称 / 类型 / 必填 + 约束行 + 说明行,行间用细线分隔。
|
|
5424
|
+
"@media(max-width:760px){." + P + "-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:end}." + P + "-search{grid-column:1/-1}." + P + "-toolbar>label{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:0}." + P + "-toolbar select{width:100%;min-width:0}." + P + "-cardhead{grid-template-columns:minmax(0,1fr);row-gap:6px}." + P + "-origins{justify-content:flex-start}." + P + "-table{display:block}." + P + "-table thead{display:none}." + P + "-table tbody{display:block}." + P + '-table tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"name type need" "extra extra extra" "desc desc desc";column-gap:8px;padding:9px 0;border-top:' + hairline + "}." + P + "-table tr:first-child{border-top:0;padding-top:2px}." + P + "-table tr:last-child{padding-bottom:2px}." + P + "-table td{display:block;border:0;padding:0;min-width:0}." + P + "-table td:empty{display:none}." + P + "-pname{grid-area:name;font-weight:640}." + P + "-ptype{grid-area:type;justify-self:start;align-self:center;color:var(--dsw-alias-label-tertiary,inherit)}." + P + "-pneed{grid-area:need;justify-self:end;align-self:center;font-size:11px;line-height:1.6;white-space:nowrap}." + P + "-pextra{grid-area:extra;margin-top:3px;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55}." + P + "-pdesc{grid-area:desc;margin-top:3px;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55}}",
|
|
5425
|
+
// 中等宽度(521–760px)三个筛选项正好排成一行,避免第三项独占一行显得参差。
|
|
5426
|
+
"@media(min-width:521px) and (max-width:760px){." + P + "-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}}",
|
|
5427
|
+
"@media(max-width:420px){." + P + "-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}." + P + "-card{padding:10px}." + P + "-table tr{padding:8px 0}}"
|
|
5385
5428
|
].join("\n");
|
|
5386
5429
|
return function injectCss() {
|
|
5387
5430
|
if (typeof document === "undefined") return;
|
|
@@ -5793,12 +5836,16 @@ var require_action_schema_view = __commonJS({
|
|
|
5793
5836
|
return h(
|
|
5794
5837
|
"tr",
|
|
5795
5838
|
{ key: row.name },
|
|
5796
|
-
h("td", { className: P + "-mono" }, Highlight.hit(row.name, kw)),
|
|
5797
|
-
h("td", { className: P + "-mono" }, Highlight.hit(row.type, kw)),
|
|
5798
|
-
h(
|
|
5839
|
+
h("td", { className: P + "-mono " + P + "-pname" }, Highlight.hit(row.name, kw)),
|
|
5840
|
+
h("td", { className: P + "-mono " + P + "-ptype" }, Highlight.hit(row.type, kw)),
|
|
5841
|
+
h(
|
|
5842
|
+
"td",
|
|
5843
|
+
{ className: row.required ? P + "-req " + P + "-pneed" : P + "-opt " + P + "-pneed" },
|
|
5844
|
+
row.required ? t.required : t.optional
|
|
5845
|
+
),
|
|
5799
5846
|
// extra(默认 / 枚举 / 约束)不在过滤 haystack 里,因此也不高亮,保持「显示即命中」口径。
|
|
5800
|
-
h("td", { className: P + "-mono" }, extra),
|
|
5801
|
-
h("td",
|
|
5847
|
+
h("td", { className: P + "-mono " + P + "-pextra" }, extra),
|
|
5848
|
+
h("td", { className: P + "-pdesc" }, Highlight.hit(row.description, kw))
|
|
5802
5849
|
);
|
|
5803
5850
|
}
|
|
5804
5851
|
function originsChips(action) {
|
|
@@ -6054,18 +6101,14 @@ var GLYPHS = require_icons2().ICONS;
|
|
|
6054
6101
|
return h(Inner, { api: props.api, lang: props.lang === "en" ? "en" : "zh", h, React, title });
|
|
6055
6102
|
};
|
|
6056
6103
|
}
|
|
6104
|
+
var injectStyles = require_inject_styles();
|
|
6057
6105
|
function ensureStyles() {
|
|
6058
|
-
|
|
6059
|
-
if (document.getElementById("wb-salary-style")) return;
|
|
6060
|
-
var style = document.createElement("style");
|
|
6061
|
-
style.id = "wb-salary-style";
|
|
6062
|
-
style.textContent = CSS;
|
|
6063
|
-
document.head.appendChild(style);
|
|
6106
|
+
injectStyles({ id: "wb-salary-style", css: CSS, addon: "wb-addon-salary" });
|
|
6064
6107
|
}
|
|
6065
6108
|
ensureStyles();
|
|
6066
6109
|
host.registerAddon({
|
|
6067
6110
|
id: "wb-addon-salary",
|
|
6068
|
-
version: "0.4.
|
|
6111
|
+
version: "0.4.8",
|
|
6069
6112
|
icon: GLYPHS["wallet"],
|
|
6070
6113
|
views: [
|
|
6071
6114
|
{ id: "stats", icon: tabIcon("stats"), title: { zh: "\u7EDF\u8BA1", en: "Stats" }, component: withProps(require_stats(), "\u7EDF\u8BA1") },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-salary",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "个人工作台工资插件:按发薪日期记录工资构成、扣款与实发",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"addon": {
|
|
17
17
|
"id": "wb-addon-salary",
|
|
18
18
|
"title": "工资",
|
|
19
|
-
"version": "0.4.
|
|
19
|
+
"version": "0.4.8",
|
|
20
20
|
"minShell": "0.8.0",
|
|
21
21
|
"tables": [
|
|
22
22
|
"salary_record"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"dsh-workbench-host": "^0.10.
|
|
46
|
+
"dsh-workbench-host": "^0.10.2"
|
|
47
47
|
},
|
|
48
48
|
"dsh": {
|
|
49
49
|
"bundle": {
|