weaver-work-cli 0.1.52 → 0.1.53

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.
Files changed (82) hide show
  1. package/dist/chunks/{attachment-content-MBYYSQIX.js → attachment-content-W3TSJC3Y.js} +3 -3
  2. package/dist/chunks/{chunk-D3TDNRFE.js → chunk-2J3XY4ED.js} +7 -7
  3. package/dist/chunks/{chunk-IRMA3GVP.js → chunk-6GCXWKG6.js} +1 -1
  4. package/dist/chunks/{chunk-KLZ3ULQQ.js → chunk-76PRVYH4.js} +1 -1
  5. package/dist/chunks/{chunk-7UOXOGFL.js → chunk-DEHJ7PMA.js} +4 -4
  6. package/dist/chunks/{chunk-DZOC77ZD.js → chunk-IF33CG4V.js} +1 -1
  7. package/dist/chunks/{chunk-LTRLF6MM.js → chunk-PE334WL3.js} +4 -4
  8. package/dist/chunks/{chunk-RWFRZSIP.js → chunk-QQXMHM3J.js} +2 -2
  9. package/dist/chunks/{chunk-RPRFIG6I.js → chunk-U7ROML5E.js} +23 -23
  10. package/dist/chunks/{chunk-ZRHKGQRQ.js → chunk-WTLQGS6D.js} +2 -2
  11. package/dist/chunks/{chunk-LALWNK6M.js → chunk-XPQN4E5O.js} +41 -19
  12. package/dist/chunks/{chunk-LM2H7SZI.js → chunk-Z4G7LLDD.js} +25 -25
  13. package/dist/chunks/{conflict-D2HYKBMH.js → conflict-57WDJWL7.js} +2 -2
  14. package/dist/chunks/{contract-MFOFMM2J.js → contract-LJRAXVZU.js} +5448 -1857
  15. package/dist/chunks/{create-flow-7ZATJVTM.js → create-flow-3FMMZBCA.js} +6 -6
  16. package/dist/chunks/{env-5DO4YENS.js → env-JYZE3BZB.js} +2 -2
  17. package/dist/chunks/{factory-3M7D7WJC.js → factory-66SCIKW3.js} +1 -1
  18. package/dist/chunks/{group-chat-B2HT5NEO.js → group-chat-MNRYMLNG.js} +3 -3
  19. package/dist/chunks/{meeting-HZOX3CBB.js → meeting-IIY4UAJL.js} +10 -10
  20. package/dist/chunks/{registry-KYPFFQIH.js → registry-CJOVECZD.js} +1 -1
  21. package/dist/chunks/{registry-SJHSBO5G.js → registry-METZ2LWE.js} +10 -10
  22. package/dist/chunks/{room-recommend-5AHR4YQV.js → room-recommend-YFY7HTOF.js} +4 -4
  23. package/dist/chunks/{schedule-KZPJUPC2.js → schedule-6I63TERA.js} +4 -4
  24. package/dist/chunks/{smart-extract-IXHCZE4R.js → smart-extract-FOUYNIG3.js} +44 -8
  25. package/dist/chunks/{workflow-UHKCZJMY.js → workflow-YHXFIU63.js} +1 -1
  26. package/dist/index.js +4 -4
  27. package/dist/shortcuts/contract/manifest.js +105 -5
  28. package/dist/shortcuts/contract/ooxml/docx-table.js +233 -0
  29. package/dist/shortcuts/contract/operations/card-action.js +597 -17
  30. package/dist/shortcuts/contract/operations/card-ebdf-list.js +258 -2
  31. package/dist/shortcuts/contract/operations/card.js +6 -5
  32. package/dist/shortcuts/contract/operations/docx-fillfromquote.js +532 -0
  33. package/dist/shortcuts/contract/operations/docx-verify.js +258 -0
  34. package/dist/shortcuts/contract/operations/elements-build.js +47 -0
  35. package/dist/shortcuts/contract/operations/first-screen.js +28 -3
  36. package/dist/shortcuts/contract/operations/ledger.js +438 -0
  37. package/dist/shortcuts/contract/operations/performance.js +104 -3
  38. package/dist/shortcuts/contract/operations/quotescreen.js +529 -0
  39. package/dist/shortcuts/contract/operations/registry.js +10 -0
  40. package/dist/shortcuts/contract/operations/triage.js +1100 -0
  41. package/dist/shortcuts/smart-extract/operations/fill.js +10 -7
  42. package/dist/shortcuts/smart-extract/operations/validate.js +49 -3
  43. package/dist/shortcuts/workflow/operations/form.js +68 -33
  44. package/docs/smart-extract.md +5 -5
  45. package/package.json +1 -1
  46. package/skills/weaver-e10-jinchengda/SKILL.md +139 -99
  47. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +43 -482
  48. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +7 -8
  49. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +3 -3
  50. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
  51. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +32 -16
  52. package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +478 -0
  53. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
  54. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +2 -2
  55. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +39 -61
  56. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +13 -9
  57. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +2 -2
  58. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +2 -2
  59. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +3 -3
  60. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +3 -3
  61. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +263 -0
  62. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +525 -0
  63. package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +36 -0
  64. package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +1 -1
  65. package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +3 -6
  66. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +80 -54
  67. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +53 -76
  68. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +19 -21
  69. package/skills/weaver-e10-jinchengda/references/orchestration.md +12 -12
  70. package/skills/weaver-e10-jinchengda/references/source-manifest.json +1 -6
  71. package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +2 -1
  72. package/skills/weaver-e10-smart-extract/SKILL.md +15 -4
  73. package/skills/weaver-e10-smart-extract/references/result-format.md +2 -2
  74. package/skills/weaver-e10-smart-extract/references/troubleshooting.md +2 -1
  75. package/skills/weaver-e10-workflow/references/workflow-create.md +6 -5
  76. package/skills/weaver-e10-workflow/references/workflow-edit.md +1 -1
  77. package/skills/weaver-e10-jinchengda/scripts/contract_first_screen.py +0 -200
  78. package/skills/weaver-e10-jinchengda/scripts/fill_contract_from_quote.py +0 -572
  79. package/skills/weaver-e10-jinchengda/scripts/quote_screen.py +0 -560
  80. package/skills/weaver-e10-jinchengda/scripts/triage_contract.py +0 -894
  81. package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +0 -598
  82. package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +0 -118
