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