mali-ui-plus 1.0.147 → 1.0.149

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.
@@ -69628,59 +69628,64 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
69628
69628
  checkedRows: []
69629
69629
  });
69630
69630
  };
69631
- // const checkStrictlyEvent = (row: any, checked: boolean) => {
69632
- // const nodeOts = nodeOpts.value
69633
- // const childKeys: any[] = []
69634
- // if (props.indeterminateToChecked) {
69635
- // if (row.children && row.children.length > 0) {
69636
- // XEUtils.eachTree(row.children, item => {
69637
- // childKeys.push(item[nodeOts.key])
69638
- // })
69639
- // }
69640
- // const matchRest = XEUtils.findTree(props.data || [], item => item[nodeOts.key] === row[nodeOts.key])
69641
- // if (checked) {
69642
- // if (matchRest) {
69643
- // matchRest.nodes.forEach((parentItem, index) => {
69644
- // if (index < matchRest.nodes.length - 1) {
69645
- // const parentItemKey = parentItem[nodeOts.key]
69646
- // if (parentItemKey && String(parentItemKey) !== '-1') {
69647
- // childKeys.push(parentItemKey)
69648
- // }
69649
- // }
69650
- // })
69651
- // }
69652
- // childKeys.forEach(itemKey => {
69653
- // if (checked) {
69654
- // if (!selectRowMaps.checked.includes(itemKey)) {
69655
- // selectRowMaps.checked.push(itemKey)
69656
- // }
69657
- // } else {
69658
- // const index = XEUtils.findIndexOf(selectRowMaps.checked, key => key === itemKey)
69659
- // if (index > -1) {
69660
- // selectRowMaps.checked.splice(index, 1)
69661
- // }
69662
- // }
69663
- // })
69664
- // } else {
69665
- // if (matchRest) {
69666
- // for (let len = matchRest.nodes.length - 1; len >= 0; len--) {
69667
- // const parentItem = matchRest.nodes[len]
69668
- // if (!parentItem[nodeOts.children] || !parentItem[nodeOts.children].some((item: any) => {
69669
- // if (childKeys.includes(item[nodeOts.key])) {
69670
- // return false
69671
- // }
69672
- // return selectRowMaps.checked.includes(item[nodeOts.key])
69673
- // })) {
69674
- // childKeys.push(parentItem[nodeOts.key])
69675
- // }
69676
- // }
69677
- // }
69678
- // selectRowMaps.checked = selectRowMaps.checked.filter(key => !childKeys.includes(key))
69679
- // }
69680
- // }
69681
- // emit('update:checkRowKeys', selectRowMaps.checked)
69682
- // emit('checkbox-change', { row, checked, checkedKeys: selectRowMaps.checked, checkedRows: [] })
69683
- // }
69631
+ const checkStrictlyEvent = (row, checked) => {
69632
+ const nodeOts = nodeOpts.value;
69633
+ const childKeys = [];
69634
+ if (props.indeterminateToChecked) {
69635
+ if (row.children && row.children.length > 0) {
69636
+ xe_utils_default().eachTree(row.children, item => {
69637
+ childKeys.push(item[nodeOts.key]);
69638
+ });
69639
+ }
69640
+ const matchRest = xe_utils_default().findTree(props.data || [], item => item[nodeOts.key] === row[nodeOts.key]);
69641
+ if (checked) {
69642
+ if (matchRest) {
69643
+ matchRest.nodes.forEach((parentItem, index) => {
69644
+ if (index < matchRest.nodes.length - 1) {
69645
+ const parentItemKey = parentItem[nodeOts.key];
69646
+ if (parentItemKey && String(parentItemKey) !== '-1') {
69647
+ childKeys.push(parentItemKey);
69648
+ }
69649
+ }
69650
+ });
69651
+ }
69652
+ childKeys.forEach(itemKey => {
69653
+ if (checked) {
69654
+ if (!selectRowMaps.checked.includes(itemKey)) {
69655
+ selectRowMaps.checked.push(itemKey);
69656
+ }
69657
+ } else {
69658
+ const index = xe_utils_default().findIndexOf(selectRowMaps.checked, key => key === itemKey);
69659
+ if (index > -1) {
69660
+ selectRowMaps.checked.splice(index, 1);
69661
+ }
69662
+ }
69663
+ });
69664
+ } else {
69665
+ if (matchRest) {
69666
+ for (let len = matchRest.nodes.length - 1; len >= 0; len--) {
69667
+ const parentItem = matchRest.nodes[len];
69668
+ if (!parentItem[nodeOts.children] || !parentItem[nodeOts.children].some(item => {
69669
+ if (childKeys.includes(item[nodeOts.key])) {
69670
+ return false;
69671
+ }
69672
+ return selectRowMaps.checked.includes(item[nodeOts.key]);
69673
+ })) {
69674
+ childKeys.push(parentItem[nodeOts.key]);
69675
+ }
69676
+ }
69677
+ }
69678
+ selectRowMaps.checked = selectRowMaps.checked.filter(key => !childKeys.includes(key));
69679
+ }
69680
+ }
69681
+ emit('update:checkRowKeys', selectRowMaps.checked);
69682
+ emit('checkbox-change', {
69683
+ row,
69684
+ checked,
69685
+ checkedKeys: selectRowMaps.checked,
69686
+ checkedRows: []
69687
+ });
69688
+ };
69684
69689
  const mlTree = {
69685
69690
  getCheckboxRecords,
69686
69691
  setCheckboxRowKeys,
@@ -69756,10 +69761,10 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
69756
69761
  "default-expanded-keys": expandRowKeys.value,
69757
69762
  data: __props.data,
69758
69763
  onCurrentChange: selectEvent,
69759
- onCheckChange: checkEvent,
69764
+ onCheckChange: checkStrictlyEvent,
69760
69765
  onNodeExpand: expandEvent
69761
69766
  }, {
69762
- title: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69767
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69763
69768
  data
69764
69769
  }) => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "title", (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.guardReactiveProps)({
69765
69770
  row: data
@@ -69780,7 +69785,7 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
69780
69785
  onCheckChange: checkEvent,
69781
69786
  onNodeExpand: expandEvent
69782
69787
  }, {
69783
- title: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69788
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69784
69789
  data
69785
69790
  }) => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "title", (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.guardReactiveProps)({
69786
69791
  row: data
@@ -76592,7 +76597,7 @@ function index_config(options) {
76592
76597
  return config_0;
76593
76598
  }
76594
76599
  const MaliUI = {
76595
- version: "1.0.146",
76600
+ version: "1.0.148",
76596
76601
  install: index_install,
76597
76602
  config: index_config,
76598
76603
  renderer: index_esm.renderer,
@@ -69638,59 +69638,64 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
69638
69638
  checkedRows: []
69639
69639
  });
69640
69640
  };
