@yoooloo42/joker 1.0.229 → 1.0.231

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"]))
@@ -42737,7 +42744,7 @@ return (_ctx, _cache) => {
42737
42744
  const _component_el_button = vue.resolveComponent("el-button");
42738
42745
  const _component_el_upload = vue.resolveComponent("el-upload");
42739
42746
 
42740
- return (vue.openBlock(), vue.createElementBlock("div", null, [
42747
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
42741
42748
  vue.createVNode(_component_el_upload, {
42742
42749
  action: myProps_box.uploadUrl,
42743
42750
  "file-list": fileList_box.value,
@@ -42781,7 +42788,7 @@ return (_ctx, _cache) => {
42781
42788
  _: 1 /* STABLE */
42782
42789
  }, 8 /* PROPS */, ["onClick"]))
42783
42790
  : vue.createCommentVNode("v-if", true)
42784
- ]))
42791
+ ], 64 /* STABLE_FRAGMENT */))
42785
42792
  }
42786
42793
  }
42787
42794
 
@@ -42912,7 +42919,7 @@ return (_ctx, _cache) => {
42912
42919
  const _component_el_upload = vue.resolveComponent("el-upload");
42913
42920
  const _component_el_button = vue.resolveComponent("el-button");
42914
42921
 
42915
- return (vue.openBlock(), vue.createElementBlock("div", null, [
42922
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
42916
42923
  vue.createVNode(_component_el_upload, {
42917
42924
  class: "avatar",
42918
42925
  style: vue.normalizeStyle(style.avatarBox),
@@ -42923,8 +42930,7 @@ return (_ctx, _cache) => {
42923
42930
  "before-upload": hdl.beforeUpload,
42924
42931
  "on-preview": hdl.preview,
42925
42932
  "on-remove": hdl.remove,
42926
- "on-success": hdl.success,
42927
- limit: 1
42933
+ "on-success": hdl.success
42928
42934
  }, {
42929
42935
  default: vue.withCtx(() => [
42930
42936
  (fileList_box.value.length>0 && fileList_box.value[0].response && fileList_box.value[0].response.data && fileList_box.value[0].response.data.src)
@@ -42962,7 +42968,7 @@ return (_ctx, _cache) => {
42962
42968
  }, 8 /* PROPS */, ["onClick"])
42963
42969
  ]))
42964
42970
  : vue.createCommentVNode("v-if", true)
42965
- ]))
42971
+ ], 64 /* STABLE_FRAGMENT */))
42966
42972
  }
42967
42973
  }
42968
42974
 
@@ -43084,7 +43090,7 @@ return (_ctx, _cache) => {
43084
43090
  const _component_el_upload = vue.resolveComponent("el-upload");
43085
43091
  const _component_el_button = vue.resolveComponent("el-button");
43086
43092
 
43087
- return (vue.openBlock(), vue.createElementBlock("div", null, [
43093
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
43088
43094
  vue.createVNode(_component_el_upload, {
43089
43095
  class: "avatar",
43090
43096
  style: vue.normalizeStyle(style.avatarBox),
@@ -43099,11 +43105,11 @@ return (_ctx, _cache) => {
43099
43105
  }, {
43100
43106
  default: vue.withCtx(() => [
43101
43107
  (
43102
- fileList_box.value.length>0 &&
43103
- fileList_box.value[0].response &&
43104
- fileList_box.value[0].response.data &&
43105
- fileList_box.value[0].response.data.src
43106
- )
43108
+ fileList_box.value.length>0 &&
43109
+ fileList_box.value[0].response &&
43110
+ fileList_box.value[0].response.data &&
43111
+ fileList_box.value[0].response.data.src
43112
+ )
43107
43113
  ? (vue.openBlock(), vue.createElementBlock("img", {
43108
43114
  key: 0,
43109
43115
  class: "avatar",
@@ -43124,23 +43130,23 @@ return (_ctx, _cache) => {
43124
43130
  _: 1 /* STABLE */
43125
43131
  }, 8 /* PROPS */, ["style", "action", "file-list", "before-upload", "on-preview", "on-remove", "on-success"]),
43126
43132
  (
43127
- fileList_box.value.length>0 &&
43128
- fileList_box.value[0].response &&
43129
- fileList_box.value[0].response.data &&
43130
- fileList_box.value[0].response.data.result &&
43131
- fileList_box.value[0].response.data.result.txt
43132
- )
43133
+ fileList_box.value.length>0 &&
43134
+ fileList_box.value[0].response &&
43135
+ fileList_box.value[0].response.data &&
43136
+ fileList_box.value[0].response.data.result &&
43137
+ fileList_box.value[0].response.data.result.txt
43138
+ )
43133
43139
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$9, [
43134
43140
  _cache[1] || (_cache[1] = vue.createElementVNode("span", null, "车牌识别结果:", -1 /* CACHED */)),
43135
43141
  vue.createElementVNode("span", _hoisted_3$4, vue.toDisplayString(fileList_box.value[0].response.data.result.txt), 1 /* TEXT */)
43136
43142
  ]))
43137
43143
  : vue.createCommentVNode("v-if", true),
43138
43144
  (
43139
- fileList_box.value.length>0 &&
43140
- fileList_box.value[0].response &&
43141
- fileList_box.value[0].response.data &&
43142
- fileList_box.value[0].response.data.src
43143
- )
43145
+ fileList_box.value.length>0 &&
43146
+ fileList_box.value[0].response &&
43147
+ fileList_box.value[0].response.data &&
43148
+ fileList_box.value[0].response.data.src
43149
+ )
43144
43150
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [
43145
43151
  vue.createVNode(_component_el_button, {
43146
43152
  size: "small",
@@ -43155,7 +43161,7 @@ return (_ctx, _cache) => {
43155
43161
  }, 8 /* PROPS */, ["onClick"])
43156
43162
  ]))
43157
43163
  : vue.createCommentVNode("v-if", true)
43158
- ]))
43164
+ ], 64 /* STABLE_FRAGMENT */))
43159
43165
  }
