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