@@ -44,6 +44,70 @@ const ALIASES = new Map([
44
44
  ['商务渠道订单', '渠道订单-商务'],
45
45
  ['渠道订单商务', '渠道订单-商务'],
46
46
  ]);
47
+ /**
48
+ * 菜单 → 台账页(`@weapp/contract` 的 LedgerPage)默认标签 viewKey(2026-11-13 用户确认)。
49
+ *
50
+ * 台账页只有 5 个标签:e-cology 合同 / 直销合同业绩 / e-office 渠道协议 /
51
+ * e-office 渠道订单 / e-teams 渠道订单。「合同收款」「项目验收」在台账页没有对应标签,
52
+ * 不在本表内,继续用 ebdf 列表卡打开。渠道订单同时含 e-office 与 e-teams 产品数据,
53
+ * 默认落 e-teams 标签(用户确认),用户可在页面自行切换。
54
+ */
55
+ const LEDGER_VIEW_KEYS = new Map([
56
+ ['直销合同', 'ecology'],
57
+ ['直销业绩', 'directPerf'],
58
+ ['渠道订单', 'etOrder'],
59
+ ['渠道订单-商务', 'agree'],
60
+ ]);
61
+ /** 台账页 filters 可用键与值类型(来源:组件说明「默认筛选」)。 */
62
+ const LEDGER_FILTER_KINDS = {
63
+ ecology: {
64
+ khmc: 'text',
65
+ hth: 'text',
66
+ htmc: 'text',
67
+ qdrq: 'dateRange',
68
+ htzje: 'amountRange',
69
+ xslx: 'text',
70
+ xsjl2: 'text',
71
+ qy2: 'text',
72
+ hsjg: 'text',
73
+ },
74
+ directPerf: {
75
+ hth: 'text',
76
+ khmc: 'text',
77
+ yjny: 'text',
78
+ xsjl: 'text',
79
+ tdfzr: 'text',
80
+ jgfzr: 'text',
81
+ },
82
+ agree: {
83
+ dls: 'text',
84
+ xyh: 'text',
85
+ qdrq: 'dateRange',
86
+ htzje: 'amountRange',
87
+ sqjsrq: 'date',
88
+ },
89
+ eoOrder: {
90
+ khmc: 'text',
91
+ qy3: 'text',
92
+ qdrq: 'dateRange',
93
+ htzje: 'amountRange',
94
+ htzl: 'text',
95
+ syhhr: 'text',
96
+ ejsyhhr: 'text',
97
+ },
98
+ etOrder: {
99
+ khmc: 'text',
100
+ htzl: 'text',
101
+ qy3: 'text',
102
+ qdrq: 'dateRange',
103
+ htzje: 'amountRange',
104
+ syhhr: 'text',
105
+ },
106
+ };
107
+ /** 台账页路由(组件说明:src 为 <origin>/sp/contract/ledger)。 */
108
+ const LEDGER_ROUTE = '/sp/contract/ledger';
109
+ const DATE_TEXT = /^\d{4}-\d{2}-\d{2}$/u;
110
+ const AMOUNT_TEXT = /^-?\d+(\.\d+)?$/u;
47
111
  const FIELD_KEY = /^field_\d+$/u;
