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