@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.esm.js CHANGED
@@ -41998,21 +41998,6 @@ const scopeThis_box = props.scopeThis;
41998
41998
  tableProps_box.table.pickCol.colsInit = unclassified.deepClone.deepClone(tableProps_box.table.cols);
41999
41999
 
42000
42000
  const hdl = {
42001
- async pageSizeChange(pageSize) {
42002
- // 页记录数改变
42003
- tableData_box.pageSize = pageSize;
42004
- tableData_box.currentPage = 1;
42005
- if(tableProps_box.table.hdlPageSizeChange){
42006
- await tableProps_box.table.hdlPageSizeChange({pageSize, scopeThis: scopeThis_box});
42007
- }
42008
- },
42009
- async currentPageChange(currentPage) {
42010
- // 当前页码改变
42011
- tableData_box.currentPage = currentPage;
42012
- if(tableProps_box.table.hdlCurrentPageChange){
42013
- await tableProps_box.table.hdlCurrentPageChange({currentPage, scopeThis: scopeThis_box});
42014
- }
42015
- },
42016
42001
  cellMouseEnter(row, column, cell, event) {
42017
42002
  // 当单元格hover进入时会触发该事件
42018
42003
  if (tableProps_box.table.hdlCellMouseEnter) {
@@ -42026,38 +42011,6 @@ const hdl = {
42026
42011
  tableProps_box.table.cellTooltip = [];
42027
42012
  }
42028
42013
  },
42029
- rowClick(row, column, event) {
42030
- // 当某一行被点击时会触发该事件
42031
- if (tableProps_box.table.hdlRowClick) {
42032
- tableProps_box.table.hdlRowClick({scopeThis: scopeThis_box, inherit: {
42033
- row,
42034
- column,
42035
- event
42036
- }});
42037
- }
42038
- },
42039
- selectionChange(selection) {
42040
- // 当选择项发生变化时会触发该事件
42041
- if (tableProps_box.table.hdlSelectionChange) {
42042
- tableProps_box.table.hdlSelectionChange({scopeThis: scopeThis_box, inherit: {
42043
- selection
42044
- }});
42045
- }
42046
- },
42047
- sortChange(para) {
42048
- // 当表格的排序条件发生变化的时候会触发该事件,一般用于远程排序
42049
- // para.column
42050
- // para.prop
42051
- // para.order
42052
-
42053
- if (tableProps_box.table.hdlSortChange) {
42054
- tableProps_box.table.hdlSortChange({scopeThis: scopeThis_box, inherit: {
42055
- column: para.column,
42056
- prop: para.prop,
42057
- order: para.order,
42058
- }});
42059
- }
42060
- },
42061
42014
  cellMouseover({col, row}) {
42062
42015
  if (col.hdlMouseover) {
42063
42016
  col.hdlMouseover({scopeThis: scopeThis_box, row, col});
@@ -42065,6 +42018,13 @@ const hdl = {
42065
42018
  tableProps_box.table.cellTooltip = [];
42066
42019
  }
42067
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
+ },
42068
42028
  download({row, col}) {
42069
42029
  if(!col.hdlGetSrc){
42070
42030
  return {
@@ -42087,6 +42047,53 @@ const hdl = {
42087
42047
  fileName: src ? fileName : tableProps_box.table.colShow.download.fileName
42088
42048
  }
42089
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
+ },
42090
42097
  };
42091
42098
 
42092
42099
  const style = {
@@ -42348,8 +42355,8 @@ return (_ctx, _cache) => {
42348
42355
  ? (openBlock(), createBlock(_component_el_image, {
42349
42356
  key: 5,
42350
42357
  style: normalizeStyle(style.cell.image({col})),
42351
- src: scope.row[col.fieldName][0] || '',
42352
- "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})],
42353
42360
  "preview-teleported": true,
42354
42361
  "hide-on-click-modal": true
42355
42362
  }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"]))
@@ -42733,7 +42740,7 @@ return (_ctx, _cache) => {
42733
42740
  const _component_el_button = resolveComponent("el-button");
42734
42741
  const _component_el_upload = resolveComponent("el-upload");
42735
42742
 
42736
- return (openBlock(), createElementBlock("div", null, [
42743
+ return (openBlock(), createElementBlock(Fragment, null, [
42737
42744
  createVNode(_component_el_upload, {
42738
42745
  action: myProps_box.uploadUrl,
42739
42746
  "file-list": fileList_box.value,
@@ -42777,7 +42784,7 @@ return (_ctx, _cache) => {
42777
42784
  _: 1 /* STABLE */
42778
42785
  }, 8 /* PROPS */, ["onClick"]))
42779
42786
  : createCommentVNode("v-if", true)
42780
- ]))
42787
+ ], 64 /* STABLE_FRAGMENT */))
42781
42788
  }
42782
42789
  }
42783
42790
 
@@ -42908,7 +42915,7 @@ return (_ctx, _cache) => {
42908
42915
  const _component_el_upload = resolveComponent("el-upload");
42909
42916
  const _component_el_button = resolveComponent("el-button");
42910
42917
 
42911
- return (openBlock(), createElementBlock("div", null, [
42918
+ return (openBlock(), createElementBlock(Fragment, null, [
42912
42919
  createVNode(_component_el_upload, {
42913
42920
  class: "avatar",
42914
42921
  style: normalizeStyle(style.avatarBox),
@@ -42919,8 +42926,7 @@ return (_ctx, _cache) => {
42919
42926
  "before-upload": hdl.beforeUpload,
42920
42927
  "on-preview": hdl.preview,
42921
42928
  "on-remove": hdl.remove,
42922
- "on-success": hdl.success,
42923
- limit: 1
42929
+ "on-success": hdl.success
42924
42930
  }, {
42925
42931
  default: withCtx(() => [
42926
42932
  (fileList_box.value.length>0 && fileList_box.value[0].response && fileList_box.value[0].response.data && fileList_box.value[0].response.data.src)
@@ -42958,7 +42964,7 @@ return (_ctx, _cache) => {
42958
42964
  }, 8 /* PROPS */, ["onClick"])
42959
42965
  ]))
42960
42966
  : createCommentVNode("v-if", true)
42961
- ]))
42967
+ ], 64 /* STABLE_FRAGMENT */))
42962
42968
  }
42963
42969
  }
42964
42970
 
@@ -43080,7 +43086,7 @@ return (_ctx, _cache) => {
43080
43086
  const _component_el_upload = resolveComponent("el-upload");
43081
43087
  const _component_el_button = resolveComponent("el-button");
43082
43088
 
43083
- return (openBlock(), createElementBlock("div", null, [
43089
+ return (openBlock(), createElementBlock(Fragment, null, [
43084
43090
  createVNode(_component_el_upload, {
43085
43091
  class: "avatar",
43086
43092
  style: normalizeStyle(style.avatarBox),
@@ -43095,11 +43101,11 @@ return (_ctx, _cache) => {
43095
43101
  }, {
43096
43102
  default: withCtx(() => [
43097
43103
  (
43098
- fileList_box.value.length>0 &&
43099
- fileList_box.value[0].response &&
43100
- fileList_box.value[0].response.data &&
43101
- fileList_box.value[0].response.data.src
43102
- )
43104
+ fileList_box.value.length>0 &&
43105
+ fileList_box.value[0].response &&
43106
+ fileList_box.value[0].response.data &&
43107
+ fileList_box.value[0].response.data.src
43108
+ )
43103
43109
  ? (openBlock(), createElementBlock("img", {
43104
43110
  key: 0,
43105
43111
  class: "avatar",
@@ -43120,23 +43126,23 @@ return (_ctx, _cache) => {
43120
43126
  _: 1 /* STABLE */
43121
43127
  }, 8 /* PROPS */, ["style", "action", "file-list", "before-upload", "on-preview", "on-remove", "on-success"]),
43122
43128
  (
43123
- fileList_box.value.length>0 &&
43124
- fileList_box.value[0].response &&
43125
- fileList_box.value[0].response.data &&
43126
- fileList_box.value[0].response.data.result &&
43127
- fileList_box.value[0].response.data.result.txt
43128
- )
43129
+ fileList_box.value.length>0 &&
43130
+ fileList_box.value[0].response &&
43131
+ fileList_box.value[0].response.data &&
43132
+ fileList_box.value[0].response.data.result &&
43133
+ fileList_box.value[0].response.data.result.txt
43134
+ )
43129
43135
  ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
43130
43136
  _cache[1] || (_cache[1] = createElementVNode("span", null, "车牌识别结果:", -1 /* CACHED */)),
43131
43137
  createElementVNode("span", _hoisted_3$4, toDisplayString(fileList_box.value[0].response.data.result.txt), 1 /* TEXT */)
43132
43138
  ]))
43133
43139
  : createCommentVNode("v-if", true),
43134
43140
  (
43135
- fileList_box.value.length>0 &&
43136
- fileList_box.value[0].response &&
43137
- fileList_box.value[0].response.data &&
43138
- fileList_box.value[0].response.data.src
43139
- )
43141
+ fileList_box.value.length>0 &&
43142
+ fileList_box.value[0].response &&
43143
+ fileList_box.value[0].response.data &&
43144
+ fileList_box.value[0].response.data.src
43145
+ )
43140
43146
  ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
43141
43147
  createVNode(_component_el_button, {
43142
43148
  size: "small",
@@ -43151,7 +43157,7 @@ return (_ctx, _cache) => {
43151
43157
  }, 8 /* PROPS */, ["onClick"])
43152
43158
  ]))
43153
43159
  : createCommentVNode("v-if", true)
43154
- ]))
43160
+ ], 64 /* STABLE_FRAGMENT */))
43155
43161
  }
43156
43162
  }
43157
43163
 
@@ -43263,7 +43269,7 @@ return (_ctx, _cache) => {
43263
43269
  const _component_el_upload = resolveComponent("el-upload");
43264
43270
  const _component_el_button = resolveComponent("el-button");
43265
43271
 
43266
- return (openBlock(), createElementBlock("div", null, [
43272
+ return (openBlock(), createElementBlock(Fragment, null, [
43267
43273
  createVNode(_component_el_upload, {
43268
43274
  action: myProps_box.uploadUrl,
43269
43275
  "file-list": fileList_box.value,
@@ -43309,7 +43315,7 @@ return (_ctx, _cache) => {
43309
43315
  _: 1 /* STABLE */
43310
43316
  }, 8 /* PROPS */, ["onClick"]))
43311
43317
  : createCommentVNode("v-if", true)
43312
- ]))
43318
+ ], 64 /* STABLE_FRAGMENT */))
43313
43319
  }
43314
43320
  }
43315
43321
 
@@ -43418,7 +43424,7 @@ return (_ctx, _cache) => {
43418
43424
  const _component_el_button = resolveComponent("el-button");
43419
43425
  const _component_el_upload = resolveComponent("el-upload");
43420
43426
 
43421
- return (openBlock(), createElementBlock("div", null, [
43427
+ return (openBlock(), createElementBlock(Fragment, null, [
43422
43428
  createVNode(_component_el_upload, {
43423
43429
  action: myProps_box.uploadUrl,
43424
43430
  "file-list": fileList_box.value,
@@ -43462,7 +43468,7 @@ return (_ctx, _cache) => {
43462
43468
  _: 1 /* STABLE */
43463
43469
  }, 8 /* PROPS */, ["onClick"]))
43464
43470
  : createCommentVNode("v-if", true)
43465
- ]))
43471
+ ], 64 /* STABLE_FRAGMENT */))
43466
43472
  }
43467
43473
  }
43468
43474
 
@@ -43557,7 +43563,7 @@ return (_ctx, _cache) => {
43557
43563
  const _component_el_dialog = resolveComponent("el-dialog");
43558
43564
  const _component_el_button = resolveComponent("el-button");
43559
43565
 
43560
- return (openBlock(), createElementBlock("div", null, [
43566
+ return (openBlock(), createElementBlock(Fragment, null, [
43561
43567
  createVNode(_component_el_upload, {
43562
43568
  action: myProps_box.uploadUrl,
43563
43569
  "file-list": fileList_box.value,
@@ -43611,7 +43617,7 @@ return (_ctx, _cache) => {
43611
43617
  _: 1 /* STABLE */
43612
43618
  }, 8 /* PROPS */, ["onClick"]))
43613
43619
  : createCommentVNode("v-if", true)
43614
- ]))
43620
+ ], 64 /* STABLE_FRAGMENT */))
43615
43621
  }
43616
43622
  }
43617
43623