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