69641
- // const checkStrictlyEvent = (row: any, checked: boolean) => {
69642
- // const nodeOts = nodeOpts.value
69643
- // const childKeys: any[] = []
69644
- // if (props.indeterminateToChecked) {
69645
- // if (row.children && row.children.length > 0) {
69646
- // XEUtils.eachTree(row.children, item => {
69647
- // childKeys.push(item[nodeOts.key])
69648
- // })
69649
- // }
69650
- // const matchRest = XEUtils.findTree(props.data || [], item => item[nodeOts.key] === row[nodeOts.key])
69651
- // if (checked) {
69652
- // if (matchRest) {
69653
- // matchRest.nodes.forEach((parentItem, index) => {
69654
- // if (index < matchRest.nodes.length - 1) {
69655
- // const parentItemKey = parentItem[nodeOts.key]
69656
- // if (parentItemKey && String(parentItemKey) !== '-1') {
69657
- // childKeys.push(parentItemKey)
69658
- // }
69659
- // }
69660
- // })
69661
- // }
69662
- // childKeys.forEach(itemKey => {
69663
- // if (checked) {
69664
- // if (!selectRowMaps.checked.includes(itemKey)) {
69665
- // selectRowMaps.checked.push(itemKey)
69666
- // }
69667
- // } else {
69668
- // const index = XEUtils.findIndexOf(selectRowMaps.checked, key => key === itemKey)
69669
- // if (index > -1) {
69670
- // selectRowMaps.checked.splice(index, 1)
69671
- // }
69672
- // }
69673
- // })
69674
- // } else {
69675
- // if (matchRest) {
69676
- // for (let len = matchRest.nodes.length - 1; len >= 0; len--) {
69677
- // const parentItem = matchRest.nodes[len]
69678
- // if (!parentItem[nodeOts.children] || !parentItem[nodeOts.children].some((item: any) => {
69679
- // if (childKeys.includes(item[nodeOts.key])) {
69680
- // return false
69681
- // }
69682
- // return selectRowMaps.checked.includes(item[nodeOts.key])
69683
- // })) {
69684
- // childKeys.push(parentItem[nodeOts.key])
69685
- // }
69686
- // }
69687
- // }
69688
- // selectRowMaps.checked = selectRowMaps.checked.filter(key => !childKeys.includes(key))
69689
- // }
69690
- // }
69691
- // emit('update:checkRowKeys', selectRowMaps.checked)
69692
- // emit('checkbox-change', { row, checked, checkedKeys: selectRowMaps.checked, checkedRows: [] })
69693
- // }
69641
+ const checkStrictlyEvent = (row, checked) => {
69642
+ const nodeOts = nodeOpts.value;
69643
+ const childKeys = [];
69644
+ if (props.indeterminateToChecked) {
69645
+ if (row.children && row.children.length > 0) {
69646
+ xe_utils_default().eachTree(row.children, item => {
69647
+ childKeys.push(item[nodeOts.key]);
69648
+ });
69649
+ }
69650
+ const matchRest = xe_utils_default().findTree(props.data || [], item => item[nodeOts.key] === row[nodeOts.key]);
69651
+ if (checked) {
69652
+ if (matchRest) {
69653
+ matchRest.nodes.forEach((parentItem, index) => {
69654
+ if (index < matchRest.nodes.length - 1) {
69655
+ const parentItemKey = parentItem[nodeOts.key];
69656
+ if (parentItemKey && String(parentItemKey) !== '-1') {
69657
+ childKeys.push(parentItemKey);
69658
+ }
69659
+ }
69660
+ });
69661
+ }
69662
+ childKeys.forEach(itemKey => {
69663
+ if (checked) {
69664
+ if (!selectRowMaps.checked.includes(itemKey)) {
69665
+ selectRowMaps.checked.push(itemKey);
69666
+ }
69667
+ } else {
69668
+ const index = xe_utils_default().findIndexOf(selectRowMaps.checked, key => key === itemKey);
69669
+ if (index > -1) {
69670
+ selectRowMaps.checked.splice(index, 1);
69671
+ }
69672
+ }
69673
+ });
69674
+ } else {
69675
+ if (matchRest) {
69676
+ for (let len = matchRest.nodes.length - 1; len >= 0; len--) {
69677
+ const parentItem = matchRest.nodes[len];
69678
+ if (!parentItem[nodeOts.children] || !parentItem[nodeOts.children].some(item => {
69679
+ if (childKeys.includes(item[nodeOts.key])) {
69680
+ return false;
69681
+ }
69682
+ return selectRowMaps.checked.includes(item[nodeOts.key]);
69683
+ })) {
69684
+ childKeys.push(parentItem[nodeOts.key]);
69685
+ }
69686
+ }
69687
+ }
69688
+ selectRowMaps.checked = selectRowMaps.checked.filter(key => !childKeys.includes(key));
69689
+ }
69690
+ }
69691
+ emit('update:checkRowKeys', selectRowMaps.checked);
69692
+ emit('checkbox-change', {
69693
+ row,
69694
+ checked,
69695
+ checkedKeys: selectRowMaps.checked,
69696
+ checkedRows: []
69697
+ });
69698
+ };
69694
69699
  const mlTree = {
69695
69700
  getCheckboxRecords,
69696
69701
  setCheckboxRowKeys,
@@ -69766,10 +69771,10 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
69766
69771
  "default-expanded-keys": expandRowKeys.value,
69767
69772
  data: __props.data,
69768
69773
  onCurrentChange: selectEvent,
69769
- onCheckChange: checkEvent,
69774
+ onCheckChange: checkStrictlyEvent,
69770
69775
  onNodeExpand: expandEvent
69771
69776
  }, {
69772
- title: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69777
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69773
69778
  data
69774
69779
  }) => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "title", (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.guardReactiveProps)({
69775
69780
  row: data
@@ -69790,7 +69795,7 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
69790
69795
  onCheckChange: checkEvent,
69791
69796
  onNodeExpand: expandEvent
69792
69797
  }, {
69793
- title: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69798
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(({
69794
69799
  data
69795
69800
  }) => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "title", (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.guardReactiveProps)({
69796
69801
  row: data
@@ -76602,7 +76607,7 @@ function index_config(options) {
76602
76607
  return config_0;
76603
76608
  }
76604
76609
  const MaliUI = {
76605
- version: "1.0.146",
76610
+ version: "1.0.148",
76606
76611
  install: index_install,
76607
76612
  config: index_config,
76608
76613
  renderer: index_esm.renderer,