@yoooloo42/joker 1.0.53 → 1.0.55

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
@@ -1,3 +1,4 @@
1
+ import { useRouter } from 'vue-router';
1
2
  import { computed, createElementBlock, openBlock, Fragment, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, defineComponent, h, onMounted, onBeforeUnmount, ref, watch, nextTick as nextTick$1, reactive, resolveComponent, createBlock, withCtx, renderList, createTextVNode, createVNode, unref } from 'vue';
2
3
 
3
4
  function _mergeNamespaces(n, m) {
@@ -21956,6 +21957,7 @@ const {
21956
21957
  mergeConfig
21957
21958
  } = axios;
21958
21959
 
21960
+ const router = useRouter();
21959
21961
  const domainPara = 'http://127.0.0.1:443';
21960
21962
  const upload$1 = '/ly0/upload-req/image';
21961
21963
  const upload_carplate = '/ly0/upload-req/carplate';
@@ -21988,9 +21990,7 @@ async function ly0request$1(_ref2) {
21988
21990
  domain = domainPara,
21989
21991
  url,
21990
21992
  // 路由
21991
- data,
21992
- // 请求数据
21993
- scopeThis // 当前的组件实例
21993
+ data // 请求数据
21994
21994
  } = _ref2;
21995
21995
  try {
21996
21996
  const response = await request$1({
@@ -22002,16 +22002,13 @@ async function ly0request$1(_ref2) {
22002
22002
  // session 异常
22003
22003
  if (response.data.sessionStatusCode && response.data.sessionStatusCode !== 0) {
22004
22004
  console.log('session异常', response.data.sessionStatusMessage);
22005
- if (scopeThis) {
22006
- // scopeThis.$message(response.data.sessionStatusMessage)
22007
- }
22008
22005
  let ly0session = ly0sessionLoad();
22009
22006
  ly0sessionSave({
22010
22007
  session: {
22011
22008
  usertbl: ly0session && ly0session.session && ly0session.session.usertbl ? ly0session.session.usertbl : 'ly0d0user'
22012
22009
  }
22013
22010
  });
22014
- ly0sessionLose(scopeThis !== null && scopeThis !== void 0 ? scopeThis : null);
22011
+ ly0sessionLose();
22015
22012
  return {
22016
22013
  code: 1,
22017
22014
  message: 'session 异常'
@@ -22031,9 +22028,7 @@ async function storpro(_ref3) {
22031
22028
  storproName,
22032
22029
  // 存储过程名称
22033
22030
  data,
22034
- noSession = false,
22035
- // 不进行session验证
22036
- scopeThis // 当前的组件实例
22031
+ noSession = false // 不进行session验证
22037
22032
  } = _ref3;
22038
22033
  try {
22039
22034
  const result = await ly0request$1({
@@ -22046,8 +22041,7 @@ async function storpro(_ref3) {
22046
22041
  storproName,
22047
22042
  data: data !== null && data !== void 0 ? data : null
22048
22043
  }
22049
- },
22050
- scopeThis: scopeThis !== null && scopeThis !== void 0 ? scopeThis : null
22044
+ }
22051
22045
  });
22052
22046
  return result;
22053
22047
  } catch (err) {
@@ -22072,7 +22066,7 @@ function ly0sessionClear() {
22072
22066
  }
22073
22067
 
22074
22068
  // session丢失
22075
- function ly0sessionLose(scopeThis) {
22069
+ function ly0sessionLose() {
22076
22070
  let ly0session = ly0sessionLoad(),
22077
22071
  lose = false,
22078
22072
  route = '';
@@ -22088,7 +22082,7 @@ function ly0sessionLose(scopeThis) {
22088
22082
  }
22089
22083
  }
22090
22084
  if (lose) {
22091
- scopeThis.$router.replace({
22085
+ router.replace({
22092
22086
  path: route
22093
22087
  });
22094
22088
  }
@@ -22096,7 +22090,7 @@ function ly0sessionLose(scopeThis) {
22096
22090
  }
22097
22091
 
22098
22092
  // session丢失
22099
- function ly0sessionLoseWithUsertbl(scopeThis, usertbl) {
22093
+ function ly0sessionLoseWithUsertbl(usertbl) {
22100
22094
  let ly0session = ly0sessionLoad(),
22101
22095
  lose = false,
22102
22096
  route = '';
@@ -22112,7 +22106,7 @@ function ly0sessionLoseWithUsertbl(scopeThis, usertbl) {
22112
22106
  }
22113
22107
  }
22114
22108
  if (lose) {
22115
- scopeThis.$router.replace({
22109
+ router.replace({
22116
22110
  path: route
22117
22111
  });
22118
22112
  }
@@ -22420,7 +22414,7 @@ var styleModule = {
22420
22414
 
22421
22415
  var script$g = {
22422
22416
  __name: 'LabelBox',
22423
- props: ["scopeThis", "myProps", "dataBox", "item"],
22417
+ props: ["myProps", "dataBox", "item"],
22424
22418
  setup(__props) {
22425
22419
 
22426
22420
  const props = __props;
@@ -22436,7 +22430,7 @@ const style = {
22436
22430
 
22437
22431
  const hdlClick = () => {
22438
22432
  if(props.item.hdlLabelClick){
22439
- props.item.hdlLabelClick(props.scopeThis, props.dataBox.fieldsValue);
22433
+ props.item.hdlLabelClick(props.dataBox.fieldsValue, props.item);
22440
22434
  }
22441
22435
  };
22442
22436
 
@@ -39331,7 +39325,7 @@ const _hoisted_28 = { key: 30 };
39331
39325
 
39332
39326
  var script$f = {
39333
39327
  __name: 'InputBox',
39334
- props: ["scopeThis", "myProps", "dataBox", "item"],
39328
+ props: ["myProps", "dataBox", "item"],
39335
39329
  setup(__props) {
39336
39330
 
39337
39331
  const props = __props;
@@ -39356,12 +39350,12 @@ const select = reactive({
39356
39350
  if (props.item.items) {
39357
39351
  return props.item.items
39358
39352
  } else if (props.item.hdlGetItems) {
39359
- return props.item.hdlGetItems(props.scopeThis)
39353
+ return props.item.hdlGetItems(props.dataBox.fieldsValue, props.item)
39360
39354
  }
39361
39355
  }),
39362
39356
  hdlChange: value => {
39363
39357
  if (props.item.hdlChange) {
39364
- props.item.hdlChange(props.scopeThis, value);
39358
+ props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
39365
39359
  }
39366
39360
  }
39367
39361
  });
@@ -39393,7 +39387,7 @@ const datePicker = reactive({
39393
39387
  }),
39394
39388
  hdlChange: value => {
39395
39389
  if (props.item.hdlChange) {
39396
- props.item.hdlChange(props.scopeThis, value);
39390
+ props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
39397
39391
  }
39398
39392
  }
39399
39393
  });
@@ -39401,7 +39395,7 @@ const datePicker = reactive({
39401
39395
  const ly0switch = reactive({
39402
39396
  hdlChange: value => {
39403
39397
  if (props.item.hdlChange) {
39404
- props.item.hdlChange(props.scopeThis, value);
39398
+ props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
39405
39399
  }
39406
39400
  }
39407
39401
  });
@@ -39409,7 +39403,7 @@ const ly0switch = reactive({
39409
39403
  const radioGroup = reactive({
39410
39404
  hdlChange: value => {
39411
39405
  if (props.item.hdlChange) {
39412
- props.item.hdlChange(props.scopeThis, value);
39406
+ props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
39413
39407
  }
39414
39408
  }
39415
39409
  });
@@ -39536,7 +39530,7 @@ const download = reactive({
39536
39530
  return props.myProps.download.downloadLabelNoSrc
39537
39531
  }
39538
39532
  if (props.item.hdlGetDownloadLabel) {
39539
- return props.item.hdlGetDownloadLabel(props.scopeThis, props.item)
39533
+ return props.item.hdlGetDownloadLabel(props.dataBox.fieldsValue, props.item)
39540
39534
  }
39541
39535
  return props.myProps.download.downloadLabel
39542
39536
  }),
@@ -39679,16 +39673,16 @@ return (_ctx, _cache) => {
39679
39673
  ? (openBlock(), createElementBlock("div", {
39680
39674
  key: 3,
39681
39675
  style: normalizeStyle(style.text(__props.item, __props.myProps))
39682
- }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.scopeThis, __props.dataBox.fieldsValue)
39683
- ? __props.item.hdlExpression(__props.scopeThis, __props.dataBox.fieldsValue)
39676
+ }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
39677
+ ? __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
39684
39678
  : ' '), 5 /* TEXT, STYLE */))
39685
39679
  : createCommentVNode("v-if", true),
39686
39680
  (__props.item.inputType === 'expression0')
39687
39681
  ? (openBlock(), createElementBlock("div", {
39688
39682
  key: 4,
39689
39683
  style: normalizeStyle(style.text0(__props.item))
39690
- }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.scopeThis, __props.dataBox.fieldsValue)
39691
- ? __props.item.hdlExpression(__props.scopeThis, __props.dataBox.fieldsValue)
39684
+ }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
39685
+ ? __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
39692
39686
  : ' '), 5 /* TEXT, STYLE */))
39693
39687
  : createCommentVNode("v-if", true),
39694
39688
  (__props.item.inputType === 'line')
@@ -39820,7 +39814,7 @@ return (_ctx, _cache) => {
39820
39814
  plain: style.button_group(__props.item, item0, item1).button.facade.plain,
39821
39815
  round: style.button_group(__props.item, item0, item1).button.facade.round,
39822
39816
  circle: style.button_group(__props.item, item0, item1).button.facade.circle,
39823
- onClick: $event => (item1.hdlClick ? item1.hdlClick(__props.scopeThis) : null),
39817
+ onClick: $event => (item1.hdlClick ? item1.hdlClick(__props.dataBox.fieldsValue, __props.item) : null),
39824
39818
  key: index1
39825
39819
  }, {
39826
39820
  default: withCtx(() => [
@@ -40135,7 +40129,7 @@ const _hoisted_4$6 = ["colspan"];
40135
40129
 
40136
40130
  var script$e = {
40137
40131
  __name: 'Form',
40138
- props: ["scopeThis", "myProps", "dataBox"],
40132
+ props: ["myProps", "dataBox"],
40139
40133
  setup(__props) {
40140
40134
 
40141
40135
  const style = reactive({
@@ -40155,12 +40149,11 @@ return (_ctx, _cache) => {
40155
40149
 
40156
40150
  return (openBlock(), createElementBlock(Fragment, null, [
40157
40151
  createCommentVNode(" 置顶菜单 "),
40158
- (__props.myProps.menu && __props.myProps.menu.length > 0)
40152
+ (__props.myProps.menu)
40159
40153
  ? (openBlock(), createBlock(_component_ly0Menu, {
40160
40154
  key: 0,
40161
- scopeThis: __props.scopeThis,
40162
40155
  myProps: __props.myProps.menu
40163
- }, null, 8 /* PROPS */, ["scopeThis", "myProps"]))
40156
+ }, null, 8 /* PROPS */, ["myProps"]))
40164
40157
  : createCommentVNode("v-if", true),
40165
40158
  createCommentVNode(" 表单区域可以分为多个列 "),
40166
40159
  createElementVNode("div", {
@@ -40172,7 +40165,7 @@ return (_ctx, _cache) => {
40172
40165
  createElementVNode("tbody", null, [
40173
40166
  (openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (item0, index0) => {
40174
40167
  return (openBlock(), createElementBlock(Fragment, { key: index0 }, [
40175
- (item0.hdlVisible ? item0.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue) : true)
40168
+ (item0.hdlVisible ? item0.hdlVisible(__props.dataBox.fieldsValue) : true)
40176
40169
  ? (openBlock(), createElementBlock("tr", _hoisted_1$c, [
40177
40170
  (!!item0.label)
40178
40171
  ? (openBlock(), createElementBlock("td", {
@@ -40180,11 +40173,10 @@ return (_ctx, _cache) => {
40180
40173
  style: normalizeStyle(style.field_box.left)
40181
40174
  }, [
40182
40175
  createVNode(script$g, {
40183
- scopeThis: __props.scopeThis,
40184
40176
  myProps: __props.myProps,
40185
40177
  dataBox: __props.dataBox,
40186
40178
  item: item0
40187
- }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
40179
+ }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
40188
40180
  ], 4 /* STYLE */))
40189
40181
  : createCommentVNode("v-if", true),
40190
40182
  createElementVNode("td", {
@@ -40205,7 +40197,7 @@ return (_ctx, _cache) => {
40205
40197
  default: withCtx(() => [
40206
40198
  (openBlock(true), createElementBlock(Fragment, null, renderList(item0.items, (item1, index1) => {
40207
40199
  return (openBlock(), createElementBlock(Fragment, { key: index1 }, [
40208
- (item1.hdlVisible ? item1.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue) : true)
40200
+ (item1.hdlVisible ? item1.hdlVisible(__props.dataBox.fieldsValue) : true)
40209
40201
  ? (openBlock(), createBlock(_component_el_collapse_item, {
40210
40202
  key: 0,
40211
40203
  title: item1.title,
@@ -40219,7 +40211,7 @@ return (_ctx, _cache) => {
40219
40211
  return (openBlock(), createElementBlock(Fragment, { key: index2 }, [
40220
40212
  (
40221
40213
  item2.hdlVisible
40222
- ? item2.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue)
40214
+ ? item2.hdlVisible(__props.dataBox.fieldsValue)
40223
40215
  : true
40224
40216
  )
40225
40217
  ? (openBlock(), createElementBlock("tr", _hoisted_3$7, [
@@ -40229,11 +40221,10 @@ return (_ctx, _cache) => {
40229
40221
  style: normalizeStyle(style.field_box.left)
40230
40222
  }, [
40231
40223
  createVNode(script$g, {
40232
- scopeThis: __props.scopeThis,
40233
40224
  myProps: __props.myProps,
40234
40225
  dataBox: __props.dataBox,
40235
40226
  item: item2
40236
- }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
40227
+ }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
40237
40228
  ], 4 /* STYLE */))
40238
40229
  : createCommentVNode("v-if", true),
40239
40230
  createElementVNode("td", {
@@ -40241,11 +40232,10 @@ return (_ctx, _cache) => {
40241
40232
  colspan: style.no_field_label(item2)
40242
40233
  }, [
40243
40234
  createVNode(script$f, {
40244
- scopeThis: __props.scopeThis,
40245
40235
  myProps: __props.myProps,
40246
40236
  dataBox: __props.dataBox,
40247
40237
  item: item2
40248
- }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
40238
+ }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
40249
40239
  ], 12 /* STYLE, PROPS */, _hoisted_4$6)
40250
40240
  ]))
40251
40241
  : createCommentVNode("v-if", true)
@@ -40263,11 +40253,10 @@ return (_ctx, _cache) => {
40263
40253
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
40264
40254
  : (openBlock(), createBlock(script$f, {
40265
40255
  key: 1,
40266
- scopeThis: __props.scopeThis,
40267
40256
  myProps: __props.myProps,
40268
40257
  dataBox: __props.dataBox,
40269
40258
  item: item0
40270
- }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"]))
40259
+ }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"]))
40271
40260
  ], 12 /* STYLE, PROPS */, _hoisted_2$c)
40272
40261
  ]))
40273
40262
  : createCommentVNode("v-if", true)
@@ -40291,7 +40280,7 @@ return (_ctx, _cache) => {
40291
40280
  type: style.submit_box.button.facade.type,
40292
40281
  plain: style.submit_box.button.facade.plain,
40293
40282
  style: normalizeStyle(style.submit_box.button.style),
40294
- onClick: _cache[0] || (_cache[0] = $event => (__props.dataBox.hdlSubmit(__props.scopeThis, __props.dataBox.fieldsValue)))
40283
+ onClick: _cache[0] || (_cache[0] = $event => (__props.dataBox.hdlSubmit(__props.dataBox.fieldsValue)))
40295
40284
  }, {
40296
40285
  default: withCtx(() => [...(_cache[1] || (_cache[1] = [
40297
40286
  createTextVNode("提交", -1 /* CACHED */)
@@ -40363,7 +40352,7 @@ var ly0default$2 = {
40363
40352
 
40364
40353
  var script$d = {
40365
40354
  __name: 'index',
40366
- props: ["scopeThis", "myProps", "dataBox"],
40355
+ props: ["myProps", "dataBox"],
40367
40356
  setup(__props) {
40368
40357
 
40369
40358
  const props = __props;
@@ -40391,10 +40380,9 @@ return (_ctx, _cache) => {
40391
40380
  myProps0
40392
40381
  ? (openBlock(), createBlock(script$e, {
40393
40382
  key: 0,
40394
- scopeThis: __props.scopeThis,
40395
40383
  myProps: myProps0,
40396
40384
  dataBox: __props.dataBox
40397
- }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox"]))
40385
+ }, null, 8 /* PROPS */, ["myProps", "dataBox"]))
40398
40386
  : createCommentVNode("v-if", true)
40399
40387
  ]),
40400
40388
  _: 1 /* STABLE */
@@ -40402,10 +40390,9 @@ return (_ctx, _cache) => {
40402
40390
  : myProps0
40403
40391
  ? (openBlock(), createBlock(script$e, {
40404
40392
  key: 1,
40405
- scopeThis: __props.scopeThis,
40406
40393
  myProps: myProps0,
40407
40394
  dataBox: __props.dataBox
40408
- }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox"]))
40395
+ }, null, 8 /* PROPS */, ["myProps", "dataBox"]))
40409
40396
  : createCommentVNode("v-if", true)
40410
40397
  }
40411
40398
  }
@@ -40429,7 +40416,7 @@ var ly0default$1 = {
40429
40416
  };
40430
40417
 
40431
40418
  var script$c = {
40432
- props: ['scopeThis', 'myProps'],
40419
+ props: ['myProps'],
40433
40420
  computed: {
40434
40421
  myProps0(){
40435
40422
  return Object.assign({}, ly0default$1.myProps, this.myProps)
@@ -40462,7 +40449,7 @@ var script$c = {
40462
40449
  // 节点存在自定义索引
40463
40450
  if (!!menu[i].index && index === menu[i].index) {
40464
40451
  if (menu[i].handle) {
40465
- menu[i].handle(this.scopeThis, index);
40452
+ menu[i].handle(index);
40466
40453
  }
40467
40454
  result = true;
40468
40455
  break
@@ -40470,7 +40457,7 @@ var script$c = {
40470
40457
  // 节点不存在自定义索引
40471
40458
  if (index === index0) {
40472
40459
  if (menu[i].handle) {
40473
- menu[i].handle(this.scopeThis, index);
40460
+ menu[i].handle(index);
40474
40461
  }
40475
40462
  result = true;
40476
40463
  break
@@ -40521,7 +40508,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
40521
40508
  'disabled' in item
40522
40509
  ? item.disabled
40523
40510
  : 'hdlDisabled' in item
40524
- ? item.hdlDisabled($props.scopeThis, item, index)
40511
+ ? item.hdlDisabled(item, index)
40525
40512
  : false
40526
40513
 
40527
40514
  }, {
@@ -40550,7 +40537,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
40550
40537
  'disabled' in item0
40551
40538
  ? item0.disabled
40552
40539
  : 'hdlDisabled' in item0
40553
- ? item0.hdlDisabled($props.scopeThis, item0, index0)
40540
+ ? item0.hdlDisabled(item0, index0)
40554
40541
  : false
40555
40542
 
40556
40543
  }, {
@@ -40587,7 +40574,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
40587
40574
  'disabled' in item1
40588
40575
  ? item1.disabled
40589
40576
  : 'hdlDisabled' in item1
40590
- ? item1.hdlDisabled($props.scopeThis, item1, index1)
40577
+ ? item1.hdlDisabled(item1, index1)
40591
40578
  : false
40592
40579
 
40593
40580
  }, {
@@ -40628,7 +40615,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
40628
40615
  'disabled' in item2
40629
40616
  ? item2.disabled
40630
40617
  : 'hdlDisabled' in item2
40631
- ? item2.hdlDisabled($props.scopeThis, item2, index2)
40618
+ ? item2.hdlDisabled(item2, index2)
40632
40619
  : false
40633
40620
 
40634
40621
  }, {
@@ -40666,7 +40653,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
40666
40653
  'disabled' in item3
40667
40654
  ? item3.disabled
40668
40655
  : 'hdlDisabled' in item3
40669
- ? item3.hdlDisabled($props.scopeThis, item3, index3)
40656
+ ? item3.hdlDisabled(item3, index3)
40670
40657
  : false
40671
40658
 
40672
40659
  }, {
@@ -41748,7 +41735,6 @@ const hdlPopup = () => {
41748
41735
  const hdlChangeCode2 = value => {
41749
41736
  return new Promise((resolve, reject) => {
41750
41737
  request.ly0.storpro({
41751
- scopeThis: this,
41752
41738
  noSession: true,
41753
41739
  storproName: 'ly0d3.gbt2260code4.code2',
41754
41740
  data: {code2: value},