jtxa-ui 1.1.2 → 1.1.4

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/README.md CHANGED
@@ -26,6 +26,7 @@
26
26
  - [TableBigData 大数据表](#8-tablebigdata-大数据增量表-table-big-data)
27
27
  - [TreeTable 虚拟树表](#9-treetable-虚拟树表-tree-table)
28
28
  - [共享表格属性 publicProps](#共享表格属性-publicprops)
29
+ - [渲染器清单(cellRender / editRender)](#渲染器清单cellrender--editrender)
29
30
  - [工具函数](#工具函数)
30
31
  - [已知问题与注意事项](#已知问题与注意事项)
31
32
  - [相关文档](#相关文档)
@@ -152,6 +153,22 @@ app.use(TreeTable)
152
153
 
153
154
  **Events**:`switchChange` · `focus` · `blur` · `casChange` · `cusBtn`
154
155
 
156
+ **`rules` 字符串语法**:`rules` 为对象,`key` 是 `modelKey`,`value` 是规则字符串数组,由内置 `Validate`(`packages/form/validate.js`)转换为 Element Plus 规则:
157
+
158
+ ```js
159
+ const rules = {
160
+ name: ['required', 'phone'], // 必填 + 手机号
161
+ age: ['num'], // 必须是数字
162
+ email: ['email'], // 邮箱格式
163
+ code: ['idCard'], // 身份证
164
+ remark: ['range-2-10'], // 长度 2~10(用 “-” 传参)
165
+ ename: ['letters'], // 仅英文字母
166
+ tags: ['requireSelect'], // 至少选一个(数组)
167
+ }
168
+ ```
169
+
170
+ 内置校验类型:`required` · `requiredFocus` · `range-min-max` · `len-n` · `num` · `email` · `idCard` · `phone` · `letters` · `requireAll` · `requireSelect`。
171
+
155
172
  **Slots**:
156
173
 
157
174
  - `upload`:当字段 `type: 'upload'` 时,使用 `item.slotName`(默认 `upload`)具名插槽渲染上传区;
@@ -349,6 +366,24 @@ const conditions = searchTypeRef.value.getData()
349
366
  | `isLastLoad` | Boolean | `true` | 是否末次加载 |
350
367
  | `slotConfig` | Array | `[]` | 自定义插槽组件配置(传入业务子组件) |
351
368
 
369
+ **`mode` 与面板组件映射**:`mode`(或 `pageMode`)决定渲染哪种版式,内部按值派发到 `mtt-panel-*` 子组件:
370
+
371
+ | mode | 面板组件 | 版式形态 |
372
+ | --- | --- | --- |
373
+ | `0` | `jt-page-manager-tree-table` | 默认树表 |
374
+ | `1` | `mtt-panel` | 左右看板 |
375
+ | `2` | `mtt-panel-1` | 上下看板 |
376
+ | `3` | `mtt-panel-2` | 展开形式看板 |
377
+ | `5` | `mtt-panel-5` | 左侧 Tab + 右侧 tree-list |
378
+ | `7` | `mtt-panel-7` | 左侧树 + 右侧普通清单 |
379
+ | `8` | `mtt-panel-8` | 左侧 Tab + 右侧分组表格 |
380
+ | `10` | `mtt-panel-10` | 左侧 Tab + 右侧 TreeTable |
381
+ | `11` | `mtt-panel-11` | 左侧 Tab + 右侧 TreeTable(变体) |
382
+ | `12` | `mtt-panel-12` | 左侧 Tab + 右侧 TreeTable(变体) |
383
+ | `13` | `mtt-panel-13` | 左侧 Tab + 右侧 TreeTable(变体) |
384
+
385
+ > `mode` 还可由 `config.radioData` 中某项 `style` 字段在运行时切换(见 `radioChange`)。
386
+
352
387
  **Events**:`getBaseParams`
353
388
 
354
389
  **Slots**:透传父级所有插槽;向面板透传 `#cusComp`。
@@ -621,6 +656,35 @@ VxeTable 基础封装:工具栏、表尾统计、虚拟滚动、单选 / 多
621
656
 
622
657
  ---
623
658
 
659
+ ## 渲染器清单(cellRender / editRender)
660
+
661
+ 表格列通过 `header[].cellRender` / `header[].editRender` 指定渲染器名称,对应 `packages/tables/hooks/cell-render/cell-render.js` 与 `edit-render/edit-render.js` 中 `VxeUI.renderer.add(...)` 的注册名。
662
+
663
+ **单元格渲染器(cellRender)**
664
+
665
+ | 名称 | 说明 |
666
+ | --- | --- |
667
+ | `TabsBtn` | 单元格内按钮组 |
668
+ | `TabsCheckbox` | 单元格内复选框组 |
669
+ | `TabsSwitch` | 单元格内开关 |
670
+ | `Select` | 单元格内下拉(表单型,由 `CellForm` 承载) |
671
+ | `Input` | 单元格内输入框(表单型) |
672
+ | `Number` | 单元格内数字输入(表单型) |
673
+ | `Rate` | 单元格内评分(表单型) |
674
+
675
+ > `Select` / `Input` / `Number` / `Rate` 共用 `CellForm`,通过列配置 `props`(枚举 `enum`、功能码 `funcode`、占位 `placeholder`、最大值 `max` 等)区分形态。
676
+
677
+ **编辑渲染器(editRender,双击进入编辑态时生效)**
678
+
679
+ | 名称 | 说明 |
680
+ | --- | --- |
681
+ | `cascader` | 级联选择器 |
682
+ | `cascader-select` | 级联 + 选择组合 |
683
+ | `cus-select` | 自定义下拉 |
684
+ | `cus-input` | 自定义输入 |
685
+
686
+ ---
687
+
624
688
  ## 工具函数
625
689
 
626
690
  随默认导出(`import jtui from 'jtxa-ui'`)一并暴露的工具方法:
@@ -530,6 +530,7 @@ var q0 = {
530
530
  confirm: "确定",
531
531
  dateTablePrompt: "使用方向键与 Enter 键可选择日期",
532
532
  monthTablePrompt: "使用方向键与 Enter 键可选择月份",
533
+ quarterTablePrompt: "使用方向键与 Enter 键可选择季度",
533
534
  yearTablePrompt: "使用方向键与 Enter 键可选择年份",
534
535
  selectedDate: "已选日期",
535
536
  selectDate: "选择日期",
@@ -588,6 +589,7 @@ var q0 = {
588
589
  dec: "十二月"
589
590
  }
590
591
  },
592
+ input: { characters: "{count} / {max} 个字符" },
591
593
  inputNumber: {
592
594
  decrease: "减少数值",
593
595
  increase: "增加数值"
@@ -6889,7 +6891,7 @@ const wo = {
6889
6891
  },
6890
6892
  setup(e, { expose: t }) {
6891
6893
  const o = H0(
6892
- () => import("./jt-form-mttable-pc-CqhpW1pK.js")
6894
+ () => import("./jt-form-mttable-pc-DwGVT-dw.js")
6893
6895
  ), n = e, { page: r, form: l } = n, a = ye(), c = ln(r), i = c.formtype === "jt-form-mttable-pc";
6894
6896
  if (!i && c.formConfig && c.formConfig.length) {
6895
6897
  const x = c.formConfig.filter((I) => I.type !== "empty"), k = sessionStorage.getItem("active_row");
@@ -13286,7 +13288,7 @@ const FL = {
13286
13288
  emits: ["updateQueryParams"],
13287
13289
  setup(e, { expose: t, emit: o }) {
13288
13290
  const n = H0(
13289
- () => import("./jt-form-mttable-pc-CqhpW1pK.js")
13291
+ () => import("./jt-form-mttable-pc-DwGVT-dw.js")
13290
13292
  ), r = e, l = o, {
13291
13293
  tableData: a,
13292
13294
  retjson: c,
@@ -21569,9 +21571,9 @@ const Jd = /* @__PURE__ */ _n(ry, [["render", f2], ["__scopeId", "data-v-ef6a423
21569
21571
  }
21570
21572
  }, QE = () => {
21571
21573
  wu((e) => ({
21572
- v8f657d10: e.stripeBg,
21573
- v0ad533b8: e.headerBg,
21574
- f88ad750: e.currentBg
21574
+ v94adfa6a: e.stripeBg,
21575
+ v0830f50b: e.headerBg,
21576
+ v31d6fd65: e.currentBg
21575
21577
  }));
21576
21578
  }, eS = ay.setup;
21577
21579
  ay.setup = eS ? (e, t) => (QE(), eS(e, t)) : QE;
@@ -21615,6 +21617,7 @@ function b2(e, t, o, n, r, l) {
21615
21617
  iconClose: "jtIcon iconjia1 jt-iconClose",
21616
21618
  loadMethod: n.loadChildrenMethod,
21617
21619
  line: o.isLine,
21620
+ showLine: o.isLine,
21618
21621
  accordion: o.isAccordion
21619
21622
  },
21620
21623
  "show-header": o.mode != "tree",
@@ -21753,7 +21756,7 @@ function b2(e, t, o, n, r, l) {
21753
21756
  }, 16, ["class", "sort-config", "data", "tree-config", "show-header", "onCheckboxChange", "onCheckboxAll", "onRadioChange", "onCellClick", "onKeydown"])
21754
21757
  ]);
21755
21758
  }
21756
- const Zd = /* @__PURE__ */ _n(ay, [["render", b2], ["__scopeId", "data-v-788f5b0d"]]), y2 = "4.4.20", Ts = {
21759
+ const Zd = /* @__PURE__ */ _n(ay, [["render", b2], ["__scopeId", "data-v-167dc961"]]), y2 = "4.4.21", Ts = {
21757
21760
  coreVersion: y2,
21758
21761
  uiVersion: "",
21759
21762
  tableVersion: "",
@@ -21904,7 +21907,7 @@ function PD(e) {
21904
21907
  function w2() {
21905
21908
  return Wl;
21906
21909
  }
21907
- var AD = "4.0.12";
21910
+ var AD = "4.0.13";
21908
21911
  In.VERSION = AD;
21909
21912
  In.version = AD;
21910
21913
  In.mixin = x2;
@@ -24022,7 +24025,7 @@ function Hv(e, t) {
24022
24025
  return console[e](r), r;
24023
24026
  };
24024
24027
  }
24025
- const RS = "4.4.20", ea = {
24028
+ const RS = "4.4.21", ea = {
24026
24029
  create: Hv,
24027
24030
  warn: Hv("warn", `v${RS}`),
24028
24031
  err: Hv("error", `v${RS}`)
@@ -1,5 +1,5 @@
1
1
  import { defineAsyncComponent as d, ref as r, onMounted as u, onActivated as s, openBlock as f, createElementBlock as g, createVNode as p, unref as b, createCommentVNode as v } from "vue";
2
- import { _ as y } from "./index-DZ6TkCDC.js";
2
+ import { _ as y } from "./index-Bi8Xc3Gh.js";
3
3
  const h = {
4
4
  key: 0,
5
5
  class: "jt-form-mttable-pc"
@@ -18,7 +18,7 @@ const h = {
18
18
  emits: ["update:modelValue"],
19
19
  setup(e, { expose: m, emit: x }) {
20
20
  const c = d({
21
- loader: () => import("./index-DZ6TkCDC.js").then((n) => n.a),
21
+ loader: () => import("./index-Bi8Xc3Gh.js").then((n) => n.a),
22
22
  loadingComponent: {
23
23
  template: '<div class="mtt-loading">组件加载中...</div>'
24
24
  },