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.
- package/le-home/src/main.vue +2 -2
- package/le-list/src/main.vue +22 -0
- package/package.json +1 -1
package/le-home/src/main.vue
CHANGED
|
@@ -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="
|
|
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="
|
|
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">
|
package/le-list/src/main.vue
CHANGED
|
@@ -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>
|