48
112
  const PAGE_ID = /^\d{6,}$/u;
49
113
  const ORIGIN = /^https?:\/\/[^/]+$/u;
@@ -198,6 +262,167 @@ function buildCard(pageId, origin, title, callId, comParams) {
198
262
  },
199
263
  };
200
264
  }
265
+ /**
266
+ * 解析台账页 filters(来源:组件说明「默认筛选」)。
267
+ *
268
+ * 键是台账键(如 khmc / qdrq / htzje),不是 `field_<字段id>`;
269
+ * 日期区间与金额区间写两元素数组,只限一端时另一端传空串。
270
+ */
271
+ function parseLedgerFilters(pairs, rawJson, viewKey) {
272
+ const allowed = LEDGER_FILTER_KINDS[viewKey] ?? {};
273
+ const pairList = Array.isArray(pairs) ? pairs : [];
274
+ const jsonText = typeof rawJson === 'string' && rawJson.trim() ? rawJson : '';
275
+ if (pairList.length && jsonText) {
276
+ throw contractValidationError('com_params_conflict', 'comParamPairs 与 comParamsJson 只能二选一');
277
+ }
278
+ const merged = {};
279
+ if (jsonText) {
280
+ let parsed;
281
+ try {
282
+ parsed = JSON.parse(jsonText);
283
+ }
284
+ catch (error) {
285
+ const message = error instanceof Error ? error.message : String(error);
286
+ throw contractValidationError('com_params_invalid', `comParamsJson 不是合法 JSON:${message}`);
287
+ }
288
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
289
+ throw contractValidationError('com_params_invalid', 'comParamsJson 必须是对象');
290
+ }
291
+ Object.assign(merged, parsed);
292
+ }
293
+ for (const item of pairList) {
294
+ const text = typeof item === 'string' ? item : pyStr(item);
295
+ const index = text.indexOf('=');
296
+ if (index < 0) {
297
+ throw contractValidationError('com_param_invalid', `comParamPairs 需要 key=value,收到 ${pyReprText(item)}`);
298
+ }
299
+ merged[text.slice(0, index).trim()] = text.slice(index + 1);
300
+ }
301
+ const out = {};
302
+ for (const [key, raw] of Object.entries(merged)) {
303
+ const kind = allowed[key];
304
+ if (!kind) {
305
+ throw contractValidationError('ledger_filter_key_invalid', `台账标签 ${viewKey} 没有筛选键 ${pyReprText(key)},可用:${Object.keys(allowed).join('、')}`);
306
+ }
307
+ if (kind === 'dateRange' || kind === 'amountRange') {
308
+ if (!Array.isArray(raw) || raw.length !== 2) {
309
+ throw contractValidationError('ledger_filter_range_invalid', `${key} 需要 [起点, 终点] 两元素数组;只限一端时另一端传空串。`);
310
+ }
311
+ const bounds = raw.map((item) => (typeof item === 'string' ? item.trim() : pyStr(item)));
312
+ for (const bound of bounds) {
313
+ if (!bound)
314
+ continue;
315
+ if (kind === 'dateRange' && !DATE_TEXT.test(bound)) {
316
+ throw contractValidationError('ledger_filter_date_invalid', `${key} 的日期应为 YYYY-MM-DD,收到 ${bound}`);
317
+ }
318
+ if (kind === 'amountRange' && !AMOUNT_TEXT.test(bound)) {
319
+ throw contractValidationError('ledger_filter_amount_invalid', `${key} 的金额应以元为单位的纯数字,收到 ${bound}`);
320
+ }
321
+ }
322
+ out[key] = bounds;
323
+ continue;
324
+ }
325
+ if (Array.isArray(raw) || (raw !== null && typeof raw === 'object')) {
326
+ throw contractValidationError('ledger_filter_value_invalid', `${key} 需要一个字符串值。`);
327
+ }
328
+ const text = raw === null || raw === undefined ? '' : typeof raw === 'string' ? raw.trim() : pyStr(raw);
329
+ if (kind === 'date' && text && !DATE_TEXT.test(text)) {
330
+ throw contractValidationError('ledger_filter_date_invalid', `${key} 的日期应为 YYYY-MM-DD,收到 ${text}`);
331
+ }
332
+ out[key] = text;
333
+ }
334
+ return out;
335
+ }
336
+ /** 台账页组件卡:fill_form + e10 + @weapp/contract 的 LedgerPage,viewKey 决定默认标签。 */
337
+ function buildLedgerCard(viewKey, origin, title, callId, filters) {
338
+ return {
339
+ version: 1,
340
+ callId,
341
+ toolId: 'fill_form',
342
+ arguments: {
343
+ type: 'e10',
344
+ title,
345
+ src: `${origin}${LEDGER_ROUTE}`,
346
+ width: 1300,
347
+ sdkRenderType: 'inline',
348
+ sdkOptions: {
349
+ compName: 'ui.CorsComponent',
350
+ routerType: 'MemoryRouter',
351
+ routerProps_pc: { initialEntries: [LEDGER_ROUTE] },
352
+ params_pc: {
353
+ app: '@weapp/contract',
354
+ compName: 'LedgerPage',
355
+ },
356
+ params: {
357
+ viewKey,
358
+ filters: { [viewKey]: filters },
359
+ },
360
+ },
361
+ },
362
+ };
363
+ }
364
+ /** 台账页卡的逐项自检;空数组即通过。 */
365
+ function selfCheckLedger(card, viewKey) {
366
+ const bad = [];
367
+ const args = card.arguments ?? {};
368
+ const options = args.sdkOptions ?? {};
369
+ const pc = options.params_pc ?? {};
370
+ const params = options.params ?? {};
371
+ const routerPc = options.routerProps_pc ?? {};
372
+ if (card.version !== 1)
373
+ bad.push('version != 1');
374
+ if (card.toolId !== 'fill_form')
375
+ bad.push('toolId != fill_form');
376
+ if (!card.callId)
377
+ bad.push('callId 为空');
378
+ if (args.type !== 'e10')
379
+ bad.push('arguments.type != e10');
380
+ if (args.sdkRenderType !== 'inline')
381
+ bad.push('sdkRenderType != inline');
382
+ if (!String(args.src ?? '').endsWith(LEDGER_ROUTE))
383
+ bad.push('src 与台账路由不一致');
384
+ if (args.width !== 1300)
385
+ bad.push('width 应为 1300');
386
+ if (options.compName !== 'ui.CorsComponent')
387
+ bad.push('sdkOptions.compName != ui.CorsComponent');
388
+ if (options.routerType !== 'MemoryRouter')
389
+ bad.push('routerType != MemoryRouter');
390
+ if (!Array.isArray(routerPc.initialEntries) || routerPc.initialEntries[0] !== LEDGER_ROUTE) {
391
+ bad.push('initialEntries 不是台账路由');
392
+ }
393
+ if (pc.app !== '@weapp/contract' || pc.compName !== 'LedgerPage')
394
+ bad.push('params_pc 不是 @weapp/contract LedgerPage');
395
+ if (params.viewKey !== viewKey)
396
+ bad.push('params.viewKey 与菜单映射不一致');
397
+ const filters = params.filters;
398
+ if (!filters || typeof filters !== 'object' || Array.isArray(filters)) {
399
+ bad.push('params.filters 不是对象');
400
+ return bad;
401
+ }
402
+ const outerKeys = Object.keys(filters);
403
+ if (outerKeys.length !== 1 || outerKeys[0] !== viewKey)
404
+ bad.push('filters 第一层 key 必须是 viewKey');
405
+ const inner = filters[viewKey];
406
+ if (!inner || typeof inner !== 'object' || Array.isArray(inner)) {
407
+ bad.push('filters[viewKey] 不是对象');
408
+ return bad;
409
+ }
410
+ const allowed = LEDGER_FILTER_KINDS[viewKey] ?? {};
411
+ for (const [key, value] of Object.entries(inner)) {
412
+ const kind = allowed[key];
413
+ if (!kind)
414
+ bad.push(`filters 键不在 ${viewKey} 白名单:${key}`);
415
+ if (kind === 'dateRange' || kind === 'amountRange') {
416
+ if (!Array.isArray(value) || value.length !== 2 || value.some((item) => typeof item !== 'string')) {
417
+ bad.push(`filters 区间不是两段字符串:${key}`);
418
+ }
419
+ }
420
+ else if (typeof value !== 'string') {
421
+ bad.push(`filters 值不是字符串:${key}`);
422
+ }
423
+ }
424
+ return bad;
425
+ }
201
426
  /** 按 validate 的 ebdf 分支逐项核对,返回问题列表(空数组即通过)。 */
