leisure-core 0.6.35 → 0.6.37

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.
@@ -2,14 +2,14 @@
2
2
  <el-container class="le-home-cp-container">
3
3
  <el-header class="header">
4
4
  <el-row>
5
- <el-col :span="18" class="leftsection">
5
+ <el-col :span="14" class="leftsection">
6
6
  <div class="grid-content bg-purple">
7
7
  <span class="userinfo-inner" @click="clickLeftTop">{{
8
8
  companyInfo.name
9
9
  }}</span>
10
10
  </div>
11
11
  </el-col>
12
- <el-col :span="6" class="rightsection">
12
+ <el-col :span="10" class="rightsection">
13
13
  <div class="grid-content bg-purple-light">
14
14
  <slot name="rightComment"> </slot>
15
15
  <el-dropdown size="medium" trigger="click" @command="handleCommand">
@@ -30,6 +30,7 @@
30
30
  style="width: 100%"
31
31
  reserve-selection
32
32
  @selection-change="handleSelectionChange"
33
+ @cell-click="handleCellClick"
33
34
  >
34
35
  <el-table-column type="selection" v-if="showChecked" width="55" />
35
36
  <el-table-column
@@ -468,6 +469,27 @@ export default {
468
469
 
469
470
  return config;
470
471
  },
472
+ /**
473
+ * 处理单元格点击
474
+ * @param {Object} row 行数据
475
+ * @param {Object} column 列配置
476
+ * @param {HTMLElement} cell 单元格元素
477
+ * @param {Event} event 原生事件对象
478
+ */
479
+ handleCellClick(row, column, cell, event) {
480
+ // 查找当前点击列对应的列配置
481
+ const colConfig = this.tableColumns.find(
482
+ (col) => col.prop === column.property,
483
+ );
484
+
485
+ // 如果列配置中定义了 cellClick 回调,则执行
486
+ if (colConfig && typeof colConfig.cellClick === "function") {
487
+ colConfig.cellClick({ row, column, cell, event });
488
+ }
489
+
490
+ // 向上抛出统一事件,供父组件监听
491
+ this.$emit("cell-click", { row, column, cell, event });
492
+ },
471
493
  },
472
494
  };
473
495
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leisure-core",
3
- "version": "0.6.35",
3
+ "version": "0.6.37",
4
4
  "description": "leisure-core是京心数据基于vue2.x开发的一套后台管理系统桌面端组件库,封装了大量实用的UI控件模板,非常方便开发者快速搭建前端应用",
5
5
  "private": false,
6
6
  "author": "北方乐逍遥(zcx7878)",