@yoooloo42/joker 1.0.62 → 1.0.64

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
@@ -22414,7 +22414,7 @@ var styleModule = {
22414
22414
 
22415
22415
  var script$h = {
22416
22416
  __name: 'LabelBox',
22417
- props: ["myProps", "dataBox", "item"],
22417
+ props: ["scopeThis", "myProps", "dataBox", "item"],
22418
22418
  setup(__props) {
22419
22419
 
22420
22420
  const props = __props;
@@ -22426,7 +22426,7 @@ const style = ref({
22426
22426
 
22427
22427
  const hdlClick = () => {
22428
22428
  if(props.item.hdlLabelClick){
22429
- props.item.hdlLabelClick(props.dataBox.fieldsValue, props.item);
22429
+ props.item.hdlLabelClick(props.scopeThis, props.dataBox.fieldsValue, props.item);
22430
22430
  }
22431
22431
  };
22432
22432
 
@@ -22481,7 +22481,7 @@ const _hoisted_28 = { key: 30 };
22481
22481
 
22482
22482
  var script$g = {
22483
22483
  __name: 'InputBox',
22484
- props: ["myProps", "dataBox", "item"],
22484
+ props: ["scopeThis", "myProps", "dataBox", "item"],
22485
22485
  setup(__props) {
22486
22486
 
22487
22487
  const props = __props;
@@ -22511,7 +22511,7 @@ const select = reactive({
22511
22511
  }),
22512
22512
  hdlChange: value => {
22513
22513
  if (props.item.hdlChange) {
22514
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22514
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22515
22515
  }
22516
22516
  }
22517
22517
  });
@@ -22543,7 +22543,7 @@ const datePicker = reactive({
22543
22543
  }),
22544
22544
  hdlChange: value => {
22545
22545
  if (props.item.hdlChange) {
22546
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22546
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22547
22547
  }
22548
22548
  }
22549
22549
  });
@@ -22551,7 +22551,7 @@ const datePicker = reactive({
22551
22551
  const ly0switch = reactive({
22552
22552
  hdlChange: value => {
22553
22553
  if (props.item.hdlChange) {
22554
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22554
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22555
22555
  }
22556
22556
  }
22557
22557
  });
@@ -22559,7 +22559,7 @@ const ly0switch = reactive({
22559
22559
  const radioGroup = reactive({
22560
22560
  hdlChange: value => {
22561
22561
  if (props.item.hdlChange) {
22562
- props.item.hdlChange(props.dataBox.fieldsValue, props.item, value);
22562
+ props.item.hdlChange(props.scopeThis, props.dataBox.fieldsValue, props.item, value);
22563
22563
  }
22564
22564
  }
22565
22565
  });
@@ -22821,7 +22821,7 @@ return (_ctx, _cache) => {
22821
22821
  ? (openBlock(), createElementBlock("div", {
22822
22822
  key: 3,
22823
22823
  style: normalizeStyle(style.text(__props.item, __props.myProps))
22824
- }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
22824
+ }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.scopeThis, __props.dataBox.fieldsValue, __props.item)
22825
22825
  ? __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
22826
22826
  : ' '), 5 /* TEXT, STYLE */))
22827
22827
  : createCommentVNode("v-if", true),
@@ -22829,7 +22829,7 @@ return (_ctx, _cache) => {
22829
22829
  ? (openBlock(), createElementBlock("div", {
22830
22830
  key: 4,
22831
22831
  style: normalizeStyle(style.text0(__props.item))
22832
- }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
22832
+ }, toDisplayString(__props.item.hdlExpression && __props.item.hdlExpression(__props.scopeThis, __props.dataBox.fieldsValue, __props.item)
22833
22833
  ? __props.item.hdlExpression(__props.dataBox.fieldsValue, __props.item)
22834
22834
  : ' '), 5 /* TEXT, STYLE */))
22835
22835
  : createCommentVNode("v-if", true),
@@ -22962,7 +22962,7 @@ return (_ctx, _cache) => {
22962
22962
  plain: style.button_group(__props.item, item0, item1).button.facade.plain,
22963
22963
  round: style.button_group(__props.item, item0, item1).button.facade.round,
22964
22964
  circle: style.button_group(__props.item, item0, item1).button.facade.circle,
22965
- onClick: $event => (item1.hdlClick ? item1.hdlClick(__props.dataBox.fieldsValue, __props.item) : null),
22965
+ onClick: $event => (item1.hdlClick ? item1.hdlClick(__props.scopeThis, __props.dataBox.fieldsValue, __props.item) : null),
22966
22966
  key: index1
22967
22967
  }, {
22968
22968
  default: withCtx(() => [
@@ -23276,7 +23276,7 @@ const _hoisted_4$6 = ["colspan"];
23276
23276
 
23277
23277
  var script$f = {
23278
23278
  __name: 'Form',
23279
- props: ["myProps", "dataBox"],
23279
+ props: ["scopeThis", "myProps", "dataBox"],
23280
23280
  setup(__props) {
23281
23281
 
23282
23282
  const style = reactive({
@@ -23299,8 +23299,9 @@ return (_ctx, _cache) => {
23299
23299
  (__props.myProps.menu && __props.myProps.menu.menu && __props.myProps.menu.menu.length > 0)
23300
23300
  ? (openBlock(), createBlock(_component_ly0Menu, {
23301
23301
  key: 0,
23302
+ scopeThis: __props.scopeThis,
23302
23303
  myProps: __props.myProps.menu
23303
- }, null, 8 /* PROPS */, ["myProps"]))
23304
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps"]))
23304
23305
  : createCommentVNode("v-if", true),
23305
23306
  createCommentVNode(" 表单区域可以分为多个列 "),
23306
23307
  createElementVNode("div", {
@@ -23312,7 +23313,7 @@ return (_ctx, _cache) => {
23312
23313
  createElementVNode("tbody", null, [
23313
23314
  (openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (item0, index0) => {
23314
23315
  return (openBlock(), createElementBlock(Fragment, { key: index0 }, [
23315
- (item0.hdlVisible ? item0.hdlVisible(__props.dataBox.fieldsValue) : true)
23316
+ (item0.hdlVisible ? item0.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue) : true)
23316
23317
  ? (openBlock(), createElementBlock("tr", _hoisted_1$d, [
23317
23318
  (!!item0.label)
23318
23319
  ? (openBlock(), createElementBlock("td", {
@@ -23320,10 +23321,11 @@ return (_ctx, _cache) => {
23320
23321
  style: normalizeStyle(style.field_box.left)
23321
23322
  }, [
23322
23323
  createVNode(script$h, {
23324
+ scopeThis: __props.scopeThis,
23323
23325
  myProps: __props.myProps,
23324
23326
  dataBox: __props.dataBox,
23325
23327
  item: item0
23326
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
23328
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
23327
23329
  ], 4 /* STYLE */))
23328
23330
  : createCommentVNode("v-if", true),
23329
23331
  createElementVNode("td", {
@@ -23344,7 +23346,7 @@ return (_ctx, _cache) => {
23344
23346
  default: withCtx(() => [
23345
23347
  (openBlock(true), createElementBlock(Fragment, null, renderList(item0.items, (item1, index1) => {
23346
23348
  return (openBlock(), createElementBlock(Fragment, { key: index1 }, [
23347
- (item1.hdlVisible ? item1.hdlVisible(__props.dataBox.fieldsValue) : true)
23349
+ (item1.hdlVisible ? item1.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue) : true)
23348
23350
  ? (openBlock(), createBlock(_component_el_collapse_item, {
23349
23351
  key: 0,
23350
23352
  title: item1.title,
@@ -23358,7 +23360,7 @@ return (_ctx, _cache) => {
23358
23360
  return (openBlock(), createElementBlock(Fragment, { key: index2 }, [
23359
23361
  (
23360
23362
  item2.hdlVisible
23361
- ? item2.hdlVisible(__props.dataBox.fieldsValue)
23363
+ ? item2.hdlVisible(__props.scopeThis, __props.dataBox.fieldsValue)
23362
23364
  : true
23363
23365
  )
23364
23366
  ? (openBlock(), createElementBlock("tr", _hoisted_3$7, [
@@ -23368,10 +23370,11 @@ return (_ctx, _cache) => {
23368
23370
  style: normalizeStyle(style.field_box.left)
23369
23371
  }, [
23370
23372
  createVNode(script$h, {
23373
+ scopeThis: __props.scopeThis,
23371
23374
  myProps: __props.myProps,
23372
23375
  dataBox: __props.dataBox,
23373
23376
  item: item2
23374
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
23377
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
23375
23378
  ], 4 /* STYLE */))
23376
23379
  : createCommentVNode("v-if", true),
23377
23380
  createElementVNode("td", {
@@ -23379,10 +23382,11 @@ return (_ctx, _cache) => {
23379
23382
  colspan: style.no_field_label(item2)
23380
23383
  }, [
23381
23384
  createVNode(script$g, {
23385
+ scopeThis: __props.scopeThis,
23382
23386
  myProps: __props.myProps,
23383
23387
  dataBox: __props.dataBox,
23384
23388
  item: item2
23385
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"])
23389
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"])
23386
23390
  ], 12 /* STYLE, PROPS */, _hoisted_4$6)
23387
23391
  ]))
23388
23392
  : createCommentVNode("v-if", true)
@@ -23400,10 +23404,11 @@ return (_ctx, _cache) => {
23400
23404
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
23401
23405
  : (openBlock(), createBlock(script$g, {
23402
23406
  key: 1,
23407
+ scopeThis: __props.scopeThis,
23403
23408
  myProps: __props.myProps,
23404
23409
  dataBox: __props.dataBox,
23405
23410
  item: item0
23406
- }, null, 8 /* PROPS */, ["myProps", "dataBox", "item"]))
23411
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox", "item"]))
23407
23412
  ], 12 /* STYLE, PROPS */, _hoisted_2$c)
23408
23413
  ]))
23409
23414
  : createCommentVNode("v-if", true)
@@ -23427,7 +23432,7 @@ return (_ctx, _cache) => {
23427
23432
  type: style.submit_box.button.facade.type,
23428
23433
  plain: style.submit_box.button.facade.plain,
23429
23434
  style: normalizeStyle(style.submit_box.button.style),
23430
- onClick: _cache[0] || (_cache[0] = $event => (__props.dataBox.hdlSubmit(__props.dataBox.fieldsValue)))
23435
+ onClick: _cache[0] || (_cache[0] = $event => (__props.dataBox.hdlSubmit(__props.scopeThis, __props.dataBox.fieldsValue)))
23431
23436
  }, {
23432
23437
  default: withCtx(() => [...(_cache[1] || (_cache[1] = [
23433
23438
  createTextVNode("提交", -1 /* CACHED */)
@@ -23499,7 +23504,7 @@ var ly0default$2 = {
23499
23504
 
23500
23505
  var script$e = {
23501
23506
  __name: 'index',
23502
- props: ["myProps", "dataBox"],
23507
+ props: ["scopeThis", "myProps", "dataBox"],
23503
23508
  setup(__props) {
23504
23509
 
23505
23510
  const props = __props;
@@ -23525,9 +23530,10 @@ return (_ctx, _cache) => {
23525
23530
  (myProps0.value)
23526
23531
  ? (openBlock(), createBlock(script$f, {
23527
23532
  key: 0,
23533
+ scopeThis: __props.scopeThis,
23528
23534
  myProps: myProps0.value,
23529
23535
  dataBox: __props.dataBox
23530
- }, null, 8 /* PROPS */, ["myProps", "dataBox"]))
23536
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox"]))
23531
23537
  : createCommentVNode("v-if", true)
23532
23538
  ]),
23533
23539
  _: 1 /* STABLE */
@@ -23535,9 +23541,10 @@ return (_ctx, _cache) => {
23535
23541
  : (myProps0.value)
23536
23542
  ? (openBlock(), createBlock(script$f, {
23537
23543
  key: 1,
23544
+ scopeThis: __props.scopeThis,
23538
23545
  myProps: myProps0.value,
23539
23546
  dataBox: __props.dataBox
23540
- }, null, 8 /* PROPS */, ["myProps", "dataBox"]))
23547
+ }, null, 8 /* PROPS */, ["scopeThis", "myProps", "dataBox"]))
23541
23548
  : createCommentVNode("v-if", true)
23542
23549
  }
23543
23550
  }
@@ -23561,87 +23568,79 @@ var ly0default$1 = {
23561
23568
  };
23562
23569
 
23563
23570
  var script$d = {
23564
- props: ['myProps'],
23565
- computed: {
23566
- myProps0(){
23567
- return Object.assign({}, ly0default$1.myProps, this.myProps)
23571
+ __name: 'index',
23572
+ props: ["scopeThis", "myProps"],
23573
+ setup(__props) {
23574
+
23575
+ const props = __props;
23576
+ const myProps0 = ref(Object.assign({}, ly0default$1.myProps, props.myProps));
23577
+
23578
+ const handleRun = (
23579
+ index, // 目标索引
23580
+ menu, // 当前菜单
23581
+ indexFather, // 父节点索引
23582
+ ) => {
23583
+ let result = false;
23584
+ // 遍历菜单节点
23585
+ for (let i = 0; i < menu.length; i++) {
23586
+ // 内部索引继承
23587
+ let index0 = indexFather ? indexFather + '-' + i : '' + i;
23588
+ // 节点存在自定义索引
23589
+ if (!!menu[i].index && index === menu[i].index) {
23590
+ if (menu[i].handle) {
23591
+ menu[i].handle(props.scopeThis, index);
23592
+ }
23593
+ result = true;
23594
+ break
23568
23595
  }
23569
- },
23570
- methods: {
23571
- handleSelect(
23572
- key,
23573
- // keyPath
23574
- ) {
23575
- this.handleRun(key, this.myProps.menu, '');
23576
- },
23577
- handleOpen() {},
23578
- // key,
23579
- // keyPath
23580
- handleClose() {},
23581
- // key,
23582
- // keyPath
23583
- // 执行菜单句柄
23584
- handleRun(
23585
- index, // 目标索引
23586
- menu, // 当前菜单
23587
- indexFather, // 父节点索引
23588
- ) {
23589
- let result = false;
23590
- // 遍历菜单节点
23591
- for (let i = 0; i < menu.length; i++) {
23592
- // 内部索引继承
23593
- let index0 = indexFather ? indexFather + '-' + i : '' + i;
23594
- // 节点存在自定义索引
23595
- if (!!menu[i].index && index === menu[i].index) {
23596
- if (menu[i].handle) {
23597
- menu[i].handle(index);
23598
- }
23599
- result = true;
23600
- break
23601
- }
23602
- // 节点不存在自定义索引
23603
- if (index === index0) {
23604
- if (menu[i].handle) {
23605
- menu[i].handle(index);
23606
- }
23607
- result = true;
23608
- break
23609
- }
23610
- // 存在子节点,递归调用
23611
- if (!!menu[i].menu && menu[i].menu.length > 0) {
23612
- result = this.handleRun(index, menu[i].menu, index0);
23613
- if (!!result) {
23614
- break
23615
- }
23616
- }
23596
+ // 节点不存在自定义索引
23597
+ if (index === index0) {
23598
+ if (menu[i].handle) {
23599
+ menu[i].handle(props.scopeThis, index);
23617
23600
  }
23618
- return result
23619
- },
23620
- },
23601
+ result = true;
23602
+ break
23603
+ }
23604
+ // 存在子节点,递归调用
23605
+ if (!!menu[i].menu && menu[i].menu.length > 0) {
23606
+ result = handleRun(index, menu[i].menu, index0);
23607
+ if (!!result) {
23608
+ break
23609
+ }
23610
+ }
23611
+ }
23612
+ return result
23613
+ };
23614
+
23615
+ const handleSelect = key=>{
23616
+ handleRun(key, props.myProps.menu, '');
23621
23617
  };
23622
23618
 
23623
- function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23619
+ const handleOpen = key=>{};
23620
+ const handleClose = key=> {};
23621
+
23622
+ return (_ctx, _cache) => {
23624
23623
  const _component_el_menu_item = resolveComponent("el-menu-item");
23625
23624
  const _component_el_sub_menu = resolveComponent("el-sub-menu");
23626
23625
  const _component_el_menu = resolveComponent("el-menu");
23627
23626
 
23628
23627
  return (openBlock(), createBlock(_component_el_menu, {
23629
- mode: $options.myProps0.mode,
23630
- "default-active": $options.myProps0.defaultActive,
23631
- onOpen: $options.handleOpen,
23632
- onClose: $options.handleClose,
23633
- onSelect: $options.handleSelect,
23634
- "background-color": $options.myProps0.backgroundColor,
23635
- "text-color": $options.myProps0.textColor,
23636
- "active-text-color": $options.myProps0.activeTextColor,
23628
+ mode: myProps0.value.mode,
23629
+ "default-active": myProps0.value.defaultActive,
23630
+ onOpen: handleOpen,
23631
+ onClose: handleClose,
23632
+ onSelect: handleSelect,
23633
+ "background-color": myProps0.value.backgroundColor,
23634
+ "text-color": myProps0.value.textColor,
23635
+ "active-text-color": myProps0.value.activeTextColor,
23637
23636
  "menu-trigger": "hover",
23638
- style: normalizeStyle('--el-menu-horizontal-height: ' + $options.myProps0.horizontalHeight + '; ' +
23639
- $options.myProps0.styleBase + ' ' +
23640
- $options.myProps0.style)
23637
+ style: normalizeStyle('--el-menu-horizontal-height: ' + myProps0.value.horizontalHeight + '; ' +
23638
+ myProps0.value.styleBase + ' ' +
23639
+ myProps0.value.style)
23641
23640
  }, {
23642
23641
  default: withCtx(() => [
23643
23642
  createCommentVNode(" 第1层 "),
23644
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.myProps.menu, (item, index) => {
23643
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.myProps.menu, (item, index) => {
23645
23644
  return (openBlock(), createElementBlock(Fragment, {
23646
23645
  key: item.index ? item.index : String(index)
23647
23646
  }, [
@@ -23653,7 +23652,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23653
23652
  'disabled' in item
23654
23653
  ? item.disabled
23655
23654
  : 'hdlDisabled' in item
23656
- ? item.hdlDisabled(item, index)
23655
+ ? item.hdlDisabled(__props.scopeThis, item, index)
23657
23656
  : false
23658
23657
 
23659
23658
  }, {
@@ -23682,7 +23681,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23682
23681
  'disabled' in item0
23683
23682
  ? item0.disabled
23684
23683
  : 'hdlDisabled' in item0
23685
- ? item0.hdlDisabled(item0, index0)
23684
+ ? item0.hdlDisabled(__props.scopeThis, item0, index0)
23686
23685
  : false
23687
23686
 
23688
23687
  }, {
@@ -23719,7 +23718,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23719
23718
  'disabled' in item1
23720
23719
  ? item1.disabled
23721
23720
  : 'hdlDisabled' in item1
23722
- ? item1.hdlDisabled(item1, index1)
23721
+ ? item1.hdlDisabled(__props.scopeThis, item1, index1)
23723
23722
  : false
23724
23723
 
23725
23724
  }, {
@@ -23760,7 +23759,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23760
23759
  'disabled' in item2
23761
23760
  ? item2.disabled
23762
23761
  : 'hdlDisabled' in item2
23763
- ? item2.hdlDisabled(item2, index2)
23762
+ ? item2.hdlDisabled(__props.scopeThis, item2, index2)
23764
23763
  : false
23765
23764
 
23766
23765
  }, {
@@ -23798,7 +23797,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23798
23797
  'disabled' in item3
23799
23798
  ? item3.disabled
23800
23799
  : 'hdlDisabled' in item3
23801
- ? item3.hdlDisabled(item3, index3)
23800
+ ? item3.hdlDisabled(__props.scopeThis, item3, index3)
23802
23801
  : false
23803
23802
 
23804
23803
  }, {
@@ -23830,10 +23829,12 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
23830
23829
  }), 128 /* KEYED_FRAGMENT */))
23831
23830
  ]),
23832
23831
  _: 1 /* STABLE */
23833
- }, 8 /* PROPS */, ["mode", "default-active", "onOpen", "onClose", "onSelect", "background-color", "text-color", "active-text-color", "style"]))
23832
+ }, 8 /* PROPS */, ["mode", "default-active", "background-color", "text-color", "active-text-color", "style"]))
23834
23833
  }
23834
+ }
23835
+
23836
+ };
23835
23837
 
23836
- script$d.render = render$6;
23837
23838
  script$d.__file = "src/menu/index.vue";
23838
23839
 
23839
23840
  var quill$1 = {exports: {}};