202
427
  function selfCheck(card, pageId) {
203
428
  const bad = [];
@@ -279,13 +504,44 @@ export const contractCardEbdfListOperation = {
279
504
  pageId = resolved.pageId;
280
505
  }
281
506
  const origin = cleanOrigin(input.origin);
282
- const comParams = parseComParams(input.comParamPairs, input.comParamsJson);
507
+ const viewKey = LEDGER_VIEW_KEYS.get(menu);
283
508
  const titleInput = stripOrEmpty(input.title);
284
509
  const title = titleInput || menu;
285
510
  if (!title)
286
511
  throw contractValidationError('title_required', 'title 不能为空');
287
512
  const callIdInput = stripOrEmpty(input.callId);
288
- const callId = callIdInput || `ebdf-list-${menu}-${stampNow()}-01`;
513
+ const callId = callIdInput
514
+ || `${viewKey ? 'ledger' : 'ebdf-list'}-${menu}-${stampNow()}-01`;
515
+ if (viewKey) {
516
+ const filters = parseLedgerFilters(input.comParamPairs, input.comParamsJson, viewKey);
517
+ const card = buildLedgerCard(viewKey, origin, title, callId, filters);
518
+ const problems = selfCheckLedger(card, viewKey);
519
+ if (problems.length) {
520
+ throw contractValidationError('self_check_failed', `台账页卡自检未通过:${problems.join(';')}`);
521
+ }
522
+ let output;
523
+ if (typeof input.out === 'string' && input.out.trim()) {
524
+ output = resolve(input.out.trim());
525
+ mkdirSync(dirname(output), { recursive: true });
526
+ writeFileSync(output, `${JSON.stringify(card, null, 2)}\n`, 'utf8');
527
+ }
528
+ return {
529
+ status: 'COMPLETE',
530
+ data: {
531
+ menu,
532
+ pageId,
533
+ variant: 'ledger',
534
+ viewKey,
535
+ callId,
536
+ filters,
537
+ card,
538
+ selfCheck: problems,
539
+ ...(output ? { output } : {}),
540
+ note: '台账页卡:viewKey 决定默认标签,filters 第一层 key 就是 viewKey;渠道订单默认 e-teams(etOrder)',
541
+ },
542
+ };
543
+ }
544
+ const comParams = parseComParams(input.comParamPairs, input.comParamsJson);
289
545
  const card = buildCard(pageId, origin, title, callId, comParams);
290
546
  const problems = selfCheck(card, pageId);
291
547
  if (problems.length) {
@@ -1,6 +1,7 @@
1
1
  import { readFileSync, writeFileSync } from 'node:fs';
2
2
  import { basename, resolve } from 'node:path';
3
3
  import { contractValidationError } from '../errors.js';
4
+ import { CARD_PANEL_WIDTH } from './card-action.js';
4
5
  import { requireNonEmptyString } from './shared.js';
5
6
  import { renderSummaryHtml } from './summary.js';
6
7
  /**
@@ -36,7 +37,7 @@ try{cards=JSON.parse(cb?cb.value:'[]');}catch(e){cards=[];}
36
37
  var ICON={send:'&#128231;',shield:'&#128737;',search:'&#128269;',doc:'&#128203;',compare:'&#128260;',calc:'&#128202;',link:'&#128279;'};
37
38
  function run(c){
38
39
  var a=c.action||{};
39
- if(a.type==='sendQuestion'){
40
+ if('sendQuestion'.indexOf(a.type)>-1){
40
41
  var ps=plug();
41
42
  if(!ps||!ps.session||typeof ps.session.sendQuestion!=='function'){say('当前环境不支持发送会话消息');return;}
42
43
  try{ps.session.sendQuestion({question:a.question||c.title||'',files:[]});say('已发送,正在处理');}
@@ -46,14 +47,14 @@ function run(c){
46
47
  var p=plug();
47
48
  if(!p||!p.rightPanel||typeof p.rightPanel.open!=='function'){say('当前环境没有小e右侧面板');return;}
48
49
  var cfg={};
49
- if(a.type==='e10Sdk'){
50
+ if('e10Sdk'.indexOf(a.type)>-1){
50
51
  var prm={app:a.app,compName:a.comp};
51
52
  if(a.companyName){prm.companyName=a.companyName;}
52
53
  if(a.customParams){prm.customParams=a.customParams;}
53
54
  cfg.type='e10Sdk';
54
- cfg.width=a.width||1300;
55
+ cfg.width=a.width||${CARD_PANEL_WIDTH};
55
56
  cfg.contentProps={src:a.src,sdkOptions:{compName:'ui.CorsComponent',routerType:'MemoryRouter',routerProps:{initialEntries:a.entries},params:prm}};
56
- }else if(a.type==='artifact'){
57
+ }else if('artifact'.indexOf(a.type)>-1){
57
58
  var sb=root.querySelector('[data-summary]');
58
59
  var h=sb?sb.value:'';
59
60
  if(!h){say('摘要内容为空');return;}
@@ -168,7 +169,7 @@ export const contractCardOperations = [
168
169
  const uid = typeof data.id === 'string' && data.id.trim() ? data.id.trim() : makeUid();
169
170
  const hint = typeof data.hint === 'string' ? data.hint.trim() : '';
170
171
  const title = typeof data.title === 'string' && data.title.trim() ? data.title.trim() : '可执行操作';
171
- const width = typeof data.width === 'number' && data.width > 0 ? data.width : 1300;
172
+ const width = typeof data.width === 'number' && data.width > 0 ? data.width : CARD_PANEL_WIDTH;
172
173
  const cardsJson = JSON.stringify(cards);
173
174
  const script = CARD_SCRIPT.replace(/__UID__/gu, uid);
174
175
  const parts = [];