@yoooloo42/joker 1.0.228 → 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
@@ -22950,7 +22950,6 @@ const submitInsertOne = async _ref10 => {
22950
22950
  cancelButtonText: '取消',
22951
22951
  type: 'warning' // 警告图标
22952
22952
  });
22953
- console.log('测试 222 提交', scopeThis.formData);
22954
22953
  const result = await ly0request$1.storpro({
22955
22954
  storproName: scopeThis.storpro.insertOne,
22956
22955
  data: scopeThis.formData,
@@ -42003,21 +42002,6 @@ const scopeThis_box = props.scopeThis;
42003
42002
  tableProps_box.table.pickCol.colsInit = unclassified.deepClone.deepClone(tableProps_box.table.cols);
42004
42003
 
42005
42004
  const hdl = {
42006
- async pageSizeChange(pageSize) {
42007
- // 页记录数改变
42008
- tableData_box.pageSize = pageSize;
42009
- tableData_box.currentPage = 1;
42010
- if(tableProps_box.table.hdlPageSizeChange){
42011
- await tableProps_box.table.hdlPageSizeChange({pageSize, scopeThis: scopeThis_box});
42012
- }
42013
- },
42014
- async currentPageChange(currentPage) {
42015
- // 当前页码改变
42016
- tableData_box.currentPage = currentPage;
42017
- if(tableProps_box.table.hdlCurrentPageChange){
42018
- await tableProps_box.table.hdlCurrentPageChange({currentPage, scopeThis: scopeThis_box});
42019
- }
42020
- },
42021
42005
  cellMouseEnter(row, column, cell, event) {
42022
42006
  // 当单元格hover进入时会触发该事件
42023
42007
  if (tableProps_box.table.hdlCellMouseEnter) {
@@ -42031,38 +42015,6 @@ const hdl = {
42031
42015
  tableProps_box.table.cellTooltip = [];
42032
42016
  }
42033
42017
  },
42034
- rowClick(row, column, event) {
42035
- // 当某一行被点击时会触发该事件
42036
- if (tableProps_box.table.hdlRowClick) {
42037
- tableProps_box.table.hdlRowClick({scopeThis: scopeThis_box, inherit: {
42038
- row,
42039
- column,
42040
- event
42041
- }});
42042
- }
42043
- },
42044
- selectionChange(selection) {
42045
- // 当选择项发生变化时会触发该事件
42046
- if (tableProps_box.table.hdlSelectionChange) {
42047
- tableProps_box.table.hdlSelectionChange({scopeThis: scopeThis_box, inherit: {
42048
- selection
42049
- }});
42050
- }
42051
- },
42052
- sortChange(para) {
42053
- // 当表格的排序条件发生变化的时候会触发该事件,一般用于远程排序
42054
- // para.column
42055
- // para.prop
42056
- // para.order
42057
-
42058
- if (tableProps_box.table.hdlSortChange) {
42059
- tableProps_box.table.hdlSortChange({scopeThis: scopeThis_box, inherit: {
42060
- column: para.column,
42061
- prop: para.prop,
42062
- order: para.order,
42063
- }});
42064
- }
42065
- },
42066
42018
  cellMouseover({col, row}) {
42067
42019
  if (col.hdlMouseover) {
42068
42020
  col.hdlMouseover({scopeThis: scopeThis_box, row, col});
@@ -42070,6 +42022,13 @@ const hdl = {
42070
42022
  tableProps_box.table.cellTooltip = [];
42071
42023
  }
42072
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
+ },
42073
42032
  download({row, col}) {
42074
42033
  if(!col.hdlGetSrc){
42075
42034
  return {
@@ -42092,6 +42051,53 @@ const hdl = {
42092
42051
  fileName: src ? fileName : tableProps_box.table.colShow.download.fileName
42093
42052
  }
42094
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
+ },
42095
42101
  };
42096
42102
 
42097
42103
  const style = {
@@ -42353,8 +42359,8 @@ return (_ctx, _cache) => {
42353
42359
  ? (vue.openBlock(), vue.createBlock(_component_el_image, {
42354
42360
  key: 5,
42355
42361
  style: vue.normalizeStyle(style.cell.image({col})),
42356
- src: scope.row[col.fieldName][0] || '',
42357
- "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})],
42358
42364
  "preview-teleported": true,
42359
42365
  "hide-on-click-modal": true
42360
42366
  }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"]))