@gingkoo/pandora-explorer 0.0.1-alpha.24 → 0.0.1-alpha.26

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/lib/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @gingkoo/pandora-explorer v0.0.1-alpha.24
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.26
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -877,6 +877,17 @@ function SuffixIcon({
877
877
  })
878
878
  });
879
879
  }
880
+ function UploadSvg() {
881
+ return jsx("svg", {
882
+ className: 'icon',
883
+ viewBox: '0 0 1024 1024',
884
+ version: '1.1',
885
+ xmlns: 'http://www.w3.org/2000/svg',
886
+ children: jsx("path", {
887
+ d: 'M768 640v128H256V640h-85.333v128c0 46.933 38.4 85.333 85.333 85.333h512c46.933 0 85.333-38.4 85.333-85.333V640H768zM298.667 384l60.16 60.16 110.506-110.08v348.587h85.334V334.08l110.506 110.08 60.16-60.16L512 170.667 298.667 384z'
888
+ })
889
+ });
890
+ }
880
891
 
881
892
  var css_248z$b = ".app-wrapper {\n height: 100%;\n}\n.frame-explorer-main {\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.frame-left {\n position: relative;\n border-right: 1px solid rgba(100, 100, 100, 0.1);\n height: 100%;\n}\n.frame-left::after {\n position: absolute;\n content: ' ';\n top: 50%;\n right: 1px;\n width: 1px;\n height: 18px;\n margin-left: -1px;\n margin-top: -9px;\n border: 1px solid #ddd;\n border-top: none;\n border-bottom: none;\n backdrop-filter: none;\n border-radius: 0;\n background: transparent;\n box-sizing: content-box;\n -webkit-backdrop-filter: blur(10px);\n z-index: 2;\n}\n.frame-right {\n border-right: 1px solid #f5f5f5;\n height: 100%;\n}\n.frame-right .frame-header {\n width: 100%;\n height: 85px;\n min-width: 400px;\n position: relative;\n background: #fff;\n}\n.frame-right .frame-main {\n position: relative;\n height: 100%;\n}\n.box {\n display: flex;\n}\n.box .item {\n position: relative;\n width: 100px;\n height: 100px;\n background: red;\n margin-left: 20px;\n transition: 0.3s;\n top: 0;\n left: 0;\n}\n.explorer-label-icon {\n display: inline-block;\n position: relative;\n box-sizing: border-box !important;\n}\n.explorer-label-icon > div {\n position: relative;\n width: 100%;\n height: 100%;\n border-radius: 50% !important;\n}\n.explorer-label-icon > div::after {\n width: 40%;\n height: 40%;\n border-radius: 50%;\n content: ' ';\n background: linear-gradient(45deg, #ffffff7d, #ffffff00);\n margin-top: 4px;\n position: absolute;\n right: 15%;\n top: 15%;\n}\n";
882
893
  styleInject(css_248z$b);
