@yoooloo42/joker 1.0.62 → 1.0.63

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
@@ -22418,7 +22418,7 @@ var styleModule = {
22418
22418
 
22419
22419
  var script$h = {
22420
22420
  __name: 'LabelBox',
22421
- props: ["myProps", "dataBox", "item"],
22421
+ props: ["scopeThis", "myProps", "dataBox", "item"],
22422
22422
  setup(__props) {
22423
22423
 
22424
22424
  const props = __props;
@@ -22430,7 +22430,7 @@ const style = vue.ref({
22430
22430
 
22431
22431
  const hdlClick = () => {
22432
22432
  if(props.item.hdlLabelClick){
22433
- props.item.hdlLabelClick(props.dataBox.fieldsValue, props.item);
22433
+ props.item.hdlLabelClick(props.scopeThis, props.dataBox.fieldsValue, props.item);
22434
22434
  }
22435
22435
  };
22436
22436
 
@@ -22485,7 +22485,7 @@ const _hoisted_28 = { key: 30 };
22485
22485
 
22486
22486
  var script$g = {
22487
22487
  __name: 'InputBox',
22488
- props: ["myProps", "dataBox", "item"],
22488
+ props: ["scopeThis", "myProps", "dataBox", "item"],
22489
22489
  setup(__props) {
22490
22490
 
22491
22491
  const props = __props;
@@ -22515,7 +22515,7 @@ const select = vue.reactive({
22515
22515
  }),
22516
22516
  hdlChange: value => {
22517
22517
  if (props.item.hdlChange) {
22518
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22518
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22519
22519
  }
22520
22520
  }
22521
22521
  });
@@ -22547,7 +22547,7 @@ const datePicker = vue.reactive({
22547
22547
  }),
22548
22548
  hdlChange: value => {
22549
22549
  if (props.item.hdlChange) {
22550
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22550
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22551
22551
  }
22552
22552
  }
22553
22553
  });
@@ -22555,7 +22555,7 @@ const datePicker = vue.reactive({
22555
22555
  const ly0switch = vue.reactive({
22556
22556
  hdlChange: value => {
22557
22557
  if (props.item.hdlChange) {
22558
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22558
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22559
22559
  }
22560
22560
  }
22561
22561
  });
@@ -22563,7 +22563,7 @@ const ly0switch = vue.reactive({
22563
22563
  const radioGroup = vue.reactive({
22564
22564
  hdlChange: value => {
22565
22565
  if (props.item.hdlChange) {
22566
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22566
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22567
22567
  }
22568
22568
  }
22569
22569
  });
@@ -22966,7 +22966,7 @@ return (_ctx, _cache) => {
22966
22966
  plain: style.button_group(__props.item, item0, item1).button.facade.plain,
22967
22967
  round: style.button_group(__props.item, item0, item1).button.facade.round,
22968
22968
  circle: style.button_group(__props.item, item0, item1).button.facade.circle,
22969
- onClick: $event => (item1.hdlClick ? item1.hdlClick(__props.dataBox.fieldsValue, __props.item) : null),
22969
+ onClick: $event => (item1.hdlClick ? item1.hdlClick(__props.scopeThis, __props.dataBox.fieldsValue, __props.item) : null),
22970
22970
  key: index1
22971
22971
  }, {
22972
22972
  default: vue.withCtx(() => [
@@ -23280,7 +23280,7 @@ const _hoisted_4$6 = ["colspan"];
23280
23280
 
23281
23281
  var script$f = {
23282
23282
  __name: 'Form',
23283
- props: ["myProps", "dataBox"],
23283
+ props: ["scopeThis", "myProps", "dataBox"],
23284
23284
  setup(__props) {
23285
23285
 
23286
23286
  const style = vue.reactive({
@@ -23303,8 +23303,9 @@ return (_ctx, _cache) => {
23303
23303
  (__props.myProps.menu && __props.myProps.menu.menu && __props.myProps.menu.menu.length > 0)
23304
23304
  ? (vue.openBlock(), vue.createBlock(_component_ly0Menu, {
23305
23305
  key: 0,
23306
+ scopeThis: __props.scopeThis,
23306
23307
  myProps: __props.myProps.menu
23307
- }, null, 8 /* PROPS */, ["myProps"]))
23308
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps"]))
23308
23309
  : vue.createCommentVNode("v-if", true),
23309
23310
  vue.createCommentVNode(" 表单区域可以分为多个列 "),
23310
23311
  vue.createElementVNode("div", {
@@ -23316,7 +23317,7 @@ return (_ctx, _cache) => {
23316
23317
  vue.createElementVNode("tbody", null, [
23317
23318
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.items, (item0, index0) => {
23318
23319
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index0 }, [
23319
- (item0.hdlVisible ? item0.hdlVisible(__props.dataBox.fieldsValue) : true)
23320
+ (item0.hdlVisible ? item0.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue) : true)
23320
23321
  ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$d, [
23321
23322
  (!!item0.label)
23322
23323
  ? (vue.openBlock(), vue.createElementBlock("td", {
@@ -23324,10 +23325,11 @@ return (_ctx, _cache) => {
23324
23325
  style: vue.normalizeStyle(style.field_box.left)
23325
23326
  }, [
23326
23327
  vue.createVNode(script$h, {
23328
+ scopeThis: __props.scopeThis,
23327
23329
  myProps: __props.myProps,
23328
23330
  dataBox: __props.dataBox,
23329
23331
  item: item0
23330
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
23332
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
23331
23333
  ], 4 /* STYLE */))
23332
23334
  : vue.createCommentVNode("v-if", true),
23333
23335
  vue.createElementVNode("td", {
@@ -23348,7 +23350,7 @@ return (_ctx, _cache) => {
23348
23350
  default: vue.withCtx(() => [
23349
23351
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item0.items, (item1, index1) => {
23350
23352
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index1 }, [
23351
- (item1.hdlVisible ? item1.hdlVisible(__props.dataBox.fieldsValue) : true)
23353
+ (item1.hdlVisible ? item1.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue) : true)
23352
23354
  ? (vue.openBlock(), vue.createBlock(_component_el_collapse_item, {
23353
23355
  key: 0,
23354
23356
  title: item1.title,
@@ -23362,7 +23364,7 @@ return (_ctx, _cache) => {
23362
23364
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
23363
23365
  (
23364
23366
  item2.hdlVisible
23365
- ? item2.hdlVisible(__props.dataBox.fieldsValue)
23367
+ ? item2.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue)
23366
23368
  : true
23367
23369
  )
23368
23370
  ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_3$7, [
@@ -23372,10 +23374,11 @@ return (_ctx, _cache) => {
23372
23374
  style: vue.normalizeStyle(style.field_box.left)
23373
23375
  }, [
23374
23376
  vue.createVNode(script$h, {
23377
+ scopeThis: __props.scopeThis,
23375
23378
  myProps: __props.myProps,
23376
23379
  dataBox: __props.dataBox,
23377
23380
  item: item2
23378
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
23381
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
23379
23382
  ], 4 /* STYLE */))
23380
23383
  : vue.createCommentVNode("v-if", true),
23381
23384
  vue.createElementVNode("td", {
@@ -23383,10 +23386,11 @@ return (_ctx, _cache) => {
23383
23386
  colspan: style.no_field_label(item2)
23384
23387
  }, [
23385
23388
  vue.createVNode(script$g, {
23389
+ scopeThis: __props.scopeThis,
23386
23390
  myProps: __props.myProps,
23387
23391
  dataBox: __props.dataBox,
23388
23392
  item: item2
23389
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
23393
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
23390
23394
  ], 12 /* STYLE, PROPS */, _hoisted_4$6)
23391
23395
  ]))
23392
23396
  : vue.createCommentVNode("v-if", true)
@@ -23404,10 +23408,11 @@ return (_ctx, _cache) => {
23404
23408
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
23405
23409
  : (vue.openBlock(), vue.createBlock(script$g, {
23406
23410
  key: 1,
23411
+ scopeThis: __props.scopeThis,
23407
23412
  myProps: __props.myProps,
23408
23413
  dataBox: __props.dataBox,
23409
23414
  item: item0
23410
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"]))
23415
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"]))
23411
23416
  ], 12 /* STYLE, PROPS */, _hoisted_2$c)
23412
23417
  ]))
23413
23418
  : vue.createCommentVNode("v-if", true)
@@ -23431,7 +23436,7 @@ return (_ctx, _cache) => {
23431
23436
  type: style.submit_box.button.facade.type,
23432
23437
  plain: style.submit_box.button.facade.plain,
23433
23438
  style: vue.normalizeStyle(style.submit_box.button.style),
23434
- onClick: _cache[0] || (_cache[0] = $event => (__props.dataBox.hdlSubmit(__props.dataBox.fieldsValue)))
23439
+ onClick: _cache[0] || (_cache[0] = $event => (__props.dataBox.hdlSubmit(__props.scopeThis, __props.dataBox.fieldsValue)))
23435
23440
  }, {
23436
23441
  default: vue.withCtx(() => [...(_cache[1] || (_cache[1] = [
23437
23442
  vue.createTextVNode("提交", -1 /* CACHED */)
@@ -23503,7 +23508,7 @@ var ly0default$2 = {
23503
23508
 
23504
23509
  var script$e = {
23505
23510
  __name: 'index',
23506
- props: ["myProps", "dataBox"],
23511
+ props: ["scopeThis", "myProps", "dataBox"],
23507
23512
  setup(__props) {
23508
23513
 
23509
23514
  const props = __props;
@@ -23529,9 +23534,10 @@ return (_ctx, _cache) => {
23529
23534
  (myProps0.value)
23530
23535
  ? (vue.openBlock(), vue.createBlock(script$f, {
23531
23536
  key: 0,
23537
+ scopeThis: __props.scopeThis,
23532
23538
  myProps: myProps0.value,
23533
23539
  dataBox: __props.dataBox
23534
- }, null, 8 /* PROPS */, ["myProps", "dataBox"]))
23540
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox"]))
23535
23541
  : vue.createCommentVNode("v-if", true)
23536
23542
  ]),
23537
23543
  _: 1 /* STABLE */
@@ -23539,9 +23545,10 @@ return (_ctx, _cache) => {
23539
23545
  : (myProps0.value)
23540
23546
  ? (vue.openBlock(), vue.createBlock(script$f, {
23541
23547
  key: 1,
23548
+ scopeThis: __props.scopeThis,
23542
23549
  myProps: myProps0.value,
23543
23550
  dataBox: __props.dataBox
23544
- }, null, 8 /* PROPS */, ["myProps", "dataBox"]))
23551
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox"]))
23545
23552
  : vue.createCommentVNode("v-if", true)
23546
23553
  }
23547
23554
  }
@@ -23565,87 +23572,79 @@ var ly0default$1 = {
23565
23572
  };
23566
23573
 
23567
23574
  var script$d = {
23568
- props: ['myProps'],
23569
- computed: {
23570
- myProps0(){
23571
- return Object.assign({}, ly0default$1.myProps, this.myProps)
23575
+ __name: 'index',
23576
+ props: ["scopeThis", "myProps"],
23577
+ setup(__props) {
23578
+
23579
+ const props = __props;
23580
+ const myProps0 = vue.ref(Object.assign({}, ly0default$1.myProps, props.myProps));
23581
+
23582
+ const handleRun = (
23583
+ index, // 目标索引
23584
+ menu, // 当前菜单
23585
+ indexFather, // 父节点索引
23586
+ ) => {
23587
+ let result = false;
23588
+ // 遍历菜单节点
23589
+ for (let i = 0; i < menu.length; i++) {
23590
+ // 内部索引继承
23591
+ let index0 = indexFather ? indexFather + '-' + i : '' + i;
23592
+ // 节点存在自定义索引
23593
+ if (!!menu[i].index && index === menu[i].index) {
23594
+ if (menu[i].handle) {
23595
+ menu[i].handle(props.scopeThis, index);
23596
+ }
23597
+ result = true;
23598
+ break
23572
23599
  }
23573
- },
23574
- methods: {
23575
- handleSelect(
23576
- key,
23577
- // keyPath
23578
- ) {
23579
- this.handleRun(key, this.myProps.menu, '');
23580
- },
23581
- handleOpen() {},
23582
- // key,
23583
- // keyPath
23584
- handleClose() {},
23585
- // key,
23586
- // keyPath
23587
- // 执行菜单句柄
23588
- handleRun(
23589
- index, // 目标索引
23590
- menu, // 当前菜单
23591
- indexFather, // 父节点索引
23592
- ) {
23593
- let result = false;
23594
- // 遍历菜单节点
23595
- for (let i = 0; i < menu.length; i++) {
23596
- // 内部索引继承
23597
- let index0 = indexFather ? indexFather + '-' + i : '' + i;
23598
- // 节点存在自定义索引
23599
- if (!!menu[i].index && index === menu[i].index) {
23600
- if (menu[i].handle) {
23601
- menu[i].handle(index);
23602
- }
23603
- result = true;
23604
- break
23605
- }
23606
- // 节点不存在自定义索引
23607
- if (index === index0) {
23608
- if (menu[i].handle) {
23609
- menu[i].handle(index);
23610
- }
23611
- result = true;
23612
- break
23613
- }
23614
- // 存在子节点,递归调用
23615
- if (!!menu[i].menu && menu[i].menu.length > 0) {
23616
- result = this.handleRun(index, menu[i].menu, index0);
23617
- if (!!result) {
23618
- break
23619
- }
23620
- }
23600
+ // 节点不存在自定义索引
23601
+ if (index === index0) {
23602
+ if (menu[i].handle) {
23603
+ menu[i].handle(props.scopeThis, index);
23621
23604
  }
23622
- return result
23623
- },
23624
- },
23605
+ result = true;
23606
+ break
23607
+ }
23608
+ // 存在子节点,递归调用
23609
+ if (!!menu[i].menu && menu[i].menu.length > 0) {
23610
+ result = handleRun(index, menu[i].menu, index0);
23611
+ if (!!result) {
23612
+ break
23613
+ }
23614
+ }
23615
+ }
23616
+ return result
23617
+ };
23618
+
23619
+ const handleSelect = key=>{
23620
+ handleRun(key, this.myProps.menu, '');
23625
23621
  };
23626
23622
 
23627
- function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23623
+ const handleOpen = key=>{};
23624
+ const handleClose = key=> {};
23625
+
23626
+ return (_ctx, _cache) => {
23628
23627
  const _component_el_menu_item = vue.resolveComponent("el-menu-item");
23629
23628
  const _component_el_sub_menu = vue.resolveComponent("el-sub-menu");
23630
23629
  const _component_el_menu = vue.resolveComponent("el-menu");
23631
23630
 
23632
23631
  return (vue.openBlock(), vue.createBlock(_component_el_menu, {
23633
- mode: $options.myProps0.mode,
23634
- "default-active": $options.myProps0.defaultActive,
23635
- onOpen: $options.handleOpen,
23636
- onClose: $options.handleClose,
23637
- onSelect: $options.handleSelect,
23638
- "background-color": $options.myProps0.backgroundColor,
23639
- "text-color": $options.myProps0.textColor,
23640
- "active-text-color": $options.myProps0.activeTextColor,
23632
+ mode: myProps0.value.mode,
23633
+ "default-active": myProps0.value.defaultActive,
23634
+ onOpen: handleOpen,
23635
+ onClose: handleClose,
23636
+ onSelect: handleSelect,
23637
+ "background-color": myProps0.value.backgroundColor,
23638
+ "text-color": myProps0.value.textColor,
23639
+ "active-text-color": myProps0.value.activeTextColor,
23641
23640
  "menu-trigger": "hover",
23642
- style: vue.normalizeStyle('--el-menu-horizontal-height: ' + $options.myProps0.horizontalHeight + '; ' +
23643
- $options.myProps0.styleBase + ' ' +
23644
- $options.myProps0.style)
23641
+ style: vue.normalizeStyle('--el-menu-horizontal-height: ' + myProps0.value.horizontalHeight + '; ' +
23642
+ myProps0.value.styleBase + ' ' +
23643
+ myProps0.value.style)
23645
23644
  }, {
23646
23645
  default: vue.withCtx(() => [
23647
23646
  vue.createCommentVNode(" 第1层 "),
23648
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.myProps.menu, (item, index) => {
23647
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.myProps.menu, (item, index) => {
23649
23648
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
23650
23649
  key: item.index ? item.index : String(index)
23651
23650
  }, [
@@ -23657,7 +23656,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23657
23656
  'disabled' in item
23658
23657
  ? item.disabled
23659
23658
  : 'hdlDisabled' in item
23660
- ? item.hdlDisabled(item, index)
23659
+ ? item.hdlDisabled(__props.scopeThis, item, index)
23661
23660
  : false
23662
23661
 
23663
23662
  }, {
@@ -23686,7 +23685,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23686
23685
  'disabled' in item0
23687
23686
  ? item0.disabled
23688
23687
  : 'hdlDisabled' in item0
23689
- ? item0.hdlDisabled(item0, index0)
23688
+ ? item0.hdlDisabled(__props.scopeThis, item0, index0)
23690
23689
  : false
23691
23690
 
23692
23691
  }, {
@@ -23723,7 +23722,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23723
23722
  'disabled' in item1
23724
23723
  ? item1.disabled
23725
23724
  : 'hdlDisabled' in item1
23726
- ? item1.hdlDisabled(item1, index1)
23725
+ ? item1.hdlDisabled(__props.scopeThis, item1, index1)
23727
23726
  : false
23728
23727
 
23729
23728
  }, {
@@ -23764,7 +23763,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23764
23763
  'disabled' in item2
23765
23764
  ? item2.disabled
23766
23765
  : 'hdlDisabled' in item2
23767
- ? item2.hdlDisabled(item2, index2)
23766
+ ? item2.hdlDisabled(__props.scopeThis, item2, index2)
23768
23767
  : false
23769
23768
 
23770
23769
  }, {
@@ -23802,7 +23801,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23802
23801
  'disabled' in item3
23803
23802
  ? item3.disabled
23804
23803
  : 'hdlDisabled' in item3
23805
- ? item3.hdlDisabled(item3, index3)
23804
+ ? item3.hdlDisabled(__props.scopeThis, item3, index3)
23806
23805
  : false
23807
23806
 
23808
23807
  }, {
@@ -23834,10 +23833,12 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23834
23833
  }), 128 /* KEYED_FRAGMENT */))
23835
23834
  ]),
23836
23835
  _: 1 /* STABLE */
23837
- }, 8 /* PROPS */, ["mode", "default-active", "onOpen", "onClose", "onSelect", "background-color", "text-color", "active-text-color", "style"]))
23836
+ }, 8 /* PROPS */, ["mode", "default-active", "background-color", "text-color", "active-text-color", "style"]))
23838
23837
  }
23838
+ }
23839
+
23840
+ };
23839
23841
 
23840
- script$d.render = render$6;
23841
23842
  script$d.__file = "src/menu/index.vue";
23842
23843
 
23843
23844
  var quill$1 = {exports: {}};