@yoooloo42/joker 1.0.21 → 1.0.23

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,4 +1,4 @@
1
- import { resolveComponent, createElementBlock, openBlock, createVNode, createCommentVNode, createBlock, withCtx, createTextVNode, createElementVNode, toDisplayString, normalizeStyle } from 'vue';
1
+ import { resolveComponent, createBlock, openBlock, normalizeStyle, withCtx, createCommentVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createVNode, createElementVNode } from 'vue';
2
2
 
3
3
  function _arrayLikeToArray(r, a) {
4
4
  (null == a || a > r.length) && (a = r.length);
@@ -15929,6 +15929,296 @@ var FileSaver = {
15929
15929
  jsonToExcel: jsonToExcel
15930
15930
  };
15931
15931
 
15932
+ var ly0default$1 = {
15933
+ myProps: {
15934
+ mode: 'horizontal',
15935
+ defaultActive: '',
15936
+ backgroundColor: '#545c64',
15937
+ textColor: '#fff',
15938
+ activeTextColor: '#ffd04b',
15939
+ horizontalHeight: '50px',
15940
+ styleBase: 'border: none;',
15941
+ style: '',
15942
+ menu: []
15943
+ }
15944
+ };
15945
+
15946
+ var script$6 = {
15947
+ props: ['scopeThis', 'myProps'],
15948
+ computed: {
15949
+ myProps0(){
15950
+ return Object.assign({}, ly0default$1.myProps, this.myProps)
15951
+ }
15952
+ },
15953
+ methods: {
15954
+ handleSelect(
15955
+ key,
15956
+ // keyPath
15957
+ ) {
15958
+ this.handleRun(key, this.myProps.menu, '');
15959
+ },
15960
+ handleOpen() {},
15961
+ // key,
15962
+ // keyPath
15963
+ handleClose() {},
15964
+ // key,
15965
+ // keyPath
15966
+ // 执行菜单句柄
15967
+ handleRun(
15968
+ index, // 目标索引
15969
+ menu, // 当前菜单
15970
+ indexFather, // 父节点索引
15971
+ ) {
15972
+ let result = false;
15973
+ // 遍历菜单节点
15974
+ for (let i = 0; i < menu.length; i++) {
15975
+ // 内部索引继承
15976
+ let index0 = indexFather ? indexFather + '-' + i : '' + i;
15977
+ // 节点存在自定义索引
15978
+ if (!!menu[i].index && index === menu[i].index) {
15979
+ if (menu[i].handle) {
15980
+ menu[i].handle(this.scopeThis, index);
15981
+ }
15982
+ result = true;
15983
+ break
15984
+ }
15985
+ // 节点不存在自定义索引
15986
+ if (index === index0) {
15987
+ if (menu[i].handle) {
15988
+ menu[i].handle(this.scopeThis, index);
15989
+ }
15990
+ result = true;
15991
+ break
15992
+ }
15993
+ // 存在子节点,递归调用
15994
+ if (!!menu[i].menu && menu[i].menu.length > 0) {
15995
+ result = this.handleRun(index, menu[i].menu, index0);
15996
+ if (!!result) {
15997
+ break
15998
+ }
15999
+ }
16000
+ }
16001
+ return result
16002
+ },
16003
+ },
16004
+ };
16005
+
16006
+ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
16007
+ const _component_el_menu_item = resolveComponent("el-menu-item");
16008
+ const _component_el_sub_menu = resolveComponent("el-sub-menu");
16009
+ const _component_el_menu = resolveComponent("el-menu");
16010
+
16011
+ return (openBlock(), createBlock(_component_el_menu, {
16012
+ mode: $options.myProps0.mode,
16013
+ "default-active": $options.myProps0.defaultActive,
16014
+ onOpen: $options.handleOpen,
16015
+ onClose: $options.handleClose,
16016
+ onSelect: $options.handleSelect,
16017
+ "background-color": $options.myProps0.backgroundColor,
16018
+ "text-color": $options.myProps0.textColor,
16019
+ "active-text-color": $options.myProps0.activeTextColor,
16020
+ "menu-trigger": "hover",
16021
+ style: normalizeStyle('--el-menu-horizontal-height: ' + $options.myProps0.horizontalHeight + '; ' +
16022
+ $options.myProps0.styleBase + ' ' +
16023
+ $options.myProps0.style)
16024
+ }, {
16025
+ default: withCtx(() => [
16026
+ createCommentVNode(" 第1层 "),
16027
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.myProps.menu, (item, index) => {
16028
+ return (openBlock(), createElementBlock(Fragment, {
16029
+ key: item.index ? item.index : String(index)
16030
+ }, [
16031
+ (!item.menu || item.menu.length === 0)
16032
+ ? (openBlock(), createBlock(_component_el_menu_item, {
16033
+ key: 0,
16034
+ index: item.index ? item.index : String(index),
16035
+ disabled:
16036
+ 'disabled' in item
16037
+ ? item.disabled
16038
+ : 'hdlDisabled' in item
16039
+ ? item.hdlDisabled($props.scopeThis, item, index)
16040
+ : false
16041
+
16042
+ }, {
16043
+ default: withCtx(() => [
16044
+ createTextVNode(toDisplayString(item.title), 1 /* TEXT */)
16045
+ ]),
16046
+ _: 2 /* DYNAMIC */
16047
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "disabled"]))
16048
+ : (openBlock(), createBlock(_component_el_sub_menu, {
16049
+ key: 1,
16050
+ index: item.index ? item.index : String(index)
16051
+ }, {
16052
+ title: withCtx(() => [
16053
+ createTextVNode(toDisplayString(item.title), 1 /* TEXT */)
16054
+ ]),
16055
+ default: withCtx(() => [
16056
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.menu, (item0, index0) => {
16057
+ return (openBlock(), createElementBlock(Fragment, {
16058
+ key: item0.index ? item0.index : String(index) + '-' + String(index0)
16059
+ }, [
16060
+ (!item0.menu || item0.menu.length === 0)
16061
+ ? (openBlock(), createBlock(_component_el_menu_item, {
16062
+ key: 0,
16063
+ index: item0.index ? item0.index : String(index) + '-' + String(index0),
16064
+ disabled:
16065
+ 'disabled' in item0
16066
+ ? item0.disabled
16067
+ : 'hdlDisabled' in item0
16068
+ ? item0.hdlDisabled($props.scopeThis, item0, index0)
16069
+ : false
16070
+
16071
+ }, {
16072
+ default: withCtx(() => [
16073
+ createTextVNode(toDisplayString(item0.title), 1 /* TEXT */)
16074
+ ]),
16075
+ _: 2 /* DYNAMIC */
16076
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "disabled"]))
16077
+ : (openBlock(), createBlock(_component_el_sub_menu, {
16078
+ key: 1,
16079
+ index: item0.index ? item0.index : String(index) + '-' + String(index0)
16080
+ }, {
16081
+ title: withCtx(() => [
16082
+ createTextVNode(toDisplayString(item0.title), 1 /* TEXT */)
16083
+ ]),
16084
+ default: withCtx(() => [
16085
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item0.menu, (item1, index1) => {
16086
+ return (openBlock(), createElementBlock(Fragment, {
16087
+ key:
16088
+ item1.index
16089
+ ? item1.index
16090
+ : String(index) + '-' + String(index0) + '-' + String(index1)
16091
+
16092
+ }, [
16093
+ (!item1.menu || item1.menu.length === 0)
16094
+ ? (openBlock(), createBlock(_component_el_menu_item, {
16095
+ key: 0,
16096
+ index:
16097
+ item1.index
16098
+ ? item1.index
16099
+ : String(index) + '-' + String(index0) + '-' + String(index1)
16100
+ ,
16101
+ disabled:
16102
+ 'disabled' in item1
16103
+ ? item1.disabled
16104
+ : 'hdlDisabled' in item1
16105
+ ? item1.hdlDisabled($props.scopeThis, item1, index1)
16106
+ : false
16107
+
16108
+ }, {
16109
+ default: withCtx(() => [
16110
+ createTextVNode(toDisplayString(item1.title), 1 /* TEXT */)
16111
+ ]),
16112
+ _: 2 /* DYNAMIC */
16113
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "disabled"]))
16114
+ : (openBlock(), createBlock(_component_el_sub_menu, {
16115
+ key: 1,
16116
+ index:
16117
+ item1.index
16118
+ ? item1.index
16119
+ : String(index) + '-' + String(index0) + '-' + String(index1)
16120
+
16121
+ }, {
16122
+ title: withCtx(() => [
16123
+ createTextVNode(toDisplayString(item1.title), 1 /* TEXT */)
16124
+ ]),
16125
+ default: withCtx(() => [
16126
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item1.menu, (item2, index2) => {
16127
+ return (openBlock(), createElementBlock(Fragment, {
16128
+ key:
16129
+ item2.index
16130
+ ? item2.index
16131
+ : String(index) + '-' + String(index0) + '-' + String(index1) + '-' + String(index2)
16132
+
16133
+ }, [
16134
+ (!item2.menu || item2.menu.length === 0)
16135
+ ? (openBlock(), createBlock(_component_el_menu_item, {
16136
+ key: 0,
16137
+ index:
16138
+ item2.index
16139
+ ? item2.index
16140
+ : String(index) + '-' + String(index0) + '-' + String(index1) + '-' + String(index2)
16141
+ ,
16142
+ disabled:
16143
+ 'disabled' in item2
16144
+ ? item2.disabled
16145
+ : 'hdlDisabled' in item2
16146
+ ? item2.hdlDisabled($props.scopeThis, item2, index2)
16147
+ : false
16148
+
16149
+ }, {
16150
+ default: withCtx(() => [
16151
+ createTextVNode(toDisplayString(item2.title), 1 /* TEXT */)
16152
+ ]),
16153
+ _: 2 /* DYNAMIC */
16154
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "disabled"]))
16155
+ : createCommentVNode("v-if", true),
16156
+ createVNode(_component_el_sub_menu, {
16157
+ else: "",
16158
+ index:
16159
+ item2.index
16160
+ ? item2.index
16161
+ : String(index) + '-' + String(index0) + '-' + String(index1) + '-' + String(index2)
16162
+
16163
+ }, {
16164
+ title: withCtx(() => [
16165
+ createTextVNode(toDisplayString(item2.title), 1 /* TEXT */)
16166
+ ]),
16167
+ default: withCtx(() => [
16168
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item2.menu, (item3, index3) => {
16169
+ return (openBlock(), createBlock(_component_el_menu_item, {
16170
+ key:
16171
+ item3.index
16172
+ ? item3.index
16173
+ : String(index) + '-' + String(index0) + '-' + String(index1) + '-' + String(index2) + '-' + String(index3)
16174
+ ,
16175
+ index:
16176
+ item3.index
16177
+ ? item3.index
16178
+ : String(index) + '-' + String(index0) + '-' + String(index1) + '-' + String(index2) + '-' + String(index3)
16179
+ ,
16180
+ disabled:
16181
+ 'disabled' in item3
16182
+ ? item3.disabled
16183
+ : 'hdlDisabled' in item3
16184
+ ? item3.hdlDisabled($props.scopeThis, item3, index3)
16185
+ : false
16186
+
16187
+ }, {
16188
+ default: withCtx(() => [
16189
+ createTextVNode(toDisplayString(item3.title), 1 /* TEXT */)
16190
+ ]),
16191
+ _: 2 /* DYNAMIC */
16192
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index", "disabled"]))
16193
+ }), 128 /* KEYED_FRAGMENT */))
16194
+ ]),
16195
+ _: 2 /* DYNAMIC */
16196
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index"])
16197
+ ], 64 /* STABLE_FRAGMENT */))
16198
+ }), 128 /* KEYED_FRAGMENT */))
16199
+ ]),
16200
+ _: 2 /* DYNAMIC */
16201
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index"]))
16202
+ ], 64 /* STABLE_FRAGMENT */))
16203
+ }), 128 /* KEYED_FRAGMENT */))
16204
+ ]),
16205
+ _: 2 /* DYNAMIC */
16206
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index"]))
16207
+ ], 64 /* STABLE_FRAGMENT */))
16208
+ }), 128 /* KEYED_FRAGMENT */))
16209
+ ]),
16210
+ _: 2 /* DYNAMIC */
16211
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["index"]))
16212
+ ], 64 /* STABLE_FRAGMENT */))
16213
+ }), 128 /* KEYED_FRAGMENT */))
16214
+ ]),
16215
+ _: 1 /* STABLE */
16216
+ }, 8 /* PROPS */, ["mode", "default-active", "onOpen", "onClose", "onSelect", "background-color", "text-color", "active-text-color", "style"]))
16217
+ }
16218
+
16219
+ script$6.render = render$6;
16220
+ script$6.__file = "src/menu/index.vue";
16221
+
15932
16222
  var ly0default = {
15933
16223
  myProps: {
15934
16224
  uploadUrl: '',
@@ -16891,6 +17181,7 @@ var upload = {
16891
17181
  var index = {
16892
17182
  install: function install(app, options) {
16893
17183
  // 全局注册组件
17184
+ app.component('ly0Menu', script$6);
16894
17185
  app.component('ly0Upload', upload.Upload);
16895
17186
  app.component('ly0Upload_avatar', upload.Upload_avatar);
16896
17187
  app.component('ly0Upload_carplate', upload.Upload_carplate);