@@ -1910,7 +1921,7 @@ function Slider(props) {
1910
1921
  var css_248z$7 = ".explorer-menu {\n height: 100%;\n}\n";
1911
1922
  styleInject(css_248z$7);
1912
1923
 
1913
- var css_248z$6 = ".explorer-tree {\n width: 100%;\n height: 100%;\n}\n.explorer-tree-switch {\n height: 31px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n vertical-align: top !important;\n color: #aaa;\n border-radius: 2px;\n}\n.explorer-tree-switch:hover {\n color: #1890ff;\n background-color: rgba(0, 0, 0, 0.03);\n}\n.explorer-tree-switch.open {\n color: #1890ff;\n}\n.explorer-tree-switch.open > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-switch.loading {\n background: transparent;\n animation: rotate 1s linear infinite;\n}\n.explorer-tree-icon {\n display: inline-block;\n width: 20px;\n height: 20px;\n margin: 6px 0px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n border-radius: 5px;\n font-style: normal;\n pointer-events: none;\n vertical-align: top;\n}\n.explorer-tree-node {\n display: flex;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-node .node-title {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-node .node-menu {\n display: none;\n flex-shrink: 0;\n width: 30px;\n justify-content: center;\n align-items: center;\n}\n.explorer-tree-node .node-menu .node-menu-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 14px;\n height: 14px;\n border: 1px solid #ccc;\n border-radius: 2px;\n cursor: pointer;\n z-index: 50;\n background: #fff;\n color: #ccc;\n font-size: 7px;\n transition: 0.3s;\n}\n.explorer-tree-node .node-menu .node-menu-icon > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-node .node-menu .node-menu-icon:hover {\n border: 1px solid #1890ff;\n color: #1890ff;\n}\n.explorer-tree-node .node-input {\n display: inline-block;\n width: 100%;\n height: 24px;\n outline: 0;\n border: 1px solid #eee;\n border-radius: 3px;\n transition: 0.3s;\n padding: 0 5px;\n}\n.explorer-tree-node .node-input:hover {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node .node-input:focus {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node:hover .node-menu {\n display: flex;\n}\n.explorer-tree-row {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-row .row-item {\n display: flex;\n padding: 0 10px;\n flex: 1 0 0;\n user-select: none;\n}\n.explorer-tree-row .row-item .row-item-content {\n flex: 1 0 0;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-row .row-item .row-item-content > input {\n height: 24px;\n outline: none;\n width: 100%;\n outline: 0;\n border: 0;\n}\n.explorer-tree-row .row-item-check {\n display: flex;\n width: 19px;\n align-items: center;\n box-sizing: border-box;\n pointer-events: all;\n}\n.explorer-tree-row .row-item-check .btn-check {\n display: inline-block;\n height: 19px;\n width: 19px;\n flex-shrink: 0;\n z-index: 11;\n font-size: 20px;\n text-align: center;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.05);\n color: #fff;\n line-height: 0;\n opacity: 0;\n cursor: pointer;\n transition: opacity 0.3s;\n margin: 2px;\n}\n.explorer-tree-row .row-item-check .btn-check > svg {\n position: relative;\n width: 23px;\n height: 23px;\n left: -2px;\n top: -2px;\n}\n.explorer-tree-row .row-item-check.active .btn-check {\n opacity: 1;\n background: #3b8cff;\n}\n.explorer-tree.table .tree-scroll-x {\n width: 100%;\n overflow: hidden;\n overflow-x: auto;\n}\n.explorer-tree.table .tree-scroll-x::-webkit-scrollbar {\n display: none;\n}\n.explorer-tree.table .tree-scroll {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 10;\n overflow: auto;\n}\n.explorer-tree.table .rc-tree {\n height: calc(100% - 26px);\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n overflow: auto;\n}\n.explorer-tree.table .rc-tree-list {\n height: 100%;\n}\n.explorer-tree.table .rc-tree-checkbox {\n display: none !important;\n}\n.explorer-tree.table .rc-tree-treenode {\n border-radius: 2px;\n width: fit-content;\n opacity: 0.8;\n z-index: 100;\n pointer-events: all;\n}\n.explorer-tree.table .rc-tree-treenode:nth-child(odd) {\n background: #4664780d;\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n padding: 8px 0 0 8px;\n}\n.explorer-tree.table .rc-tree-treenode-leaf-last:last-child {\n height: 200px;\n width: 1px;\n}\n.explorer-tree.table .rc-tree-treenode-checkbox-checked {\n background: #cce8ff !important;\n border: 1px solid #99d1ff;\n}\n.explorer-tree .rc-tree-iconEle {\n height: 31px !important;\n vertical-align: top !important;\n width: auto !important;\n}\n.explorer-tree .rc-tree-treenode {\n position: relative;\n height: 31px;\n line-height: 31px;\n border: 1px solid transparent;\n display: flex;\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-content-wrapper {\n height: 31px !important;\n display: flex !important;\n flex: 1;\n margin-left: calc(24px - 20px);\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-selected {\n background-color: transparent;\n box-shadow: none;\n opacity: 1;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected {\n background-color: #cce8ff !important;\n border: 1px solid #1890ff;\n opacity: 0.8;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected .node-menu {\n display: flex;\n}\n.explorer-tree .rc-tree-treenode:hover {\n background: #e5f3ff !important;\n box-shadow: 0 0 0 1px transparent;\n}\n.explorer-tree .rc-tree-switcher {\n flex-shrink: 0;\n width: 20px !important;\n height: 31px !important;\n vertical-align: top !important;\n background-image: none !important;\n}\n.explorer-tree .rc-tree-title {\n display: inline-block;\n height: 31px;\n width: 100%;\n}\n.explorer-tree.showLine .rc-tree-indent {\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-indent-unit {\n width: 20px;\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::before {\n content: '';\n display: inline-block;\n position: absolute;\n width: 8px;\n top: calc(31px / 2);\n left: 10px;\n height: 1px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n top: 0;\n height: calc(31px / 2);\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::before {\n display: none;\n content: '';\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.explorer-checks .rc-tree-treenode:hover .row-item-check .btn-check {\n opacity: 1;\n}\n.explorer-tree .rc-tree-list-scrollbar-thumb {\n background: #bbb !important;\n}\n.explorer-tree .rc-tree-list-scrollbar {\n width: 5px !important;\n}\n.explorer-tree .node-motion {\n transition: all 0.3s;\n overflow-y: hidden;\n}\n.explorer-tree .rc-tree-child-tree {\n display: block;\n}\n.explorer-table-header {\n display: flex;\n width: fit-content;\n min-width: 100%;\n height: 25px;\n line-height: 25px;\n color: #448;\n border-bottom: 1px solid #e3e3e3;\n box-shadow: 0 6px 10px rgba(0, 0, 0, 0.05);\n background: #fff;\n}\n.explorer-table-header .item {\n padding: 0 10px 0 0;\n flex: 1 0 0;\n margin-left: -10px;\n border-right: 1px solid #eee;\n user-select: none;\n min-width: 80px;\n}\n.explorer-table-header .item:first-child {\n padding-left: 20px;\n}\n.explorer-table-header .resize {\n position: relative;\n flex: 0 0 20px;\n width: 20px;\n z-index: 10;\n cursor: col-resize;\n left: -10px;\n transition: background 0.2s;\n}\n.explorer-table-header .resize::before {\n content: '';\n position: fixed;\n width: 1px;\n height: 2000px;\n z-index: 10;\n margin-left: 10px;\n visibility: hidden;\n opacity: 0;\n transition: all 0.2s;\n}\n.explorer-table-header .resize:hover {\n background: #1890ff30;\n}\n.explorer-table-header .resize.resize-focus {\n z-index: 9999;\n}\n.explorer-table-header .resize.resize-focus:before {\n opacity: 1;\n background: #1890ff;\n visibility: visible;\n}\n.explorer-table-header .resize:last-child {\n flex: 0 0 10px;\n width: 10px;\n}\n.explorer-table-header.item-resize {\n z-index: 10;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
1924
+ var css_248z$6 = ".explorer-tree {\n width: 100%;\n height: 100%;\n}\n.explorer-tree-switch {\n height: 31px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n vertical-align: top !important;\n color: #aaa;\n border-radius: 2px;\n}\n.explorer-tree-switch:hover {\n color: #1890ff;\n background-color: rgba(0, 0, 0, 0.03);\n}\n.explorer-tree-switch.open {\n color: #1890ff;\n}\n.explorer-tree-switch.open > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-switch.loading {\n background: transparent;\n animation: rotate 1s linear infinite;\n}\n.explorer-tree-icon {\n display: inline-block;\n width: 20px;\n height: 20px;\n margin: 6px 0px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n border-radius: 5px;\n font-style: normal;\n pointer-events: none;\n vertical-align: top;\n}\n.explorer-tree-node {\n display: flex;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-node .node-title {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-node .node-menu {\n display: none;\n flex-shrink: 0;\n width: 30px;\n justify-content: center;\n align-items: center;\n}\n.explorer-tree-node .node-menu .node-menu-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 14px;\n height: 14px;\n border: 1px solid #ccc;\n border-radius: 2px;\n cursor: pointer;\n z-index: 50;\n background: #fff;\n color: #ccc;\n font-size: 7px;\n transition: 0.3s;\n}\n.explorer-tree-node .node-menu .node-menu-icon > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-node .node-menu .node-menu-icon:hover {\n border: 1px solid #1890ff;\n color: #1890ff;\n}\n.explorer-tree-node .node-input {\n display: inline-block;\n width: 100%;\n height: 24px;\n outline: 0;\n border: 1px solid #eee;\n border-radius: 3px;\n transition: 0.3s;\n padding: 0 5px;\n}\n.explorer-tree-node .node-input:hover {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node .node-input:focus {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node:hover .node-menu {\n display: flex;\n}\n.explorer-tree-row {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-row .row-item {\n display: flex;\n padding: 0 10px;\n flex: 1 0 0;\n user-select: none;\n}\n.explorer-tree-row .row-item .row-item-content {\n flex: 1 0 0;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-row .row-item .row-item-content > input {\n height: 24px;\n outline: none;\n width: 100%;\n outline: 0;\n border: 0;\n}\n.explorer-tree-row .row-item-check {\n display: flex;\n width: 19px;\n align-items: center;\n box-sizing: border-box;\n pointer-events: all;\n}\n.explorer-tree-row .row-item-check .btn-check {\n display: inline-block;\n height: 19px;\n width: 19px;\n flex-shrink: 0;\n z-index: 11;\n font-size: 20px;\n text-align: center;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.05);\n color: #fff;\n line-height: 0;\n opacity: 0;\n cursor: pointer;\n transition: opacity 0.3s;\n margin: 2px;\n}\n.explorer-tree-row .row-item-check .btn-check > svg {\n position: relative;\n width: 23px;\n height: 23px;\n left: -2px;\n top: -2px;\n}\n.explorer-tree-row .row-item-check.active .btn-check {\n opacity: 1;\n background: #3b8cff;\n}\n.explorer-tree.table .tree-scroll-x {\n width: 100%;\n overflow: hidden;\n overflow-x: auto;\n}\n.explorer-tree.table .tree-scroll-x::-webkit-scrollbar {\n display: none;\n}\n.explorer-tree.table .tree-scroll {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 10;\n overflow: auto;\n}\n.explorer-tree.table .rc-tree {\n height: calc(100% - 26px);\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n overflow: auto;\n}\n.explorer-tree.table .rc-tree-list {\n height: 100%;\n}\n.explorer-tree.table .rc-tree-checkbox {\n display: none !important;\n}\n.explorer-tree.table .rc-tree-treenode {\n border-radius: 2px;\n width: fit-content;\n opacity: 0.8;\n z-index: 100;\n pointer-events: all;\n}\n.explorer-tree.table .rc-tree-treenode:nth-child(odd) {\n background: #4664780d;\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n padding: 8px 0 0 8px;\n}\n.explorer-tree.table .rc-tree-treenode-leaf-last:last-child {\n height: 200px;\n width: 1px;\n}\n.explorer-tree.table .rc-tree-treenode-checkbox-checked {\n background: #cce8ff !important;\n border: 1px solid #99d1ff;\n}\n.explorer-tree .rc-tree-iconEle {\n height: 31px !important;\n vertical-align: top !important;\n width: auto !important;\n}\n.explorer-tree .rc-tree-treenode {\n position: relative;\n height: 31px;\n line-height: 31px;\n border: 1px solid transparent;\n display: flex;\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-content-wrapper {\n height: 31px !important;\n display: flex !important;\n flex: 1;\n margin-left: calc(24px - 20px);\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-selected {\n background-color: transparent;\n box-shadow: none;\n opacity: 1;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected {\n background-color: #cce8ff !important;\n border: 1px solid #1890ff;\n opacity: 0.8;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected .node-menu {\n display: flex;\n}\n.explorer-tree .rc-tree-treenode:hover {\n background: #e5f3ff !important;\n box-shadow: 0 0 0 1px transparent;\n}\n.explorer-tree .rc-tree-treenode.hover {\n background: #e5f3ff !important;\n}\n.explorer-tree .rc-tree-switcher {\n flex-shrink: 0;\n width: 20px !important;\n height: 31px !important;\n vertical-align: top !important;\n background-image: none !important;\n}\n.explorer-tree .rc-tree-title {\n display: inline-block;\n height: 31px;\n width: 100%;\n}\n.explorer-tree.showLine .rc-tree-indent {\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-indent-unit {\n width: 20px;\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::before {\n content: '';\n display: inline-block;\n position: absolute;\n width: 8px;\n top: calc(31px / 2);\n left: 10px;\n height: 1px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n top: 0;\n height: calc(31px / 2);\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::before {\n display: none;\n content: '';\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.explorer-checks .rc-tree-treenode:hover .row-item-check .btn-check {\n opacity: 1;\n}\n.explorer-tree .rc-tree-list-scrollbar-thumb {\n background: #bbb !important;\n}\n.explorer-tree .rc-tree-list-scrollbar {\n width: 5px !important;\n}\n.explorer-tree .node-motion {\n transition: all 0.3s;\n overflow-y: hidden;\n}\n.explorer-tree .rc-tree-child-tree {\n display: block;\n}\n.explorer-table-header {\n display: flex;\n width: fit-content;\n min-width: 100%;\n height: 25px;\n line-height: 25px;\n color: #448;\n border-bottom: 1px solid #e3e3e3;\n box-shadow: 0 6px 10px rgba(0, 0, 0, 0.05);\n background: #fff;\n}\n.explorer-table-header .item {\n padding: 0 10px 0 0;\n flex: 1 0 0;\n margin-left: -10px;\n border-right: 1px solid #eee;\n user-select: none;\n min-width: 80px;\n}\n.explorer-table-header .item:first-child {\n padding-left: 20px;\n}\n.explorer-table-header .resize {\n position: relative;\n flex: 0 0 20px;\n width: 20px;\n z-index: 10;\n cursor: col-resize;\n left: -10px;\n transition: background 0.2s;\n}\n.explorer-table-header .resize::before {\n content: '';\n position: fixed;\n width: 1px;\n height: 2000px;\n z-index: 10;\n margin-left: 10px;\n visibility: hidden;\n opacity: 0;\n transition: all 0.2s;\n}\n.explorer-table-header .resize:hover {\n background: #1890ff30;\n}\n.explorer-table-header .resize.resize-focus {\n z-index: 9999;\n}\n.explorer-table-header .resize.resize-focus:before {\n opacity: 1;\n background: #1890ff;\n visibility: visible;\n}\n.explorer-table-header .resize:last-child {\n flex: 0 0 10px;\n width: 10px;\n}\n.explorer-table-header.item-resize {\n z-index: 10;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
1914
1925
  styleInject(css_248z$6);
1915
1926
 
1916
1927
  /**
@@ -5063,9 +5074,17 @@ function Menu(props) {
5063
5074
  onChange
5064
5075
  } = props;
5065
5076
  if (!menu) return jsx(Fragment, {});
5077
+ const store = useContext(ExampleContext);
5066
5078
  let data = useMemo(() => {
5067
- return menu;
5068
- }, [menu]);
5079
+ let arr = menu.map(v => {
5080
+ let data = v;
5081
+ if (store?.loadMenu) {
5082
+ data = store.loadMenu(v);
5083
+ }
5084
+ return data;
5085
+ });
5086
+ return arr;
5087
+ }, [menu, props]);
5069
5088
  const menus = useMemo(() => {
5070
5089
  return data.map((v, index) => {
5071
5090
  if (v?.type == 'line') {
@@ -5838,13 +5857,14 @@ const ExplorerMenu = props => {
5838
5857
  } = props;
5839
5858
  const store = useContext(ExampleContext);
5840
5859
  const [eventKey, setEventKey] = useState([]);
5841
- if (!store) return;
5860
+ const [loadKey, setLoadKey] = useState([]);
5842
5861
  return jsx("div", {
5843
5862
  className: 'frame-left',
5844
5863
  children: jsx(Tree, {
5845
5864
  isload: true,
5846
5865
  treeData: data,
5847
5866
  height: height,
5867
+ loadedKeys: loadKey,
5848
5868
  expandedKeys: eventKey,
5849
5869
  icon: (v, className) => {
5850
5870
  if (v.icon == false) return jsx(Fragment, {});
@@ -5855,17 +5875,16 @@ const ExplorerMenu = props => {
5855
5875
  onChange: onChange,
5856
5876
  onSelect: v => {
5857
5877
  store.setPathDisplay(v?.pathDisplay);
5858
- // if (Array.isArray(v?.children)) {
5859
- // store.setCurInfo(v);
5860
- // store.setCurList(v?.children || []);
5861
- // } else {
5862
5878
  loadData(v.key);
5863
- // }
5864
5879
  },
5865
5880
  filterData: v => {
5866
5881
  if (v.type == 'file') return false;
5867
5882
  return true;
5868
5883
  },
5884
+ onLoad: key => {
5885
+ setLoadKey(key);
5886
+ },
5887
+ setLoadKey: setLoadKey,
5869
5888
  onExpand: v => {
5870
5889
  setEventKey(v);
5871
5890
  }
@@ -6093,6 +6112,9 @@ function Tile(props) {
6093
6112
  });
6094
6113
  }
6095
6114
 
6115
+ var css_248z$2 = ".explorer-drop-tip {\n position: absolute;\n display: inline-block;\n padding: 3px 5px;\n background: #00000044;\n color: #fff;\n border-radius: 3px;\n white-space: nowrap;\n}\n.explorer-drop-tip.select {\n background: #1677ff;\n}\n.explorer-drop-tip .drop-tip-content {\n font-size: 14px;\n margin-right: 5px;\n}\n.explorer-drop-tip .drop-tip-content .content-icon {\n display: inline-block;\n height: 20px;\n width: 20px;\n border-radius: 50%;\n background: #52c41a;\n color: #fff;\n text-align: center;\n line-height: 20px;\n margin-right: 5px;\n}\n.explorer-drop-tip .drop-tip-title {\n font-size: 14px;\n display: inline-block;\n padding: 2px;\n background: rgba(0, 0, 0, 0.2);\n font-weight: 500;\n padding: 3px 5px;\n line-height: 1;\n border-right: 4px;\n}\n.file-select-box {\n width: 100%;\n border: 2px solid transparent;\n}\n";
6116
+ styleInject(css_248z$2);
6117
+
6096
6118
  var time = null;
6097
6119
  const SelectBox = props => {
6098
6120
  let {
@@ -6101,12 +6123,14 @@ const SelectBox = props => {
6101
6123
  dataClass,
6102
6124
  selectClass = '',
6103
6125
  regionClass,
6126
+ getContainer = '',
6104
6127
  isDrag = true,
6105
6128
  isSelectBoxes = true,
6106
6129
  checkType = '',
6107
6130
  checkMode,
6108
6131
  action = 'stack',
6109
- onChange
6132
+ onChange,
6133
+ onUpload
6110
6134
  } = props;
6111
6135
  const selectionRef = useRef(null);
6112
6136
  const clickRef = useRef(true);
@@ -6120,8 +6144,12 @@ const SelectBox = props => {
6120
6144
  const box = useRef(null);
6121
6145
  //当前
6122
6146
  const cur = useRef([]);
6147
+ //文案
6148
+ const text = useRef(null);
6123
6149
  //判断单机还双击
6124
6150
  const isDclick = useRef(null);
6151
+ const store = useContext(ExampleContext);
6152
+ const [isDragfile, setIsDragFile] = useState(false);
6125
6153
  const [selects, setSelect] = useState([]);
6126
6154
  const [stageClickInfo, setStageClickInfo] = useState({
6127
6155
  show: false
@@ -6129,6 +6157,30 @@ const SelectBox = props => {
6129
6157
  useEffect(() => {
6130
6158
  setSelect(checks);
6131
6159
  }, [checks]);
6160
+ useEffect(() => {
6161
+ if (isDragfile) {
6162
+ createText();
6163
+ } else {
6164
+ box.current?.remove();
6165
+ text.current = null;
6166
+ box.current = null;
6167
+ }
6168
+ }, [isDragfile]);
6169
+ useEffect(() => {
6170
+ // 在这里执行需要操作 DOM 的代码
6171
+ document.querySelector(getContainer)?.addEventListener('dragenter', bodyDragEnter);
6172
+ document.addEventListener('dragover', handleDragOver, false);
6173
+ document.addEventListener('dragleave', handleDragLeave, false);
6174
+ document?.addEventListener('dragenter', handleDragEnter);
6175
+ document?.addEventListener('drop', handleDrop);
6176
+ return () => {
6177
+ document.querySelector(getContainer)?.removeEventListener('dragenter', bodyDragEnter);
6178
+ document.removeEventListener('dragenter', bodyDragEnter);
6179
+ document.removeEventListener('dragover', handleDragOver);
6180
+ document.removeEventListener('dragleave', handleDragLeave);
6181
+ document?.addEventListener('drop', handleDrop);
6182
+ };
6183
+ }, [store.curInfo, store.dataMap]);
6132
6184
  useEffect(() => {
6133
6185
  document.addEventListener('mousemove', handleBodyMousemove);
6134
6186
  document.addEventListener('mouseup', handleBodyMouseup);
@@ -6138,22 +6190,32 @@ const SelectBox = props => {
6138
6190
  };
6139
6191
  }, [stageClickInfo, checkMode]);
6140
6192
  //判断鼠标点击位置 是否为目标区域
6141
- function isSelectTarget(e) {
6193
+ function isSelectTarget(e, checkType, status) {
6142
6194
  let idx = [];
6143
6195
  Array.from(document.querySelectorAll(selectClass)).filter(v => {
6144
6196
  if (v.contains(e.target)) {
6145
6197
  let dataDom = v;
6146
6198
  if (dataClass) {
6147
6199
  dataDom = v.querySelector(dataClass);
6148
- let id = dataDom.getAttribute('data-id');
6200
+ let id = dataDom?.getAttribute('data-id');
6149
6201
  if (checkType) {
6150
- let type = dataDom.getAttribute('data-type');
6202
+ let type = dataDom?.getAttribute('data-type');
6151
6203
  if (type !== checkType) return;
6204
+ if (status == 'select') {
6205
+ v.classList.add('hover');
6206
+ }
6152
6207
  }
6153
6208
  if (id) {
6154
6209
  idx.push(id);
6155
6210
  }
6156
6211
  }
6212
+ } else {
6213
+ if (status == 'select') {
6214
+ v.classList.remove('hover');
6215
+ }
6216
+ }
6217
+ if (status == 'remove') {
6218
+ v.classList.remove('hover');
6157
6219
  }
6158
6220
  });
6159
6221
  if (idx.length) {
@@ -6219,6 +6281,111 @@ const SelectBox = props => {
6219
6281
  }, 300);
6220
6282
  }
6221
6283
  }
6284
+ //拖动时
6285
+ const handleDragOver = e => {
6286
+ e.preventDefault();
6287
+ const {
6288
+ clientX: x,
6289
+ clientY: y
6290
+ } = e;
6291
+ if (text.current) {
6292
+ const data = isSelectTarget(e, 'folder', 'select');
6293
+ let param = {};
6294
+ let is = false;
6295
+ if (ref.current.contains(e.target)) {
6296
+ param = store.curInfo;
6297
+ is = true;
6298
+ }
6299
+ if (typeof data?.[0] == 'string' && store?.dataMap?.[data?.[0]]) {
6300
+ param = store?.dataMap?.[data?.[0]];
6301
+ is = false;
6302
+ }
6303
+ if (is) {
6304
+ ref.current.style.cssText = `
6305
+ border:2px solid #1677ff;
6306
+ `;
6307
+ } else {
6308
+ ref.current.style.cssText = `
6309
+ border:2px solid transparent;
6310
+ `;
6311
+ }
6312
+ let element = renderDragtext({
6313
+ x: x + 20,
6314
+ y: y + 20,
6315
+ ...param
6316
+ });
6317
+ text.current.render(element);
6318
+ }
6319
+ };
6320
+ const handleDrop = e => {
6321
+ setIsDragFile(false);
6322
+ e.preventDefault();
6323
+ e.stopPropagation();
6324
+ const files = [...e.dataTransfer.files];
6325
+ let data = isSelectTarget(e, 'folder', 'remove');
6326
+ let key = null;
6327
+ if (ref.current.contains(e.target)) {
6328
+ key = store.curInfo;
6329
+ ref.current.style.cssText = `
6330
+ border:2px solid transparent;
6331
+ `;
6332
+ }
6333
+ if (typeof data?.[0] == 'string' && store?.dataMap?.[data?.[0]]) {
6334
+ key = store?.dataMap?.[data?.[0]];
6335
+ }
6336
+ if (!key) return;
6337
+ typeof onUpload === 'function' && onUpload(files, key);
6338
+ };
6339
+ function handleDragEnter(e) {
6340
+ e.preventDefault();
6341
+ e.stopPropagation();
6342
+ }
6343
+ //退出当前区域
6344
+ function handleDragLeave(e) {
6345
+ let cont = document.querySelector(getContainer);
6346
+ e.preventDefault();
6347
+ e.stopPropagation();
6348
+ if (!cont?.contains(e.target) || e.clientX <= 0 || e.clientY <= 0) {
6349
+ setIsDragFile(false);
6350
+ }
6351
+ }
6352
+ //拖入div
6353
+ function bodyDragEnter(e) {
6354
+ e?.preventDefault();
6355
+ e?.stopPropagation();
6356
+ if (e?.dataTransfer?.types && !e?.dataTransfer?.types.includes('Files')) {
6357
+ return;
6358
+ }
6359
+ setIsDragFile(true);
6360
+ }
6361
+ //创建文案
6362
+ function createText() {
6363
+ let _box = null;
6364
+ let body = null;
6365
+ let _text = null;
6366
+ _text = document.createElement('div');
6367
+ text.current = createRoot(_text);
6368
+ if (box.current) {
6369
+ box.current?.appendChild(text);
6370
+ } else {
6371
+ body = document.querySelector('body');
6372
+ _box = document.createElement('div');
6373
+ _box.className = `_selectbox ${className}`;
6374
+ _box.style.cssText = `
6375
+ position: absolute;
6376
+ top:1px;
6377
+ left: 1px;
6378
+ width: 0px;
6379
+ height: 0px;
6380
+ pointer-events: none;
6381
+ overflow: visible !important;
6382
+ z-index: 999;
6383
+ `;
6384
+ box.current = _box;
6385
+ _box?.appendChild(_text);
6386
+ body?.appendChild(_box);
6387
+ }
6388
+ }
6222
6389
  //创建选框
6223
6390
  function createBox(e) {
6224
6391
  if (stageClickInfo.show) {
@@ -6414,17 +6581,51 @@ const SelectBox = props => {
6414
6581
  box.current = null;
6415
6582
  clickRef.current = false;
6416
6583
  }
6584
+ function renderDragtext({
6585
+ x,
6586
+ y,
6587
+ ...props
6588
+ }) {
6589
+ return jsx("div", {
6590
+ className: cx$1('explorer-drop-tip', {
6591
+ select: props?.title
6592
+ }),
6593
+ style: {
6594
+ top: y,
6595
+ left: x
6596
+ },
6597
+ children: props?.title ? jsxs(Fragment, {
6598
+ children: [jsxs("span", {
6599
+ className: 'drop-tip-content',
6600
+ children: [jsx("span", {
6601
+ className: 'content-icon',
6602
+ children: jsx(UploadSvg, {})
6603
+ }), jsx(Fragment, {
6604
+ children: " \u4E0A\u4F20\u81F3:"
6605
+ })]
6606
+ }), jsx("span", {
6607
+ className: 'drop-tip-title',
6608
+ children: props?.title
6609
+ })]
6610
+ }) : jsx(Fragment, {
6611
+ children: "\u62D6\u5230\u6587\u4EF6\u5939\u4E0A\u4F20"
6612
+ })
6613
+ });
6614
+ }
6417
6615
  return jsxs("div", {
6418
6616
  ref: ref,
6419
- className: cx$1(`${className}`),
6420
- onClick: e => {},
6617
+ className: cx$1(`file-select-box ${className}`),
6618
+ onDragLeave: e => {
6619
+ e.preventDefault();
6620
+ e.stopPropagation();
6621
+ },
6421
6622
  onMouseDown: e => {
6422
- if (e.button === 2) return;
6623
+ // if (e.button === 2) return;
6423
6624
  if (isDclick.current) {
6424
6625
  clearTimeout(isDclick.current);
6425
6626
  isDclick.current = null;
6426
6627
  } else {
6427
- let type = isSelectTarget(e);
6628
+ let type = isSelectTarget(e, checkType);
6428
6629
  //选中
6429
6630
  //在区域未选中
6430
6631
  isDclick.current = setTimeout(() => {
@@ -6474,8 +6675,8 @@ const SelectBox = props => {
6474
6675
  });
6475
6676
  };
6476
6677
 
6477
- var css_248z$2 = ".explorer-columns {\n width: 100%;\n height: 100%;\n display: flex;\n position: relative;\n}\n.explorer-columns .layer {\n position: relative;\n flex: 1 0 0;\n border-right: 1px solid #f5f5f5;\n}\n.explorer-columns .layer.select_col {\n box-shadow: 0 0 20px #e9f5ff inset;\n}\n.explorer-columns .layer.select_col::after {\n content: '';\n position: absolute;\n height: 4px;\n bottom: 0px;\n background: #50afff;\n left: 0;\n right: 0;\n}\n.explorer-columns .layer.list {\n min-width: 200px;\n}\n.explorer-columns .layer.list::before {\n position: absolute;\n content: '';\n top: 50%;\n right: 1px;\n width: 1px;\n height: 18px;\n margin-left: -1px;\n margin-top: -9px;\n border: 1px solid #ddd;\n border-top: none;\n border-bottom: none;\n backdrop-filter: none;\n border-radius: 0;\n background: transparent;\n box-sizing: content-box;\n -webkit-backdrop-filter: blur(10px);\n}\n.explorer-columns .layer.list .list-main {\n width: 100%;\n height: 100%;\n transition: 0.3s;\n padding-top: 5px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar {\n width: 6px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar-thumb {\n background-color: transparent;\n border-radius: 6px;\n transition: 0.3s;\n}\n.explorer-columns .layer.list .list-main:hover .list-scroll::-webkit-scrollbar-thumb {\n background-color: #00000030;\n}\n.explorer-columns .layer.list .drag {\n position: absolute;\n width: 8px;\n border-right: 1px solid #f5f5f5;\n right: -3px;\n top: 0;\n bottom: 0;\n cursor: col-resize;\n z-index: 10;\n}\n.explorer-columns .layer.list .drag:hover {\n background: #40a9ff4d;\n}\n.explorer-columns .layer.empty {\n display: flex;\n justify-content: center;\n padding-top: 100px;\n}\n.explorer-columns .layer.empty .empty-is-null {\n width: 200px;\n}\n.explorer-columns .layer.empty .empty-icon {\n height: 140px;\n}\n.explorer-columns .layer.empty .empty-desc {\n display: flex;\n justify-content: center;\n}\n.explorer-columns .layer.empty .empty-desc > span {\n display: inline-block;\n padding: 3px 10px;\n border-radius: 10px;\n line-height: 1;\n background: #a0a0a01a;\n color: #bbb;\n font-size: 0.9em;\n}\n.explorer-columns-list {\n padding-left: 10px;\n display: flex;\n height: 30px;\n margin-bottom: 2px;\n margin: 0 5px 3px 5px;\n align-items: center;\n border: 1px solid transparent;\n user-select: none;\n}\n.explorer-columns-list .columns-list-icon {\n display: flex;\n width: 18px;\n height: 18px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.explorer-columns-list .columns-list-title {\n flex: 1;\n display: flex;\n}\n.explorer-columns-list .columns-list-title .title {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.explorer-columns-list .columns-list-title .edit {\n display: inline-block;\n width: 20px;\n line-height: 20px;\n font-size: 10px;\n text-align: center;\n border-radius: 3px;\n margin-left: 5px;\n color: #666;\n opacity: 0;\n transition: 0.3s;\n}\n.explorer-columns-list .columns-list-title .edit:hover {\n color: #50afff;\n background: #ffffff8a;\n cursor: pointer;\n}\n.explorer-columns-list .columns-list-tool {\n min-width: 30px;\n}\n.explorer-columns-list .columns-list-input {\n flex: 1;\n height: 100%;\n outline: 0;\n border: 0;\n margin-right: 10px;\n background: #fff;\n}\n.explorer-columns-list.acitve {\n background: #e3f0ff;\n}\n.explorer-columns-list.last {\n margin-bottom: 100px;\n}\n.explorer-columns-list.checks {\n background: #cce8ff;\n border-color: #a8d8ff !important;\n}\n.explorer-columns-list:hover {\n background: #e3f0ff;\n border-color: #c9e2ff;\n}\n.explorer-columns-list:hover .edit {\n opacity: 1;\n}\n.explorer-columns-loading {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.explorer-columns-loading .loading-content {\n width: 100px;\n height: 106px;\n border-radius: 6px;\n background: rgba(255, 255, 255, 0.7);\n box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.07);\n color: #888;\n}\n.explorer-columns-loading .loading-content-icon {\n display: flex;\n justify-content: center;\n margin: 25px auto 6px auto;\n font-size: 30px;\n}\n.explorer-columns-loading .loading-content-icon > i {\n animation: rotate 1.5s linear infinite;\n}\n.explorer-columns-loading .loading-content-title {\n padding-top: 15px;\n text-align: center;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
6478
- styleInject(css_248z$2);
6678
+ var css_248z$1 = ".explorer-columns {\n width: 100%;\n height: 100%;\n display: flex;\n position: relative;\n}\n.explorer-columns .layer {\n position: relative;\n flex: 1 0 0;\n border-right: 1px solid #f5f5f5;\n}\n.explorer-columns .layer.select_col {\n box-shadow: 0 0 20px #e9f5ff inset;\n}\n.explorer-columns .layer.select_col::after {\n content: '';\n position: absolute;\n height: 4px;\n bottom: 0px;\n background: #50afff;\n left: 0;\n right: 0;\n}\n.explorer-columns .layer.list {\n min-width: 200px;\n}\n.explorer-columns .layer.list::before {\n position: absolute;\n content: '';\n top: 50%;\n right: 1px;\n width: 1px;\n height: 18px;\n margin-left: -1px;\n margin-top: -9px;\n border: 1px solid #ddd;\n border-top: none;\n border-bottom: none;\n backdrop-filter: none;\n border-radius: 0;\n background: transparent;\n box-sizing: content-box;\n -webkit-backdrop-filter: blur(10px);\n}\n.explorer-columns .layer.list .list-main {\n width: 100%;\n height: 100%;\n transition: 0.3s;\n padding-top: 5px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar {\n width: 6px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar-thumb {\n background-color: transparent;\n border-radius: 6px;\n transition: 0.3s;\n}\n.explorer-columns .layer.list .list-main:hover .list-scroll::-webkit-scrollbar-thumb {\n background-color: #00000030;\n}\n.explorer-columns .layer.list .drag {\n position: absolute;\n width: 8px;\n border-right: 1px solid #f5f5f5;\n right: -3px;\n top: 0;\n bottom: 0;\n cursor: col-resize;\n z-index: 10;\n}\n.explorer-columns .layer.list .drag:hover {\n background: #40a9ff4d;\n}\n.explorer-columns .layer.empty {\n display: flex;\n justify-content: center;\n padding-top: 100px;\n}\n.explorer-columns .layer.empty .empty-is-null {\n width: 200px;\n}\n.explorer-columns .layer.empty .empty-icon {\n height: 140px;\n}\n.explorer-columns .layer.empty .empty-desc {\n display: flex;\n justify-content: center;\n}\n.explorer-columns .layer.empty .empty-desc > span {\n display: inline-block;\n padding: 3px 10px;\n border-radius: 10px;\n line-height: 1;\n background: #a0a0a01a;\n color: #bbb;\n font-size: 0.9em;\n}\n.explorer-columns-list {\n padding-left: 10px;\n display: flex;\n height: 30px;\n margin-bottom: 2px;\n margin: 0 5px 3px 5px;\n align-items: center;\n border: 1px solid transparent;\n user-select: none;\n}\n.explorer-columns-list .columns-list-icon {\n display: flex;\n width: 18px;\n height: 18px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.explorer-columns-list .columns-list-title {\n flex: 1;\n display: flex;\n}\n.explorer-columns-list .columns-list-title .title {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.explorer-columns-list .columns-list-title .edit {\n display: inline-block;\n width: 20px;\n line-height: 20px;\n font-size: 10px;\n text-align: center;\n border-radius: 3px;\n margin-left: 5px;\n color: #666;\n opacity: 0;\n transition: 0.3s;\n}\n.explorer-columns-list .columns-list-title .edit:hover {\n color: #50afff;\n background: #ffffff8a;\n cursor: pointer;\n}\n.explorer-columns-list .columns-list-tool {\n min-width: 30px;\n}\n.explorer-columns-list .columns-list-input {\n flex: 1;\n height: 100%;\n outline: 0;\n border: 0;\n margin-right: 10px;\n background: #fff;\n}\n.explorer-columns-list.acitve {\n background: #e3f0ff;\n}\n.explorer-columns-list.last {\n margin-bottom: 100px;\n}\n.explorer-columns-list.checks {\n background: #cce8ff;\n border-color: #a8d8ff !important;\n}\n.explorer-columns-list:hover {\n background: #e3f0ff;\n border-color: #c9e2ff;\n}\n.explorer-columns-list:hover .edit {\n opacity: 1;\n}\n.explorer-columns-loading {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.explorer-columns-loading .loading-content {\n width: 100px;\n height: 106px;\n border-radius: 6px;\n background: rgba(255, 255, 255, 0.7);\n box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.07);\n color: #888;\n}\n.explorer-columns-loading .loading-content-icon {\n display: flex;\n justify-content: center;\n margin: 25px auto 6px auto;\n font-size: 30px;\n}\n.explorer-columns-loading .loading-content-icon > i {\n animation: rotate 1.5s linear infinite;\n}\n.explorer-columns-loading .loading-content-title {\n padding-top: 15px;\n text-align: center;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
6679
+ styleInject(css_248z$1);
6479
6680
 
6480
6681
  function Item(props) {
6481
6682
  const {
@@ -6713,286 +6914,6 @@ function Columns(props) {
6713
6914
  });
6714
6915
  }
6715
6916
 
6716
- var css_248z$1 = "._modal {\n position: absolute;\n justify-content: center;\n display: flex;\n top: 0;\n left: 0;\n right: 0;\n z-index: 100;\n}\n._modal-content {\n position: absolute;\n width: 800px;\n height: 400px;\n top: 100px;\n background-color: #fff;\n background-clip: padding-box;\n border: 0;\n border-radius: 8px;\n border: 1px solid #eee;\n transition: box-shadow 0.2s;\n box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.04), 0 3px 6px -4px rgba(0, 0, 0, 0.08), 0 0 8px 8px rgba(0, 0, 0, 0.03);\n pointer-events: auto;\n}\n._modal-content.focus {\n box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.12), 0 3px 6px -4px rgba(0, 0, 0, 0.16), 0 9px 28px 8px rgba(0, 0, 0, 0.03);\n}\n._modal-content.maximize {\n width: 100% !important;\n height: 100% !important;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n}\n._modal-content.maximize .header-title {\n cursor: default;\n}\n._modal-content.minimize {\n animation: _modal_minimize 0.3s forwards;\n}\n._modal-content.minimize-out {\n transition: 0.3s;\n}\n._modal-content.animation {\n transition: 0.3s;\n}\n._modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 30px;\n padding: 0 10px;\n border-bottom: 1px solid #f1f1f1;\n}\n._modal-header .header-title {\n flex: 1;\n cursor: move;\n}\n._modal-header .header-toolbar {\n display: flex;\n}\n._modal-header .header-toolbar .tool {\n width: 30px;\n height: 30px;\n vertical-align: top;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 10px;\n cursor: pointer;\n}\n._modal-header .header-toolbar .tool > svg {\n top: 0;\n}\n._modal-header .header-toolbar .tool.close {\n font-size: 12px;\n}\n._modal-header .header-toolbar .tool.close:hover {\n background: #ff0000d0;\n color: #fff;\n}\n._modal-header .header-toolbar .tool:hover {\n background: #e5e5e5;\n}\n._modal-navbar {\n height: 30px;\n width: 100%;\n padding: 0px 10px;\n}\n._modal-navbar ._modal-navbar-item {\n position: relative;\n display: inline-block;\n z-index: 100;\n height: 30px;\n line-height: 30px;\n padding: 0 10px;\n background-color: #fff3;\n border: 1px solid #f1f1f1;\n border-radius: 4px 4px 0 0;\n transition: 0.3s;\n margin-right: 2px;\n cursor: pointer;\n}\n._modal-navbar ._modal-navbar-item.acitve {\n z-index: 10;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);\n}\n._modal-navbar ._modal-navbar-item:hover {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n}\n@keyframes _modal_minimize {\n 0% {\n opacity: 1;\n transform: translateY(0px);\n }\n 90% {\n opacity: 0;\n transform: translateY(30px);\n }\n 100% {\n opacity: 0;\n display: none;\n }\n}\n";
6717
- styleInject(css_248z$1);
6718
-
6719
- function Modal(props) {
6720
- const {
6721
- id,
6722
- show,
6723
- title,
6724
- onBlur,
6725
- onFocus,
6726
- isfocus,
6727
- onMinimize: onMin,
6728
- onMaximize: onMax,
6729
- minimize
6730
- } = props;
6731
- const content = useRef(null);
6732
- const mask = useRef(null);
6733
- const root = useRef(null);
6734
- const [drag, setDrag] = useState(false);
6735
- const [d_value, D_value] = useState([0, 0]); //点击时的差值
6736
- const [win_size, setWinsize] = useState(getSize);
6737
- const [focus, setFocus] = useState(false);
6738
- const [ismax, setMax] = useState(false);
6739
- useLayoutEffect(() => {
6740
- window.addEventListener('resize', handleResize);
6741
- return () => window.removeEventListener('resize', handleResize);
6742
- }, []);
6743
- //拖动监听
6744
- useLayoutEffect(() => {
6745
- document.addEventListener('mousemove', lie);
6746
- return () => {
6747
- document.removeEventListener('mousemove', lie);
6748
- };
6749
- }, [drag]);
6750
- //创建
6751
- useEffect(() => {
6752
- if (show) {
6753
- let box = null;
6754
- let body = document.querySelector('body');
6755
- box = document.createElement('div');
6756
- box.className = '_modal';
6757
- mask.current = box;
6758
- body?.appendChild(box);
6759
- let roots = createRoot(box);
6760
- roots.render( /*#__PURE__*/React__default.cloneElement(render()));
6761
- root.current = roots;
6762
- } else {
6763
- onClose();
6764
- }
6765
- }, [show]);
6766
- //重新渲染
6767
- useEffect(() => {
6768
- if (root.current) {
6769
- root.current.render( /*#__PURE__*/React__default.cloneElement(render()));
6770
- }
6771
- }, [root.current, ismax, minimize]);
6772
- useEffect(() => {
6773
- if (typeof minimize !== 'boolean') return;
6774
- onMinimize();
6775
- }, [minimize]);
6776
- //切换
6777
- useEffect(() => {
6778
- if (!mask?.current) return;
6779
- if (focus) {
6780
- mask.current.style.zIndex = 200;
6781
- content.current?.classList.add('focus');
6782
- } else {
6783
- mask.current.style.zIndex = '';
6784
- content.current?.classList.remove('focus');
6785
- }
6786
- }, [mask.current, focus]);
6787
- //焦点控制
6788
- useEffect(() => {
6789
- if (typeof isfocus == 'boolean') {
6790
- setFocus(isfocus);
6791
- }
6792
- }, [isfocus]);
6793
- //头
6794
- const header = useMemo(() => {
6795
- if (title === false) {
6796
- return jsx(Fragment, {});
6797
- }
6798
- if ( /*#__PURE__*/React__default.isValidElement(title)) {
6799
- return title;
6800
- }
6801
- return jsxs("div", {
6802
- className: '_modal-header',
6803
- onMouseDown: e => {
6804
- D_value([e.nativeEvent?.layerX || 0, e.nativeEvent?.layerY || 0]);
6805
- setDrag(true);
6806
- },
6807
- onMouseUp: () => {
6808
- setDrag(false);
6809
- },
6810
- children: [jsx("div", {
6811
- className: 'header-title',
6812
- children: title
6813
- }), jsxs("div", {
6814
- className: 'header-toolbar',
6815
- children: [jsx("span", {
6816
- className: 'tool',
6817
- onClick: () => {
6818
- onMin && onMin();
6819
- }
6820
- }), jsx("span", {
6821
- className: 'tool',
6822
- onClick: () => {
6823
- setMax(!ismax);
6824
- onMaximize();
6825
- }
6826
- }), jsx("span", {
6827
- className: 'tool close',
6828
- onClick: () => {
6829
- props.onClose && props.onClose();
6830
- }
6831
- })]
6832
- })]
6833
- });
6834
- }, [drag, title, ismax]);
6835
- function handleResize() {
6836
- setWinsize(getSize());
6837
- }
6838
- //最小化
6839
- function onMinimize() {
6840
- if (!minimize) {
6841
- content.current?.classList.add('animation');
6842
- content.current?.classList.add('minimize');
6843
- } else {
6844
- content.current?.classList.remove('minimize');
6845
- content.current?.classList.remove('animation');
6846
- }
6847
- }
6848
- //最大化
6849
- function onMaximize() {
6850
- if (!ismax) {
6851
- if (mask?.current) {
6852
- mask.current.style.bottom = '0px';
6853
- mask.current.style.zIndex = 300;
6854
- }
6855
- content.current?.classList.add('animation');
6856
- content.current?.classList.add('maximize');
6857
- } else {
6858
- content.current?.classList.remove('animation');
6859
- content.current?.classList.remove('maximize');
6860
- mask.current.style.bottom = '';
6861
- mask.current.style.zIndex = '';
6862
- }
6863
- }
6864
- function onClose() {
6865
- mask?.current?.remove();
6866
- mask.current == null;
6867
- content?.current?.remove();
6868
- content.current == null;
6869
- }
6870
- function getSize() {
6871
- return {
6872
- width: window?.innerWidth || 0,
6873
- height: window?.innerHeight || 0
6874
- };
6875
- }
6876
- const lie = e => {
6877
- if (ismax) return;
6878
- if (!drag) return;
6879
- let x = (e.x || 0) - d_value[0];
6880
- let y = (e.y || 0) - d_value[1];
6881
- if (!content?.current) return;
6882
- let c_lie = content.current.getBoundingClientRect();
6883
- if (x < 0) x = 0;
6884
- if (y < 0) y = 0;
6885
- if (y + c_lie.height > win_size.height) {
6886
- y = win_size.height - c_lie.height;
6887
- }
6888
- if (x + c_lie.width > win_size.width) {
6889
- x = win_size.width - c_lie.width;
6890
- }
6891
- content.current.style.top = y + 'px';
6892
- content.current.style.left = x + 'px';
6893
- return {
6894
- x,
6895
- y
6896
- };
6897
- };
6898
- function render() {
6899
- return jsxs("div", {
6900
- ref: content,
6901
- className: cx$1('_modal-content', {
6902
- minimize: minimize,
6903
- animation: minimize
6904
- }),
6905
- tabIndex: 0,
6906
- onFocus: () => {
6907
- onFocus && onFocus();
6908
- typeof isfocus == 'boolean' ? null : setFocus(true);
6909
- },
6910
- onBlur: () => {
6911
- typeof isfocus == 'boolean' ? null : setFocus(false);
6912
- onBlur && onBlur();
6913
- },
6914
- children: [props?.title && header, props.children]
6915
- });
6916
- }
6917
- return jsx(Fragment, {});
6918
- }
6919
-
6920
- function ModalTab(props) {
6921
- const {
6922
- items,
6923
- onClone,
6924
- showKey,
6925
- className
6926
- } = props;
6927
- const shrink = useRef(null);
6928
- const [show, setShow] = useState([]);
6929
- const [select, setSelect] = useState('');
6930
- const [_shrink, setShink] = useState([]);
6931
- useEffect(() => {
6932
- if (typeof showKey[0] == 'string') {
6933
- setSelect(showKey[0]);
6934
- }
6935
- }, []);
6936
- useEffect(() => {
6937
- setShow(showKey);
6938
- }, [showKey]);
6939
- return jsxs("div", {
6940
- className: cx$1('_modal-navbar', {
6941
- [className || '']: className
6942
- }),
6943
- children: [items.map((v, index) => {
6944
- return jsx(React__default.Fragment, {
6945
- children: jsx(Modal, {
6946
- tabIndex: index,
6947
- show: show.includes(v.key),
6948
- title: v.title,
6949
- onClose: () => {
6950
- onClone && onClone?.(v.key, v);
6951
- },
6952
- minimize: shrink.current?.includes(v.key),
6953
- onMinimize: () => {
6954
- let arr = [...(shrink.current || []), v.key];
6955
- shrink.current = arr;
6956
- setShink(arr);
6957
- },
6958
- isfocus: v.key == select,
6959
- onFocus: () => {
6960
- setSelect(v.key);
6961
- },
6962
- children: v.content
6963
- }, index)
6964
- }, index);
6965
- }), items.map((v, index) => {
6966
- return jsx("div", {
6967
- className: cx$1('_modal-navbar-item', {
6968
- acitve: select == v.key
6969
- }),
6970
- onClick: () => {
6971
- if (shrink.current?.includes(v.key)) {
6972
- let arr = shrink.current.filter(item => item !== v.key);
6973
- shrink.current = arr;
6974
- setShink(arr);
6975
- setSelect(v.key);
6976
- return;
6977
- }
6978
- if (select == v.key) {
6979
- let arr = [...(shrink.current || []), v.key];
6980
- shrink.current = arr;
6981
- setShink(arr);
6982
- setSelect('');
6983
- return;
6984
- }
6985
- if (!show.includes(v.key)) {
6986
- setShow([...show, v.key]);
6987
- }
6988
- setSelect(v.key);
6989
- },
6990
- children: v.title
6991
- }, index);
6992
- })]
6993
- });
6994
- }
6995
-
6996
6917
  const template = {
6997
6918
  tile: {
6998
6919
  action: 'rotate',
@@ -7025,7 +6946,8 @@ const Layout$1 = props => {
7025
6946
  onCheck,
7026
6947
  onDblclick,
7027
6948
  onRename,
7028
- onMenuClick
6949
+ onMenuClick,
6950
+ onUpload
7029
6951
  } = props;
7030
6952
  const store = useContext(ExampleContext);
7031
6953
  const [expandkey, setExpandkey] = useState([]);
@@ -7062,6 +6984,7 @@ const Layout$1 = props => {
7062
6984
  return jsxs("div", {
7063
6985
  className: 'file-continer-main',
7064
6986
  children: [store?.loading == ApiStatusEnum.LOADING && jsx(Loading, {}), jsxs(SelectBox, {
6987
+ getContainer: '.explorer-container',
7065
6988
  checks: checks,
7066
6989
  checkType: store.checkType,
7067
6990
  checkMode: store.checkMode,
@@ -7070,6 +6993,10 @@ const Layout$1 = props => {
7070
6993
  }),
7071
6994
  isDrag: isDrag,
7072
6995
  isSelectBoxes: isSelectBoxes,
6996
+ dataClass: template?.[store.menutype]?.dataClass,
6997
+ selectClass: template?.[store.menutype]?.selectClass,
6998
+ action: template?.[store.menutype]?.action,
6999
+ regionClass: template?.[store.menutype]?.regionClass,
7073
7000
  onChange: v => {
7074
7001
  let map = store.dataMap || {};
7075
7002
  let param = [];
@@ -7080,13 +7007,10 @@ const Layout$1 = props => {
7080
7007
  });
7081
7008
  onCheck?.(v, param);
7082
7009
  },
7010
+ onUpload: onUpload,
7083
7011
  onDrag: () => {},
7084
7012
  onEndDrag: () => {},
7085
7013
  onStartDrag: () => {},
7086
- dataClass: template?.[store.menutype]?.dataClass,
7087
- selectClass: template?.[store.menutype]?.selectClass,
7088
- action: template?.[store.menutype]?.action,
7089
- regionClass: template?.[store.menutype]?.regionClass,
7090
7014
  children: [store?.menutype == 'column' && jsx(Columns, {
7091
7015
  icons: store.getIcons,
7092
7016
  data: store.curlist,
@@ -7155,9 +7079,6 @@ const Layout$1 = props => {
7155
7079
  onMenuClick: onMenuClick,
7156
7080
  loadData: loadData
7157
7081
  })]
7158
- }), jsx(ModalTab, {
7159
- items: [],
7160
- showKey: []
7161
7082
  })]
7162
7083
  });
7163
7084
  };
@@ -7522,6 +7443,7 @@ const Explorer = props => {
7522
7443
  loadkey,
7523
7444
  //icon
7524
7445
  getIcons: Icons,
7446
+ loadMenu: props.loadMenu,
7525
7447
  //set
7526
7448
  setLog,
7527
7449
  setCurInfo,
@@ -7535,14 +7457,14 @@ const Explorer = props => {
7535
7457
  setCurSelect,
7536
7458
  setLoadKey
7537
7459
  },
7538
- children: jsxs("div", {
7460
+ children: jsx("div", {
7539
7461
  className: 'explorer-container',
7540
- children: [jsx(Layout, {
7462
+ children: jsx(Layout, {
7541
7463
  ...props,
7542
7464
  loadData: loadData,
7543
7465
  loadNode: loadNode,
7544
7466
  onRename: onRename
7545
- }), ";"]
7467
+ })
7546
7468
  })
7547
7469
  });
7548
7470
  };