@leevan/jtui 2.0.54-beta.7 → 2.0.55

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leevan/jtui",
3
- "version": "2.0.54-beta.7",
3
+ "version": "2.0.55",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1669,35 +1669,24 @@ export default {
1669
1669
  },
1670
1670
  // 初始化所有行的字段,确保每个行对象都有所有表头字段
1671
1671
  initRowFields(dataArray) {
1672
- console.log('=== initRowFields 开始执行 ===');
1673
1672
  const rows = dataArray || this.data?.DataArray;
1674
- console.log('传入的 dataArray:', dataArray);
1675
- console.log('使用的 rows:', rows);
1676
1673
  if (!rows || !rows.length || !this.data?.retjson?.header) {
1677
- console.log('数据不完整,跳过初始化');
1678
1674
  return;
1679
1675
  }
1680
1676
  const fields = this.getAllHeaderFields(this.data.retjson.header);
1681
- console.log('收集到的表头字段:', fields);
1682
- console.log('初始化前的第一行数据:', rows[0]);
1683
1677
  // 递归处理行(包括树形结构的子节点)
1684
- const processRow = (row, rowIndex) => {
1685
- console.log(`处理第 ${rowIndex} 行,处理前:`, { ...row });
1678
+ const processRow = (row) => {
1686
1679
  fields.forEach(field => {
1687
1680
  if (!(field in row)) {
1688
- console.log(` 字段 ${field} 不存在,用 $set 添加`);
1689
1681
  this.$set(row, field, '');
1690
1682
  }
1691
1683
  });
1692
- console.log(` 处理后:`, { ...row });
1693
1684
  // 处理子节点
1694
1685
  if (row.children && row.children.length) {
1695
- row.children.forEach((child, idx) => processRow(child, `${rowIndex}-${idx}`));
1686
+ row.children.forEach(child => processRow(child));
1696
1687
  }
1697
1688
  };
1698
- rows.forEach((row, idx) => processRow(row, idx));
1699
- console.log('初始化后的第一行数据:', rows[0]);
1700
- console.log('=== initRowFields 执行完成 ===');
1689
+ rows.forEach(row => processRow(row));
1701
1690
  },
1702
1691
  },
1703
1692
  };