43160
43166
  }
43161
43167
 
@@ -43267,7 +43273,7 @@ return (_ctx, _cache) => {
43267
43273
  const _component_el_upload = vue.resolveComponent("el-upload");
43268
43274
  const _component_el_button = vue.resolveComponent("el-button");
43269
43275
 
43270
- return (vue.openBlock(), vue.createElementBlock("div", null, [
43276
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
43271
43277
  vue.createVNode(_component_el_upload, {
43272
43278
  action: myProps_box.uploadUrl,
43273
43279
  "file-list": fileList_box.value,
@@ -43313,7 +43319,7 @@ return (_ctx, _cache) => {
43313
43319
  _: 1 /* STABLE */
43314
43320
  }, 8 /* PROPS */, ["onClick"]))
43315
43321
  : vue.createCommentVNode("v-if", true)
43316
- ]))
43322
+ ], 64 /* STABLE_FRAGMENT */))
43317
43323
  }
43318
43324
  }
43319
43325
 
@@ -43422,7 +43428,7 @@ return (_ctx, _cache) => {
43422
43428
  const _component_el_button = vue.resolveComponent("el-button");
43423
43429
  const _component_el_upload = vue.resolveComponent("el-upload");
43424
43430
 
43425
- return (vue.openBlock(), vue.createElementBlock("div", null, [
43431
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
43426
43432
  vue.createVNode(_component_el_upload, {
43427
43433
  action: myProps_box.uploadUrl,
43428
43434
  "file-list": fileList_box.value,
@@ -43466,7 +43472,7 @@ return (_ctx, _cache) => {
43466
43472
  _: 1 /* STABLE */
43467
43473
  }, 8 /* PROPS */, ["onClick"]))
43468
43474
  : vue.createCommentVNode("v-if", true)
43469
- ]))
43475
+ ], 64 /* STABLE_FRAGMENT */))
43470
43476
  }
43471
43477
  }
43472
43478
 
@@ -43561,7 +43567,7 @@ return (_ctx, _cache) => {
43561
43567
  const _component_el_dialog = vue.resolveComponent("el-dialog");
43562
43568
  const _component_el_button = vue.resolveComponent("el-button");
43563
43569
 
43564
- return (vue.openBlock(), vue.createElementBlock("div", null, [
43570
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
43565
43571
  vue.createVNode(_component_el_upload, {
43566
43572
  action: myProps_box.uploadUrl,
43567
43573
  "file-list": fileList_box.value,
@@ -43615,7 +43621,7 @@ return (_ctx, _cache) => {
43615
43621
  _: 1 /* STABLE */
43616
43622
  }, 8 /* PROPS */, ["onClick"]))
43617
43623
  : vue.createCommentVNode("v-if", true)
43618
- ]))
43624
+ ], 64 /* STABLE_FRAGMENT */))
43619
43625
  }
43620
43626
  }
43621
43627