@yoooloo42/joker 1.0.229 → 1.0.230

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/dist/index.cjs.js CHANGED
@@ -42002,21 +42002,6 @@ const scopeThis_box = props.scopeThis;
42002
42002
  tableProps_box.table.pickCol.colsInit = unclassified.deepClone.deepClone(tableProps_box.table.cols);
42003
42003
 
42004
42004
  const hdl = {
42005
- async pageSizeChange(pageSize) {
42006
- // 页记录数改变
42007
- tableData_box.pageSize = pageSize;
42008
- tableData_box.currentPage = 1;
42009
- if(tableProps_box.table.hdlPageSizeChange){
42010
- await tableProps_box.table.hdlPageSizeChange({pageSize, scopeThis: scopeThis_box});
42011
- }
42012
- },
42013
- async currentPageChange(currentPage) {
42014
- // 当前页码改变
42015
- tableData_box.currentPage = currentPage;
42016
- if(tableProps_box.table.hdlCurrentPageChange){
42017
- await tableProps_box.table.hdlCurrentPageChange({currentPage, scopeThis: scopeThis_box});
42018
- }
42019
- },
42020
42005
  cellMouseEnter(row, column, cell, event) {
42021
42006
  // 当单元格hover进入时会触发该事件
42022
42007
  if (tableProps_box.table.hdlCellMouseEnter) {
@@ -42030,38 +42015,6 @@ const hdl = {
42030
42015
  tableProps_box.table.cellTooltip = [];
42031
42016
  }
42032
42017
  },
42033
- rowClick(row, column, event) {
42034
- // 当某一行被点击时会触发该事件
42035
- if (tableProps_box.table.hdlRowClick) {
42036
- tableProps_box.table.hdlRowClick({scopeThis: scopeThis_box, inherit: {
42037
- row,
42038
- column,
42039
- event
42040
- }});
42041
- }
42042
- },
42043
- selectionChange(selection) {
42044
- // 当选择项发生变化时会触发该事件
42045
- if (tableProps_box.table.hdlSelectionChange) {
42046
- tableProps_box.table.hdlSelectionChange({scopeThis: scopeThis_box, inherit: {
42047
- selection
42048
- }});
42049
- }
42050
- },
42051
- sortChange(para) {
42052
- // 当表格的排序条件发生变化的时候会触发该事件,一般用于远程排序
42053
- // para.column
42054
- // para.prop
42055
- // para.order
42056
-
42057
- if (tableProps_box.table.hdlSortChange) {
42058
- tableProps_box.table.hdlSortChange({scopeThis: scopeThis_box, inherit: {
42059
- column: para.column,
42060
- prop: para.prop,
42061
- order: para.order,
42062
- }});
42063
- }
42064
- },
42065
42018
  cellMouseover({col, row}) {
42066
42019
  if (col.hdlMouseover) {
42067
42020
  col.hdlMouseover({scopeThis: scopeThis_box, row, col});
@@ -42069,6 +42022,13 @@ const hdl = {
42069
42022
  tableProps_box.table.cellTooltip = [];
42070
42023
  }
42071
42024
  },
42025
+ async currentPageChange(currentPage) {
42026
+ // 当前页码改变
42027
+ tableData_box.currentPage = currentPage;
42028
+ if(tableProps_box.table.hdlCurrentPageChange){
42029
+ await tableProps_box.table.hdlCurrentPageChange({currentPage, scopeThis: scopeThis_box});
42030
+ }
42031
+ },
42072
42032
  download({row, col}) {
42073
42033
  if(!col.hdlGetSrc){
42074
42034
  return {
@@ -42091,6 +42051,53 @@ const hdl = {
42091
42051
  fileName: src ? fileName : tableProps_box.table.colShow.download.fileName
42092
42052
  }
42093
42053
  },
42054
+ getImageSrc({row, col}){
42055
+ if(row[col.fieldName] && row[col.fieldName].length > 0){
42056
+ return row[col.fieldName][0] || ''
42057
+ }else {
42058
+ return ''
42059
+ }
42060
+ },
42061
+ async pageSizeChange(pageSize) {
42062
+ // 页记录数改变
42063
+ tableData_box.pageSize = pageSize;
42064
+ tableData_box.currentPage = 1;
42065
+ if(tableProps_box.table.hdlPageSizeChange){
42066
+ await tableProps_box.table.hdlPageSizeChange({pageSize, scopeThis: scopeThis_box});
42067
+ }
42068
+ },
42069
+ rowClick(row, column, event) {
42070
+ // 当某一行被点击时会触发该事件
42071
+ if (tableProps_box.table.hdlRowClick) {
42072
+ tableProps_box.table.hdlRowClick({scopeThis: scopeThis_box, inherit: {
42073
+ row,
42074
+ column,
42075
+ event
42076
+ }});
42077
+ }
42078
+ },
42079
+ selectionChange(selection) {
42080
+ // 当选择项发生变化时会触发该事件
42081
+ if (tableProps_box.table.hdlSelectionChange) {
42082
+ tableProps_box.table.hdlSelectionChange({scopeThis: scopeThis_box, inherit: {
42083
+ selection
42084
+ }});
42085
+ }
42086
+ },
42087
+ sortChange(para) {
42088
+ // 当表格的排序条件发生变化的时候会触发该事件,一般用于远程排序
42089
+ // para.column
42090
+ // para.prop
42091
+ // para.order
42092
+
42093
+ if (tableProps_box.table.hdlSortChange) {
42094
+ tableProps_box.table.hdlSortChange({scopeThis: scopeThis_box, inherit: {
42095
+ column: para.column,
42096
+ prop: para.prop,
42097
+ order: para.order,
42098
+ }});
42099
+ }
42100
+ },
42094
42101
  };
42095
42102
 
42096
42103
  const style = {
@@ -42352,8 +42359,8 @@ return (_ctx, _cache) => {
42352
42359
  ? (vue.openBlock(), vue.createBlock(_component_el_image, {
42353
42360
  key: 5,
42354
42361
  style: vue.normalizeStyle(style.cell.image({col})),
42355
- src: scope.row[col.fieldName][0] || '',
42356
- "preview-src-list": scope.row[col.fieldName] || [''],
42362
+ src: hdl.getImageSrc({row: scope.row, col}),
42363
+ "preview-src-list": [hdl.getImageSrc({row: scope.row, col})],
42357
42364
  "preview-teleported": true,
42358
42365
  "hide-on-click-modal": true
42359
42366
  }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"]))