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