@flatbiz/pro-layout 5.0.12 → 5.0.13
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.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +122 -62
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.bread-wrapper{align-items:center;border-radius:6px;display:flex;justify-content:space-between;margin-bottom:5px;padding:3px 15px 6px 8px}.bread-wrapper .bread{display:inline-block}.bread-wrapper .ant-breadcrumb ol{margin:0;padding:0}.bread-extend{flex:1}.header-account{color:unset;cursor:pointer;flex-shrink:0;height:100%;line-height:normal;margin-right:20px}.header-account:hover{background:var(--header-menuSelectedBgColor);color:var(--header-menuSelectedTextColor)}.header-account .header-account-wraper{align-items:center;display:flex;height:100%;padding:0 15px}.header-account .header-account-wraper img.user-avatar{border-radius:100%;height:24px;object-fit:cover;width:24px}.account-dropdown-overlay{box-shadow:0 4px 8px 0 rgba(0,0,0,.08);z-index:900}.layout-brand{align-items:center;background:var(--header-bgColor);color:var(--header-textColor);display:flex;justify-content:center;overflow:hidden;position:relative;transition:all .2s;white-space:nowrap}.brand-logo{background-position:50%;background-repeat:no-repeat;background-size:40px 100%;height:100%;width:40px}.brand-name{font-size:18px;margin-left:15px;white-space:nowrap}.ant-layout-sider-collapsed .layout-brand{display:block;overflow:hidden}.ant-layout-sider-collapsed .brand-logo{width:60px}.flatbiz-layout-main-header{background:var(--header-bgColor);color:var(--header-textColor);display:flex;flex-shrink:0;z-index:1}.flatbiz-layout-system-name{align-items:center;color:unset;display:flex;flex-shrink:0;font-size:18px;margin-left:15px}.flatbiz-layout-header-fill{display:flex;flex:1;justify-content:flex-end;overflow:hidden}.flatbiz-layout-header-fill>.ant-menu{background:unset;border-bottom:none;height:unset}.flatbiz-layout-header-fill>.ant-menu.ant-menu-horizontal{border-bottom:none;line-height:inherit}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item{align-items:center;border-radius:0!important;display:flex}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item:hover:after{border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item:after{border-bottom:0;bottom:12px}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-selected:after{background:var(--header-menuSelectedTextColor);border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected){background:var(--header-menuActiveBgColor)}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected):after{background:var(--header-menuActiveTextColor);border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item-active:after,.flatbiz-layout-header-fill>.ant-menu .ant-menu-item-selected:after{border-radius:3px;bottom:12px;content:"";height:3px;left:50%!important;min-width:22px;position:absolute;transform:translateX(-50%);width:30%}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest{align-items:center;background-color:transparent!important;display:flex}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title{color:var(--header-textColor)!important}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title:hover{color:unset!important}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest:after{width:0}.flatbiz-layout-topmenu{flex:1;overflow:hidden}.flatbiz-layout-main-header-has-menu .flatbiz-layout-header-fill{justify-content:space-between}.flatbiz-layout-topmenu-overflowed-modal .ant-menu-submenu{background-color:transparent!important}.light-theme .flatbiz-layout-topmenu-overflowed-modal .ant-menu-item{color:#000!important}.dark-theme .flatbiz-layout-topmenu-overflowed-modal .ant-menu-item{color:#fff}.loader{align-items:center;background-color:var(--block-bg-color);bottom:0;display:flex;justify-content:center;left:0;opacity:1;position:absolute;right:0;text-align:center;top:0;z-index:100000}.loader.fullScreen{position:fixed}.loader .loader-wrapper{display:inline-flex;flex-direction:column;height:100px;justify-content:space-around;width:100px}.loader .loader-inner{animation:spinner .6s linear infinite;border:2px solid rgba(0,128,227,.08);border-left-color:rgba(0,84,153,.7);border-radius:50%;height:30px;margin:0 auto;text-indent:-12345px;width:30px;z-index:100001}.loader .loader-text{color:#0080e3;font-size:12px;height:20px;letter-spacing:4px;text-align:center;width:100px}.loader.hidden{display:none}@keyframes spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.page{flex:1;overflow-x:hidden;overflow-y:auto;position:relative}.page-flex{display:flex;flex-direction:column}.page-full{flex:1;overflow-y:auto}.layout-shrink{align-items:center;cursor:pointer;display:flex;font-size:18px;justify-content:center;padding:10px 0;transition:all .3s ease-out}.sider-bar-shrink{background-color:var(--sidebar-bgColor);box-shadow:0 0 17px rgba(0,0,0,.1);color:var(--sidebar-menuSelectedTextColor)}.sider-bar-shrink:hover{color:var(--sidebar-menuSelectedBgColor)}.header-shrink{color:var(--header-textColor);width:50px}.header-shrink:hover{color:var(--header-menuSelectedBgColor)}.icon-change-show-active .menu-icon-img-active{display:block}.icon-change-show-active .menu-icon-img{display:none}.menu-icon-img,.menu-icon-img-active{background-position:0;background-repeat:no-repeat;background-size:100% 100%;display:none;flex-shrink:0;height:16px;width:16px}.menu-icon-img{display:block}.flatbiz-layout-sider{display:flex;flex:1!important;flex-direction:column;height:100%;overflow:hidden;z-index:10}.flatbiz-layout-sider .ant-layout-sider-children{display:flex;flex-direction:column}.flatbiz-layout-sider .ant-layout-sider-children>.ant-menu-root{padding-bottom:30px}.flatbiz-layout-sider .ant-menu-root{flex:1;overflow-x:hidden;overflow-y:auto}.flatbiz-layout-sider .ant-menu-title-content{margin-left:5px}.flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-item-active .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-item-active .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img-active,.flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img,.flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-light.ant-menu-root.ant-menu-inline,.flatbiz-layout-sider .ant-menu-light.ant-menu-root.ant-menu-vertical{border-inline-end:none}.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-item,.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-submenu .ant-menu-submenu-title{align-items:center;display:flex}.ant-menu-root.ant-menu-inline-collapsed .menu-icon-img-active+span{display:none}.menu-icon-wrapper{align-items:center;display:flex}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img-active{display:block}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img{display:none}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img-active{display:block}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img{display:none}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.flatbiz-layout-sider-submenu-popup .ant-menu-item{align-items:center!important;display:flex!important}.flatbiz-layout-sider-submenu-popup .ant-menu-title-content{color:rgba(0,0,0,.88);margin-left:5px}.sider-bar-search{align-items:center;background-color:var(--sidebar-bgColor);display:flex;padding:10px}.sider-bar-search input{background-color:transparent}.sider-bar-search:not(.sider-bar-search-bgfff) input{color:#fff}.sider-bar-search:not(.sider-bar-search-bgfff) input::placeholder{color:#fff}.iframe-tabs{overflow:hidden}.iframe-tabs .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.iframe-tabs .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.iframe-tabs .ant-tabs-tab-btn{margin:0 auto}.iframe-tabs .ant-tabs-tab-remove{display:flex;height:16px;margin-left:4px;padding:0;width:16px}.iframe-tabs .tab-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAV5JREFUWEftVTtSwzAQfZuchJqL2KGJDAMFyKkIDZ+GUJGZDNDwafg0QGUbCpjBdkPsg3AALoKXUUhsF8YfKNRYnaTdt2/falcEzYs0x0dLoFWgVaBSAeftfdLtdtaY6UQK47VO23pBvE7g868kcQarK5Myn0oCT2H0wYxlBdIB2ZvC8MoAvTC2wewoGwI+t4S59C8CKhuAXxYgzDy0rd5jEagXREMA99kdbVSpVqmAAnsOYpmA3RzwnhTGXZ6E60f7RLhOz4gGsm/kfIp1qEVAubr+dJuIHrIAPJL93pXae340AuEiF2JHCjOzLalBbQKzQEG8C/BtWg5gPK/1aVYiHNiWeVPnsc5965r+2Hnh9BBMl4VejCNpmcV3v4RppMACww2iYwLSrNU5A2NbmGfN0pl1SvOllYDWEmh9hFrbUOsg0j6KtX9G2r/j5lOimcefBlGzEOXWLYFWgVaBb9EEtCFLbAZ7AAAAAElFTkSuQmCC);background-size:100% 100%;border-radius:100%;display:inline-block;height:100%;width:100%}.iframe-tabs .tab-icon:hover{background-color:#f96868;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAASdJREFUWEftljtOBDEQRF8dhZjrIIhYIpaET8ISsRICEj4JCwkQARGchwNwk0KWvFJrNcN4dpCcjKORu11dXW13j6i8VDk+I4FRgVGBTgVsXwBbwKWkr5Jna3sbuAHeJKXzrauEwDewmREmkj7+ArQ9SYGzz4+kjaEEUjafAWQq6bUJ1PYUeA62nS7VOhVIYLZ3gfcAfCTpKZKwfQw8hL09SfFMoxBFBDKJfeAloMwk3WfbDLgNtgNJ0Xf9O7CS5SHwGPbm+fsq7J1IWpRc1uRTrMAS0PYpcNcS4ExSm21YCVaUOAdi1sk8l3RdmvnSr7cCueb1CFQtge16l9B2vWdYtRHlwVKvFduuPozqjuO+jaWv/1qNqG+QQf8D/xmsCWtUYFSgugK/gSWEIdTkUcAAAAAASUVORK5CYII=");background-size:100% 100%}.iframe-tabs .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.iframe-tabs .ant-tabs-nav:before{border:none!important}.iframe-tabs .ant-tabs-content{height:100%}.iframe-tabs .ant-tabs-extra-content{margin-right:20px}.iframe-tabs .menu-tabs-operate{text-align:center;width:24px}.content-top-menus{margin:0}.content-top-menus .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.content-top-menus .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.content-top-menus .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.content-top-menus .ant-tabs-nav:before{border:none!important}.iframe-tabs-tab-badge{position:absolute}.iframe-tabs-tab-badge .ant-badge-dot{transform:none!important}.layout-page-wrapper{background:var(--bg-color);flex:1;padding:8px 8px 0}.layout-page,.layout-page-wrapper{height:100%;overflow:hidden;position:relative}.layout-page{display:flex;flex-direction:column}.layout-page-noheader{padding:0}.layout-page-noheader .bread-wrapper{padding:5px 15px 5px 8px}.layout-page-noheader .page{padding:0 8px 8px}#app,#app>.ant-app,body,html{height:100%;margin:0;width:100%}*,:after,:before{box-sizing:border-box}#app{background-color:var(--bg-color)}.flatbiz-layout{bottom:0;display:flex;flex-direction:row;height:100vh;left:0;overflow:auto;position:fixed;right:0;top:0}.flatbiz-layout-main{display:flex;flex:1;overflow:hidden}.flatbiz-layout-main-content{flex:1;overflow-y:auto}.flatbiz-layout-windows ::-webkit-scrollbar,.layout-page-windows ::-webkit-scrollbar,.page-windows ::-webkit-scrollbar{background-color:#eee;height:8px;width:8px}.flatbiz-layout-windows ::-webkit-scrollbar-thumb,.layout-page-windows ::-webkit-scrollbar-thumb,.page-windows ::-webkit-scrollbar-thumb{background-color:#cfcfcf;border-radius:10px}.flatbiz-layout-windows ::-webkit-scrollbar-thumb:hover,.layout-page-windows ::-webkit-scrollbar-thumb:hover,.page-windows ::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8}.flatbiz-layout-windows ::-webkit-scrollbar-thumb:active,.layout-page-windows ::-webkit-scrollbar-thumb:active,.page-windows ::-webkit-scrollbar-thumb:active{background-color:#787878}
|
|
1
|
+
.bread-wrapper{align-items:center;border-radius:6px;display:flex;justify-content:space-between;margin-bottom:5px;padding:3px 15px 6px 8px}.bread-wrapper .bread{display:inline-block}.bread-wrapper .ant-breadcrumb ol{margin:0;padding:0}.bread-extend{flex:1}.header-account{color:unset;cursor:pointer;flex-shrink:0;height:100%;line-height:normal;margin-right:20px}.header-account:hover{background:var(--header-menuSelectedBgColor);color:var(--header-menuSelectedTextColor)}.header-account .header-account-wraper{align-items:center;display:flex;height:100%;padding:0 15px}.header-account .header-account-wraper img.user-avatar{border-radius:100%;height:24px;object-fit:cover;width:24px}.account-dropdown-overlay{box-shadow:0 4px 8px 0 rgba(0,0,0,.08);z-index:900}.layout-brand{align-items:center;background:var(--header-bgColor);color:var(--header-textColor);display:flex;justify-content:center;overflow:hidden;position:relative;transition:all .2s;white-space:nowrap}.brand-logo{background-position:50%;background-repeat:no-repeat;background-size:40px 100%;height:100%;width:40px}.brand-name{font-size:18px;margin-left:15px;white-space:nowrap}.ant-layout-sider-collapsed .layout-brand{display:block;overflow:hidden}.ant-layout-sider-collapsed .brand-logo{width:60px}.flatbiz-layout-main-header{background:var(--header-bgColor);color:var(--header-textColor);display:flex;flex-shrink:0;z-index:10}.flatbiz-layout-system-name{align-items:center;color:unset;display:flex;flex-shrink:0;font-size:18px;margin-left:15px}.flatbiz-layout-header-fill{display:flex;flex:1;justify-content:flex-end;overflow:hidden}.flatbiz-layout-header-fill>.ant-menu{background:unset;border-bottom:none;height:unset}.flatbiz-layout-header-fill>.ant-menu.ant-menu-horizontal{border-bottom:none;line-height:inherit}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item{align-items:center;border-radius:0!important;display:flex}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item:hover:after{border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item:after{border-bottom:0;bottom:12px}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-selected:after{background:var(--header-menuSelectedTextColor);border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected){background:var(--header-menuActiveBgColor)}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected):after{background:var(--header-menuActiveTextColor);border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item-active:after,.flatbiz-layout-header-fill>.ant-menu .ant-menu-item-selected:after{border-radius:3px;bottom:12px;content:"";height:3px;left:50%!important;min-width:22px;position:absolute;transform:translateX(-50%);width:30%}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest{align-items:center;background-color:transparent!important;display:flex}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title{color:var(--header-textColor)!important}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title:hover{color:unset!important}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest:after{width:0}.flatbiz-layout-topmenu{flex:1;overflow:hidden}.flatbiz-layout-main-header-has-menu .flatbiz-layout-header-fill{justify-content:space-between}.flatbiz-layout-topmenu-overflowed-modal .ant-menu-submenu{background-color:transparent!important}.light-theme .flatbiz-layout-topmenu-overflowed-modal .ant-menu-item{color:#000!important}.dark-theme .flatbiz-layout-topmenu-overflowed-modal .ant-menu-item{color:#fff}.loader{align-items:center;background-color:var(--block-bg-color);bottom:0;display:flex;justify-content:center;left:0;opacity:1;position:absolute;right:0;text-align:center;top:0;z-index:100000}.loader.fullScreen{position:fixed}.loader .loader-wrapper{display:inline-flex;flex-direction:column;height:100px;justify-content:space-around;width:100px}.loader .loader-inner{animation:spinner .6s linear infinite;border:2px solid rgba(0,128,227,.08);border-left-color:rgba(0,84,153,.7);border-radius:50%;height:30px;margin:0 auto;text-indent:-12345px;width:30px;z-index:100001}.loader .loader-text{color:#0080e3;font-size:12px;height:20px;letter-spacing:4px;text-align:center;width:100px}.loader.hidden{display:none}@keyframes spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.page{flex:1;overflow-x:hidden;overflow-y:auto;position:relative}.page-flex{display:flex;flex-direction:column}.page-full{flex:1;overflow-y:auto}.layout-shrink{align-items:center;cursor:pointer;display:flex;font-size:18px;justify-content:center;padding:10px 0;transition:all .3s ease-out}.sider-bar-shrink{background-color:var(--sidebar-bgColor);box-shadow:0 0 17px rgba(0,0,0,.1);color:var(--sidebar-menuSelectedTextColor)}.sider-bar-shrink:hover{color:var(--sidebar-menuSelectedBgColor)}.header-shrink{color:var(--header-textColor);width:50px}.header-shrink:hover{color:var(--header-menuSelectedBgColor)}.icon-change-show-active .menu-icon-img-active{display:block}.icon-change-show-active .menu-icon-img{display:none}.menu-icon-img,.menu-icon-img-active{background-position:0;background-repeat:no-repeat;background-size:100% 100%;display:none;flex-shrink:0;height:16px;width:16px}.menu-icon-img{display:block}.flatbiz-layout-sider{display:flex;flex:1!important;flex-direction:column;height:100%;overflow:hidden;z-index:10}.flatbiz-layout-sider .ant-layout-sider-children{display:flex;flex-direction:column}.flatbiz-layout-sider .ant-layout-sider-children>.ant-menu-root{padding-bottom:30px}.flatbiz-layout-sider .ant-menu-root{flex:1;overflow-x:hidden;overflow-y:auto}.flatbiz-layout-sider .ant-menu-title-content{margin-left:5px}.flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-item-active .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-item-active .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img-active,.flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img,.flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-light.ant-menu-root.ant-menu-inline,.flatbiz-layout-sider .ant-menu-light.ant-menu-root.ant-menu-vertical{border-inline-end:none}.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-item,.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-submenu .ant-menu-submenu-title{align-items:center;display:flex}.ant-menu-root.ant-menu-inline-collapsed .menu-icon-img-active+span{display:none}.menu-icon-wrapper{align-items:center;display:flex}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img-active{display:block}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img{display:none}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img-active{display:block}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img{display:none}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.flatbiz-layout-sider-submenu-popup .ant-menu-item{align-items:center!important;display:flex!important}.flatbiz-layout-sider-submenu-popup .ant-menu-title-content{color:rgba(0,0,0,.88);margin-left:5px}.sider-bar-search{align-items:center;background-color:var(--sidebar-bgColor);display:flex;padding:10px}.sider-bar-search input{background-color:transparent}.sider-bar-search:not(.sider-bar-search-bgfff) input{color:#fff}.sider-bar-search:not(.sider-bar-search-bgfff) input::placeholder{color:#fff}.iframe-tabs{overflow:hidden;z-index:5}.iframe-tabs .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.iframe-tabs .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.iframe-tabs .ant-tabs-tab-btn{margin:0 auto}.iframe-tabs .ant-tabs-tab-remove{display:flex;height:16px;margin-left:4px;padding:0;width:16px}.iframe-tabs .tab-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAV5JREFUWEftVTtSwzAQfZuchJqL2KGJDAMFyKkIDZ+GUJGZDNDwafg0QGUbCpjBdkPsg3AALoKXUUhsF8YfKNRYnaTdt2/falcEzYs0x0dLoFWgVaBSAeftfdLtdtaY6UQK47VO23pBvE7g868kcQarK5Myn0oCT2H0wYxlBdIB2ZvC8MoAvTC2wewoGwI+t4S59C8CKhuAXxYgzDy0rd5jEagXREMA99kdbVSpVqmAAnsOYpmA3RzwnhTGXZ6E60f7RLhOz4gGsm/kfIp1qEVAubr+dJuIHrIAPJL93pXae340AuEiF2JHCjOzLalBbQKzQEG8C/BtWg5gPK/1aVYiHNiWeVPnsc5965r+2Hnh9BBMl4VejCNpmcV3v4RppMACww2iYwLSrNU5A2NbmGfN0pl1SvOllYDWEmh9hFrbUOsg0j6KtX9G2r/j5lOimcefBlGzEOXWLYFWgVaBb9EEtCFLbAZ7AAAAAElFTkSuQmCC);background-size:100% 100%;border-radius:100%;display:inline-block;height:100%;width:100%}.iframe-tabs .tab-icon:hover{background-color:#f96868;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAASdJREFUWEftljtOBDEQRF8dhZjrIIhYIpaET8ISsRICEj4JCwkQARGchwNwk0KWvFJrNcN4dpCcjKORu11dXW13j6i8VDk+I4FRgVGBTgVsXwBbwKWkr5Jna3sbuAHeJKXzrauEwDewmREmkj7+ArQ9SYGzz4+kjaEEUjafAWQq6bUJ1PYUeA62nS7VOhVIYLZ3gfcAfCTpKZKwfQw8hL09SfFMoxBFBDKJfeAloMwk3WfbDLgNtgNJ0Xf9O7CS5SHwGPbm+fsq7J1IWpRc1uRTrMAS0PYpcNcS4ExSm21YCVaUOAdi1sk8l3RdmvnSr7cCueb1CFQtge16l9B2vWdYtRHlwVKvFduuPozqjuO+jaWv/1qNqG+QQf8D/xmsCWtUYFSgugK/gSWEIdTkUcAAAAAASUVORK5CYII=");background-size:100% 100%}.iframe-tabs .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.iframe-tabs .ant-tabs-nav:before{border:none!important}.iframe-tabs .ant-tabs-content{height:100%}.iframe-tabs .ant-tabs-extra-content{margin-right:20px}.iframe-tabs .menu-tabs-operate{text-align:center;width:24px}.content-top-menus{margin:0}.content-top-menus .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.content-top-menus .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.content-top-menus .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.content-top-menus .ant-tabs-nav:before{border:none!important}.iframe-tabs-tab-badge{position:absolute}.iframe-tabs-tab-badge .ant-badge-dot{transform:none!important}.layout-page-wrapper{background:var(--bg-color);flex:1;padding:8px 8px 0}.layout-page,.layout-page-wrapper{height:100%;overflow:hidden;position:relative}.layout-page{display:flex;flex-direction:column}.layout-page-noheader{padding:0}.layout-page-noheader .bread-wrapper{padding:5px 15px 5px 8px}.layout-page-noheader .page{padding:0 8px 8px}#app,#app>.ant-app,body,html{height:100%;margin:0;width:100%}*,:after,:before{box-sizing:border-box}#app{background-color:var(--bg-color)}.flatbiz-layout{bottom:0;display:flex;flex-direction:row;height:100vh;left:0;overflow:auto;position:fixed;right:0;top:0}.flatbiz-layout-main{display:flex;flex:1;overflow:hidden}.flatbiz-layout-main-content{flex:1;overflow-y:auto}.flatbiz-layout-windows ::-webkit-scrollbar,.layout-page-windows ::-webkit-scrollbar,.page-windows ::-webkit-scrollbar{background-color:#eee;height:8px;width:8px}.flatbiz-layout-windows ::-webkit-scrollbar-thumb,.layout-page-windows ::-webkit-scrollbar-thumb,.page-windows ::-webkit-scrollbar-thumb{background-color:#cfcfcf;border-radius:10px}.flatbiz-layout-windows ::-webkit-scrollbar-thumb:hover,.layout-page-windows ::-webkit-scrollbar-thumb:hover,.page-windows ::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8}.flatbiz-layout-windows ::-webkit-scrollbar-thumb:active,.layout-page-windows ::-webkit-scrollbar-thumb:active,.page-windows ::-webkit-scrollbar-thumb:active{background-color:#787878}
|
package/dist/index.d.ts
CHANGED
|
@@ -653,6 +653,8 @@ export declare const useRegisterRefreshCurrentIframeTab: (refreshKey: string, on
|
|
|
653
653
|
* @returns
|
|
654
654
|
*/
|
|
655
655
|
export declare const useRefreshRegisterIframeTab: () => (refreshKey: string, params?: TPlainObject) => void;
|
|
656
|
+
/** iframe tab 激活回调 */
|
|
657
|
+
export declare const useIframeTabActive: (callback: () => void) => void;
|
|
656
658
|
export type IframeHandler<T = unknown> = (data: T) => void;
|
|
657
659
|
/**
|
|
658
660
|
* iframe通信Demo:https://xx.xx.com/docs/admin/main/exchange
|
package/dist/index.js
CHANGED
|
@@ -76,20 +76,20 @@ function _classCallCheck(a, n) {
|
|
|
76
76
|
function _defineProperties(e, r) {
|
|
77
77
|
for (var t = 0; t < r.length; t++) {
|
|
78
78
|
var o = r[t];
|
|
79
|
-
o.enumerable = o.enumerable ||
|
|
79
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
function _createClass(e, r, t) {
|
|
83
83
|
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
84
|
-
writable:
|
|
84
|
+
writable: false
|
|
85
85
|
}), e;
|
|
86
86
|
}
|
|
87
87
|
function _defineProperty(e, r, t) {
|
|
88
88
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
89
89
|
value: t,
|
|
90
|
-
enumerable:
|
|
91
|
-
configurable:
|
|
92
|
-
writable:
|
|
90
|
+
enumerable: true,
|
|
91
|
+
configurable: true,
|
|
92
|
+
writable: true
|
|
93
93
|
}) : e[r] = t, e;
|
|
94
94
|
}
|
|
95
95
|
function _getPrototypeOf(t) {
|
|
@@ -102,11 +102,11 @@ function _inherits(t, e) {
|
|
|
102
102
|
t.prototype = Object.create(e && e.prototype, {
|
|
103
103
|
constructor: {
|
|
104
104
|
value: t,
|
|
105
|
-
writable:
|
|
106
|
-
configurable:
|
|
105
|
+
writable: true,
|
|
106
|
+
configurable: true
|
|
107
107
|
}
|
|
108
108
|
}), Object.defineProperty(t, "prototype", {
|
|
109
|
-
writable:
|
|
109
|
+
writable: false
|
|
110
110
|
}), e && _setPrototypeOf(t, e);
|
|
111
111
|
}
|
|
112
112
|
function _isNativeReflectConstruct() {
|
|
@@ -128,15 +128,15 @@ function _iterableToArrayLimit(r, l) {
|
|
|
128
128
|
i,
|
|
129
129
|
u,
|
|
130
130
|
a = [],
|
|
131
|
-
f =
|
|
132
|
-
o =
|
|
131
|
+
f = true,
|
|
132
|
+
o = false;
|
|
133
133
|
try {
|
|
134
134
|
if (i = (t = t.call(r)).next, 0 === l) {
|
|
135
135
|
if (Object(t) !== t) return;
|
|
136
136
|
f = !1;
|
|
137
137
|
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
138
138
|
} catch (r) {
|
|
139
|
-
o =
|
|
139
|
+
o = true, n = r;
|
|
140
140
|
} finally {
|
|
141
141
|
try {
|
|
142
142
|
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
@@ -166,7 +166,7 @@ function ownKeys(e, r) {
|
|
|
166
166
|
function _objectSpread2(e) {
|
|
167
167
|
for (var r = 1; r < arguments.length; r++) {
|
|
168
168
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
169
|
-
r % 2 ? ownKeys(Object(t),
|
|
169
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
170
170
|
_defineProperty(e, r, t[r]);
|
|
171
171
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
172
172
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
@@ -180,8 +180,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
180
180
|
r,
|
|
181
181
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
182
182
|
if (Object.getOwnPropertySymbols) {
|
|
183
|
-
var
|
|
184
|
-
for (r = 0; r <
|
|
183
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
184
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
185
185
|
}
|
|
186
186
|
return i;
|
|
187
187
|
}
|
|
@@ -189,7 +189,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
189
189
|
if (null == r) return {};
|
|
190
190
|
var t = {};
|
|
191
191
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
192
|
-
if (e.
|
|
192
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
193
193
|
t[n] = r[n];
|
|
194
194
|
}
|
|
195
195
|
return t;
|
|
@@ -214,11 +214,11 @@ function _toPrimitive(t, r) {
|
|
|
214
214
|
if ("object" != typeof t || !t) return t;
|
|
215
215
|
var e = t[Symbol.toPrimitive];
|
|
216
216
|
if (void 0 !== e) {
|
|
217
|
-
var i = e.call(t, r
|
|
217
|
+
var i = e.call(t, r);
|
|
218
218
|
if ("object" != typeof i) return i;
|
|
219
219
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
220
220
|
}
|
|
221
|
-
return (
|
|
221
|
+
return (String )(t);
|
|
222
222
|
}
|
|
223
223
|
function _toPropertyKey(t) {
|
|
224
224
|
var i = _toPrimitive(t, "string");
|
|
@@ -256,6 +256,9 @@ var _createCtx3 = createCtx(),
|
|
|
256
256
|
BootstrapCtx = _createCtx4[1];
|
|
257
257
|
|
|
258
258
|
var IFrameEvents = /*#__PURE__*/function (IFrameEvents) {
|
|
259
|
+
/**
|
|
260
|
+
* 接收从子iframe通知过来的消息, 或者父window发出的通知的消息
|
|
261
|
+
*/
|
|
259
262
|
IFrameEvents["messageReceived"] = "messageReceived";
|
|
260
263
|
return IFrameEvents;
|
|
261
264
|
}({});
|
|
@@ -586,7 +589,7 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
586
589
|
if (data.type === '__refresh-iframe-tab') {
|
|
587
590
|
var $Try_1_Post = function () {
|
|
588
591
|
try {
|
|
589
|
-
return $
|
|
592
|
+
return $If_5.call(this);
|
|
590
593
|
} catch ($boundEx) {
|
|
591
594
|
return $error($boundEx);
|
|
592
595
|
}
|
|
@@ -616,7 +619,7 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
616
619
|
refreshFunc.start();
|
|
617
620
|
var $Try_2_Post = function () {
|
|
618
621
|
try {
|
|
619
|
-
return $
|
|
622
|
+
return $If_6.call(this);
|
|
620
623
|
} catch ($boundEx) {
|
|
621
624
|
return $Try_1_Catch($boundEx);
|
|
622
625
|
}
|
|
@@ -629,7 +632,7 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
629
632
|
}
|
|
630
633
|
};
|
|
631
634
|
try {
|
|
632
|
-
return Promise.resolve(onRefresh(data.data.params)).then(function ($
|
|
635
|
+
return Promise.resolve(onRefresh(data.data.params)).then(function ($await_9) {
|
|
633
636
|
try {
|
|
634
637
|
return $Try_2_Finally($Try_2_Post)();
|
|
635
638
|
} catch ($boundEx) {
|
|
@@ -640,18 +643,18 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
640
643
|
$Try_2_Catch($exception_3);
|
|
641
644
|
}
|
|
642
645
|
}
|
|
643
|
-
function $
|
|
646
|
+
function $If_6() {
|
|
644
647
|
return $Try_1_Post();
|
|
645
648
|
}
|
|
646
|
-
return $
|
|
649
|
+
return $If_6.call(this);
|
|
647
650
|
} catch (error) {
|
|
648
651
|
$Try_1_Catch(error);
|
|
649
652
|
}
|
|
650
653
|
}
|
|
651
|
-
function $
|
|
654
|
+
function $If_5() {
|
|
652
655
|
return $return();
|
|
653
656
|
}
|
|
654
|
-
return $
|
|
657
|
+
return $If_5.call(this);
|
|
655
658
|
});
|
|
656
659
|
});
|
|
657
660
|
};
|
|
@@ -677,6 +680,57 @@ var useRefreshRegisterIframeTab = function useRefreshRegisterIframeTab() {
|
|
|
677
680
|
};
|
|
678
681
|
};
|
|
679
682
|
|
|
683
|
+
/** iframe tab 激活回调 */
|
|
684
|
+
var useIframeTabActive = function useIframeTabActive(callback) {
|
|
685
|
+
useEffect(function () {
|
|
686
|
+
callback();
|
|
687
|
+
}, []);
|
|
688
|
+
useIframe(function (data) {
|
|
689
|
+
return new Promise(function ($return, $error) {
|
|
690
|
+
var iframeNodeKey;
|
|
691
|
+
if (data.type === '__iframe-tab-active') {
|
|
692
|
+
var $Try_4_Post = function () {
|
|
693
|
+
try {
|
|
694
|
+
return $If_7.call(this);
|
|
695
|
+
} catch ($boundEx) {
|
|
696
|
+
return $error($boundEx);
|
|
697
|
+
}
|
|
698
|
+
}.bind(this);
|
|
699
|
+
var $Try_4_Catch = function (error) {
|
|
700
|
+
try {
|
|
701
|
+
console.error(error);
|
|
702
|
+
return $Try_4_Post();
|
|
703
|
+
} catch ($boundEx) {
|
|
704
|
+
return $error($boundEx);
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
try {
|
|
708
|
+
iframeNodeKey = window['__iframe_node_key'];
|
|
709
|
+
if (data.data.activeKey === iframeNodeKey) {
|
|
710
|
+
return Promise.resolve(callback()).then(function ($await_10) {
|
|
711
|
+
try {
|
|
712
|
+
return $If_8.call(this);
|
|
713
|
+
} catch ($boundEx) {
|
|
714
|
+
return $Try_4_Catch($boundEx);
|
|
715
|
+
}
|
|
716
|
+
}.bind(this), $Try_4_Catch);
|
|
717
|
+
}
|
|
718
|
+
function $If_8() {
|
|
719
|
+
return $Try_4_Post();
|
|
720
|
+
}
|
|
721
|
+
return $If_8.call(this);
|
|
722
|
+
} catch (error) {
|
|
723
|
+
$Try_4_Catch(error);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
function $If_7() {
|
|
727
|
+
return $return();
|
|
728
|
+
}
|
|
729
|
+
return $If_7.call(this);
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
};
|
|
733
|
+
|
|
680
734
|
var Bread = function Bread(props) {
|
|
681
735
|
var _ctx$breadcrumbProps;
|
|
682
736
|
var ctx = bootstrapCtx();
|
|
@@ -1155,7 +1209,7 @@ var useHistoryBack = function useHistoryBack(props) {
|
|
|
1155
1209
|
routeBaseName = _getHostUrlAndRouteBa2.routeBaseName;
|
|
1156
1210
|
var routerList = useBread(ctx.breads, routeBaseName);
|
|
1157
1211
|
var path = useMemo(function () {
|
|
1158
|
-
var newLevel = level
|
|
1212
|
+
var newLevel = level;
|
|
1159
1213
|
if (routerList.length >= 2) {
|
|
1160
1214
|
var routerItem = routerList[routerList.length - 1 - Math.abs(newLevel)] || routerList[routerList.length - 2];
|
|
1161
1215
|
if (routerItem) {
|
|
@@ -2541,7 +2595,7 @@ var SiderBarIcon = function SiderBarIcon(props) {
|
|
|
2541
2595
|
});
|
|
2542
2596
|
};
|
|
2543
2597
|
var SiderBar = function SiderBar() {
|
|
2544
|
-
var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$sidebarThe5, _layoutCtx$sidebarThe6, _layoutCtx$sidebarThe7, _layoutCtx$sidebarThe8, _layoutCtx$sidebarThe9, _layoutCtx$
|
|
2598
|
+
var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$sidebarThe5, _layoutCtx$sidebarThe6, _layoutCtx$sidebarThe7, _layoutCtx$sidebarThe8, _layoutCtx$sidebarThe9, _layoutCtx$sidebarThe0, _layoutCtx$sidebarThe1, _layoutCtx$sidebarThe10, _layoutCtx$sidebarThe11, _layoutCtx$sidebarThe12, _layoutCtx$sidebarThe13;
|
|
2545
2599
|
var _useState = useState(),
|
|
2546
2600
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2547
2601
|
searchValue = _useState2[0],
|
|
@@ -2701,12 +2755,12 @@ var SiderBar = function SiderBar() {
|
|
|
2701
2755
|
itemBg: (_layoutCtx$sidebarThe7 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe7 === void 0 ? void 0 : _layoutCtx$sidebarThe7.bgColor,
|
|
2702
2756
|
itemColor: (_layoutCtx$sidebarThe8 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe8 === void 0 ? void 0 : _layoutCtx$sidebarThe8.menuColor,
|
|
2703
2757
|
itemHoverColor: (_layoutCtx$sidebarThe9 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe9 === void 0 ? void 0 : _layoutCtx$sidebarThe9.menuActiveTextColor,
|
|
2704
|
-
itemHoverBg: (_layoutCtx$
|
|
2705
|
-
itemActiveBg: (_layoutCtx$
|
|
2706
|
-
itemSelectedColor: (_layoutCtx$
|
|
2707
|
-
itemSelectedBg: (_layoutCtx$
|
|
2708
|
-
subMenuItemBg: (_layoutCtx$
|
|
2709
|
-
subMenuItemSelectedColor: (_layoutCtx$
|
|
2758
|
+
itemHoverBg: (_layoutCtx$sidebarThe0 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe0 === void 0 ? void 0 : _layoutCtx$sidebarThe0.menuActiveBgColor,
|
|
2759
|
+
itemActiveBg: (_layoutCtx$sidebarThe1 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe1 === void 0 ? void 0 : _layoutCtx$sidebarThe1.menuActiveBgColor,
|
|
2760
|
+
itemSelectedColor: (_layoutCtx$sidebarThe10 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe10 === void 0 ? void 0 : _layoutCtx$sidebarThe10.menuSelectedTextColor,
|
|
2761
|
+
itemSelectedBg: (_layoutCtx$sidebarThe11 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe11 === void 0 ? void 0 : _layoutCtx$sidebarThe11.menuSelectedBgColor,
|
|
2762
|
+
subMenuItemBg: (_layoutCtx$sidebarThe12 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe12 === void 0 ? void 0 : _layoutCtx$sidebarThe12.menuSubMenuBgColor,
|
|
2763
|
+
subMenuItemSelectedColor: (_layoutCtx$sidebarThe13 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe13 === void 0 ? void 0 : _layoutCtx$sidebarThe13.menuSelectedTextColor
|
|
2710
2764
|
}
|
|
2711
2765
|
}
|
|
2712
2766
|
}
|
|
@@ -2999,6 +3053,7 @@ var PageContent = function PageContent() {
|
|
|
2999
3053
|
try {
|
|
3000
3054
|
if (target.contentWindow) {
|
|
3001
3055
|
target.contentWindow['__iframe_node_key'] = "iframe_".concat(item.id);
|
|
3056
|
+
target.contentWindow['__iframe_node'] = item;
|
|
3002
3057
|
}
|
|
3003
3058
|
} catch (_error) {
|
|
3004
3059
|
// 异常不处理,iframe写入属性可能会存在跨域问题
|
|
@@ -3153,13 +3208,13 @@ var PageLevelContent = function PageLevelContent() {
|
|
|
3153
3208
|
var LayoutIFrame = function LayoutIFrame() {
|
|
3154
3209
|
var layoutCtx = useLayoutCtx();
|
|
3155
3210
|
var _useState9 = useState('init'),
|
|
3156
|
-
|
|
3157
|
-
renderStatus =
|
|
3158
|
-
setRenderStatus =
|
|
3159
|
-
var
|
|
3160
|
-
|
|
3161
|
-
errorData =
|
|
3162
|
-
setErrorData =
|
|
3211
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
3212
|
+
renderStatus = _useState0[0],
|
|
3213
|
+
setRenderStatus = _useState0[1];
|
|
3214
|
+
var _useState1 = useState(),
|
|
3215
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
3216
|
+
errorData = _useState10[0],
|
|
3217
|
+
setErrorData = _useState10[1];
|
|
3163
3218
|
var iframeTabRenderPreHook = layoutCtx.iframeTabRenderPreHook;
|
|
3164
3219
|
fbaHooks.useEffectCustomAsync(function () {
|
|
3165
3220
|
return new Promise(function ($return, $error) {
|
|
@@ -3328,6 +3383,7 @@ var AppProvider = function AppProvider(props) {
|
|
|
3328
3383
|
var isMobile = useMediaQuery({
|
|
3329
3384
|
query: '(max-width: 767px)'
|
|
3330
3385
|
});
|
|
3386
|
+
var iframeApi = useIframe();
|
|
3331
3387
|
var _useState = useState(props.initSidebarShrinkClosed),
|
|
3332
3388
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3333
3389
|
collapsed = _useState2[0],
|
|
@@ -3345,17 +3401,17 @@ var AppProvider = function AppProvider(props) {
|
|
|
3345
3401
|
redDotMap = _useState8[0],
|
|
3346
3402
|
setRedDotMap = _useState8[1];
|
|
3347
3403
|
var _useState9 = useState(),
|
|
3348
|
-
|
|
3349
|
-
siderBarMenuActiveItem =
|
|
3350
|
-
setSiderBarMenuActiveItem =
|
|
3351
|
-
var
|
|
3404
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
3405
|
+
siderBarMenuActiveItem = _useState0[0],
|
|
3406
|
+
setSiderBarMenuActiveItem = _useState0[1];
|
|
3407
|
+
var _useState1 = useState(),
|
|
3408
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
3409
|
+
topMenuActiveItem = _useState10[0],
|
|
3410
|
+
setTopMenuActiveItem = _useState10[1];
|
|
3411
|
+
var _useState11 = useState([]),
|
|
3352
3412
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
var _useState13 = useState([]),
|
|
3356
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
3357
|
-
siderBarMenus = _useState14[0],
|
|
3358
|
-
setSiderBarMenus = _useState14[1];
|
|
3413
|
+
siderBarMenus = _useState12[0],
|
|
3414
|
+
setSiderBarMenus = _useState12[1];
|
|
3359
3415
|
// const initSiderBarMenuActiveItemRef = useRef<TMenuItem>();
|
|
3360
3416
|
|
|
3361
3417
|
hooks.useUpdateEffect(function () {
|
|
@@ -3464,14 +3520,14 @@ var AppProvider = function AppProvider(props) {
|
|
|
3464
3520
|
}, [isIframeMain, options.disableTopbarMenu, unMatchHiddenSiderBar]),
|
|
3465
3521
|
menus = _useMemo.menus,
|
|
3466
3522
|
tileMenus = _useMemo.tileMenus;
|
|
3467
|
-
var
|
|
3523
|
+
var _useState13 = useState(getCacheIframeActiveItem()),
|
|
3524
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
3525
|
+
iframeTabActiveItem = _useState14[0],
|
|
3526
|
+
setIframeTabActiveItem = _useState14[1];
|
|
3527
|
+
var _useState15 = useState(getIframeTabCacheList()),
|
|
3468
3528
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
var _useState17 = useState(getIframeTabCacheList()),
|
|
3472
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
3473
|
-
iframeTabList = _useState18[0],
|
|
3474
|
-
setIframeTabList = _useState18[1];
|
|
3529
|
+
iframeTabList = _useState16[0],
|
|
3530
|
+
setIframeTabList = _useState16[1];
|
|
3475
3531
|
fbaHooks.useEffectCustom(function () {
|
|
3476
3532
|
saveIframeTabToCache(iframeTabList);
|
|
3477
3533
|
}, [iframeTabList]);
|
|
@@ -3481,6 +3537,13 @@ var AppProvider = function AppProvider(props) {
|
|
|
3481
3537
|
document.title = iframeTabActiveItem.metaTitle || iframeTabActiveItem.name;
|
|
3482
3538
|
navigate(iframeTabActiveItem.pathSearch);
|
|
3483
3539
|
onIframeTabActiveEvent === null || onIframeTabActiveEvent === void 0 || onIframeTabActiveEvent(iframeTabActiveItem);
|
|
3540
|
+
iframeApi.broadcastMessages({
|
|
3541
|
+
type: '__iframe-tab-active',
|
|
3542
|
+
data: {
|
|
3543
|
+
activeKey: "iframe_".concat(iframeTabActiveItem.id),
|
|
3544
|
+
iframeTabItem: iframeTabActiveItem
|
|
3545
|
+
}
|
|
3546
|
+
});
|
|
3484
3547
|
}
|
|
3485
3548
|
}, [iframeTabActiveItem === null || iframeTabActiveItem === void 0 ? void 0 : iframeTabActiveItem.id]);
|
|
3486
3549
|
var onChangeCollapsed = function onChangeCollapsed(boo) {
|
|
@@ -3694,8 +3757,7 @@ var AppProvider = function AppProvider(props) {
|
|
|
3694
3757
|
var onIframeChangeByHttpUrl = function onIframeChangeByHttpUrl(url, data) {
|
|
3695
3758
|
var prevIframeTabActiveItem = cloneObject(iframeTabActiveItem);
|
|
3696
3759
|
var cahceTabList = getIframeTabCacheList();
|
|
3697
|
-
|
|
3698
|
-
pathSearch = _parseIframeTabItemUr.pathSearch;
|
|
3760
|
+
parseIframeTabItemUrlInfo(url);
|
|
3699
3761
|
var iframeTablink = guessIframeTabItemLink(url);
|
|
3700
3762
|
var siderbarTargetMenu = parseSiderTargetMenuByPath(tileMenus, url);
|
|
3701
3763
|
if (siderbarTargetMenu) {
|
|
@@ -3747,9 +3809,7 @@ var AppProvider = function AppProvider(props) {
|
|
|
3747
3809
|
var _addIframeTabListByMe = addIframeTabListByMenuItem(cahceTabList, {
|
|
3748
3810
|
link: iframeTablink,
|
|
3749
3811
|
name: getIframeTabName(iframeTablink, (data === null || data === void 0 ? void 0 : data.name) || '未知页面'),
|
|
3750
|
-
metaTitle: options === null || options === void 0 ? void 0 : options.metaTitle,
|
|
3751
|
-
pathSearch: pathSearch
|
|
3752
|
-
}),
|
|
3812
|
+
metaTitle: options === null || options === void 0 ? void 0 : options.metaTitle}),
|
|
3753
3813
|
_iframeTabListNew2 = _addIframeTabListByMe.iframeTabListNew,
|
|
3754
3814
|
_iframeTabActiveItem3 = _addIframeTabListByMe.iframeTabActiveItem;
|
|
3755
3815
|
setIframeTabList(_toConsumableArray(_iframeTabListNew2));
|
|
@@ -4333,5 +4393,5 @@ var getIframeTabUid = function getIframeTabUid(prefix) {
|
|
|
4333
4393
|
return "".concat(prefix, "_").concat(iframeId);
|
|
4334
4394
|
};
|
|
4335
4395
|
|
|
4336
|
-
export { Bread, HistoryBackButton, LayoutPage, Page, PageWrapper, ProLayoutModel, bootstrap, getIframeTabUid, message, modal, notification, proLayoutModels, useHistoryBack, useIframe, usePageWrapper, useRefreshRegisterIframeTab, useRegisterRefreshCurrentIframeTab };
|
|
4396
|
+
export { Bread, HistoryBackButton, LayoutPage, Page, PageWrapper, ProLayoutModel, bootstrap, getIframeTabUid, message, modal, notification, proLayoutModels, useHistoryBack, useIframe, useIframeTabActive, usePageWrapper, useRefreshRegisterIframeTab, useRegisterRefreshCurrentIframeTab };
|
|
4337
4397
|
//# sourceMappingURL=index.js.map
|