Commit 0c0bdc8d by mushishixian

tab包

parent 89836def
Showing with 1658 additions and 4 deletions
......@@ -14,7 +14,8 @@
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5"
"laravel/tinker": "^2.5",
"mosiboom/dcat-iframe-tab": "^1.2"
},
"require-dev": {
"facade/ignition": "^2.0",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6d0a302c7012ac63f4ea84e899ab3fb1",
"content-hash": "2a1756e9a96b52b7af816f286518356d",
"packages": [
{
"name": "asm89/stack-cors",
......@@ -2005,6 +2005,66 @@
"time": "2022-07-24T11:55:47+00:00"
},
{
"name": "mosiboom/dcat-iframe-tab",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/mosiboom/dcat-iframe-tab.git",
"reference": "805adbc8af578dbde103b5cf81f04348113980ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mosiboom/dcat-iframe-tab/zipball/805adbc8af578dbde103b5cf81f04348113980ce",
"reference": "805adbc8af578dbde103b5cf81f04348113980ce",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5"
},
"type": "laravel-extension",
"extra": {
"laravel": {
"providers": [
"Mosiboom\\DcatIframeTab\\IframeTabProvider"
],
"aliases": {
"IframeTab": "Mosiboom\\DcatIframeTab\\IframeTab"
},
"dont-discover": []
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Mosiboom\\DcatIframeTab\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jasper",
"email": "936022546@qq.com"
}
],
"description": "iframe-tab framework for dcat-admin",
"support": {
"issues": "https://github.com/mosiboom/dcat-iframe-tab/issues",
"source": "https://github.com/mosiboom/dcat-iframe-tab/tree/1.2.1"
},
"time": "2021-09-17T10:08:28+00:00"
},
{
"name": "nesbot/carbon",
"version": "2.62.1",
"source": {
......
......@@ -6,10 +6,26 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'App\\Admin\\Actions\\AdminSetting' => $baseDir . '/app/Admin/Actions/AdminSetting.php',
'App\\Admin\\Controllers\\AuthController' => $baseDir . '/app/Admin/Controllers/AuthController.php',
'App\\Admin\\Controllers\\HomeController' => $baseDir . '/app/Admin/Controllers/HomeController.php',
'App\\Admin\\Controllers\\UserAddressController' => $baseDir . '/app/Admin/Controllers/UserAddressController.php',
'App\\Admin\\Forms\\AdminSetting' => $baseDir . '/app/Admin/Forms/AdminSetting.php',
'App\\Admin\\Forms\\ResetPassword' => $baseDir . '/app/Admin/Forms/ResetPassword.php',
'App\\Admin\\Forms\\Setting' => $baseDir . '/app/Admin/Forms/Setting.php',
'App\\Admin\\Forms\\UserProfile' => $baseDir . '/app/Admin/Forms/UserProfile.php',
'App\\Admin\\Metrics\\Examples\\NewDevices' => $baseDir . '/app/Admin/Metrics/Examples/NewDevices.php',
'App\\Admin\\Metrics\\Examples\\NewUsers' => $baseDir . '/app/Admin/Metrics/Examples/NewUsers.php',
'App\\Admin\\Metrics\\Examples\\ProductOrders' => $baseDir . '/app/Admin/Metrics/Examples/ProductOrders.php',
'App\\Admin\\Metrics\\Examples\\Sessions' => $baseDir . '/app/Admin/Metrics/Examples/Sessions.php',
'App\\Admin\\Metrics\\Examples\\Tickets' => $baseDir . '/app/Admin/Metrics/Examples/Tickets.php',
'App\\Admin\\Metrics\\Examples\\TotalUsers' => $baseDir . '/app/Admin/Metrics/Examples/TotalUsers.php',
'App\\Admin\\Repositories\\UserAddress' => $baseDir . '/app/Admin/Repositories/UserAddress.php',
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php',
'App\\Http\\Kernel' => $baseDir . '/app/Http/Kernel.php',
'App\\Http\\Middleware\\AccessControl' => $baseDir . '/app/Http/Middleware/AccessControl.php',
'App\\Http\\Middleware\\Authenticate' => $baseDir . '/app/Http/Middleware/Authenticate.php',
'App\\Http\\Middleware\\CheckForMaintenanceMode' => $baseDir . '/app/Http/Middleware/CheckForMaintenanceMode.php',
'App\\Http\\Middleware\\EncryptCookies' => $baseDir . '/app/Http/Middleware/EncryptCookies.php',
......@@ -18,6 +34,7 @@ return array(
'App\\Http\\Middleware\\TrustHosts' => $baseDir . '/app/Http/Middleware/TrustHosts.php',
'App\\Http\\Middleware\\TrustProxies' => $baseDir . '/app/Http/Middleware/TrustProxies.php',
'App\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/app/Http/Middleware/VerifyCsrfToken.php',
'App\\Models\\UserAddress' => $baseDir . '/app/Models/UserAddress.php',
'App\\Providers\\AppServiceProvider' => $baseDir . '/app/Providers/AppServiceProvider.php',
'App\\Providers\\AuthServiceProvider' => $baseDir . '/app/Providers/AuthServiceProvider.php',
'App\\Providers\\BroadcastServiceProvider' => $baseDir . '/app/Providers/BroadcastServiceProvider.php',
......@@ -3216,6 +3233,8 @@ return array(
'Monolog\\SignalHandler' => $vendorDir . '/monolog/monolog/src/Monolog/SignalHandler.php',
'Monolog\\Test\\TestCase' => $vendorDir . '/monolog/monolog/src/Monolog/Test/TestCase.php',
'Monolog\\Utils' => $vendorDir . '/monolog/monolog/src/Monolog/Utils.php',
'Mosiboom\\DcatIframeTab\\Controllers\\IframeController' => $vendorDir . '/mosiboom/dcat-iframe-tab/src/Controllers/IframeController.php',
'Mosiboom\\DcatIframeTab\\IframeTabProvider' => $vendorDir . '/mosiboom/dcat-iframe-tab/src/IframeTabProvider.php',
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider' => $vendorDir . '/nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.php',
'NunoMaduro\\Collision\\Adapters\\Laravel\\Commands\\TestCommand' => $vendorDir . '/nunomaduro/collision/src/Adapters/Laravel/Commands/TestCommand.php',
......
......@@ -33,4 +33,5 @@ return array(
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'044fc72df35e84c745ee0d4120dc15d2' => $vendorDir . '/dcat/laravel-admin/src/Support/helpers.php',
'b670c7ffff63265cc064eb6fd1051ae1' => $vendorDir . '/mosiboom/dcat-iframe-tab/src/helpers.php',
);
......@@ -49,6 +49,7 @@ return array(
'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'),
'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
'NunoMaduro\\Collision\\' => array($vendorDir . '/nunomaduro/collision/src'),
'Mosiboom\\DcatIframeTab\\' => array($vendorDir . '/mosiboom/dcat-iframe-tab/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'),
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
......
......@@ -34,6 +34,7 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
'044fc72df35e84c745ee0d4120dc15d2' => __DIR__ . '/..' . '/dcat/laravel-admin/src/Support/helpers.php',
'b670c7ffff63265cc064eb6fd1051ae1' => __DIR__ . '/..' . '/mosiboom/dcat-iframe-tab/src/helpers.php',
);
public static $prefixLengthsPsr4 = array (
......@@ -106,6 +107,7 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
),
'M' =>
array (
'Mosiboom\\DcatIframeTab\\' => 23,
'Monolog\\' => 8,
),
'L' =>
......@@ -341,6 +343,10 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
array (
0 => __DIR__ . '/..' . '/nunomaduro/collision/src',
),
'Mosiboom\\DcatIframeTab\\' =>
array (
0 => __DIR__ . '/..' . '/mosiboom/dcat-iframe-tab/src',
),
'Monolog\\' =>
array (
0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
......@@ -489,10 +495,26 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
);
public static $classMap = array (
'App\\Admin\\Actions\\AdminSetting' => __DIR__ . '/../..' . '/app/Admin/Actions/AdminSetting.php',
'App\\Admin\\Controllers\\AuthController' => __DIR__ . '/../..' . '/app/Admin/Controllers/AuthController.php',
'App\\Admin\\Controllers\\HomeController' => __DIR__ . '/../..' . '/app/Admin/Controllers/HomeController.php',
'App\\Admin\\Controllers\\UserAddressController' => __DIR__ . '/../..' . '/app/Admin/Controllers/UserAddressController.php',
'App\\Admin\\Forms\\AdminSetting' => __DIR__ . '/../..' . '/app/Admin/Forms/AdminSetting.php',
'App\\Admin\\Forms\\ResetPassword' => __DIR__ . '/../..' . '/app/Admin/Forms/ResetPassword.php',
'App\\Admin\\Forms\\Setting' => __DIR__ . '/../..' . '/app/Admin/Forms/Setting.php',
'App\\Admin\\Forms\\UserProfile' => __DIR__ . '/../..' . '/app/Admin/Forms/UserProfile.php',
'App\\Admin\\Metrics\\Examples\\NewDevices' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/NewDevices.php',
'App\\Admin\\Metrics\\Examples\\NewUsers' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/NewUsers.php',
'App\\Admin\\Metrics\\Examples\\ProductOrders' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/ProductOrders.php',
'App\\Admin\\Metrics\\Examples\\Sessions' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/Sessions.php',
'App\\Admin\\Metrics\\Examples\\Tickets' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/Tickets.php',
'App\\Admin\\Metrics\\Examples\\TotalUsers' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/TotalUsers.php',
'App\\Admin\\Repositories\\UserAddress' => __DIR__ . '/../..' . '/app/Admin/Repositories/UserAddress.php',
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php',
'App\\Http\\Kernel' => __DIR__ . '/../..' . '/app/Http/Kernel.php',
'App\\Http\\Middleware\\AccessControl' => __DIR__ . '/../..' . '/app/Http/Middleware/AccessControl.php',
'App\\Http\\Middleware\\Authenticate' => __DIR__ . '/../..' . '/app/Http/Middleware/Authenticate.php',
'App\\Http\\Middleware\\CheckForMaintenanceMode' => __DIR__ . '/../..' . '/app/Http/Middleware/CheckForMaintenanceMode.php',
'App\\Http\\Middleware\\EncryptCookies' => __DIR__ . '/../..' . '/app/Http/Middleware/EncryptCookies.php',
......@@ -501,6 +523,7 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
'App\\Http\\Middleware\\TrustHosts' => __DIR__ . '/../..' . '/app/Http/Middleware/TrustHosts.php',
'App\\Http\\Middleware\\TrustProxies' => __DIR__ . '/../..' . '/app/Http/Middleware/TrustProxies.php',
'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php',
'App\\Models\\UserAddress' => __DIR__ . '/../..' . '/app/Models/UserAddress.php',
'App\\Providers\\AppServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AppServiceProvider.php',
'App\\Providers\\AuthServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AuthServiceProvider.php',
'App\\Providers\\BroadcastServiceProvider' => __DIR__ . '/../..' . '/app/Providers/BroadcastServiceProvider.php',
......@@ -3699,6 +3722,8 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
'Monolog\\SignalHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/SignalHandler.php',
'Monolog\\Test\\TestCase' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Test/TestCase.php',
'Monolog\\Utils' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Utils.php',
'Mosiboom\\DcatIframeTab\\Controllers\\IframeController' => __DIR__ . '/..' . '/mosiboom/dcat-iframe-tab/src/Controllers/IframeController.php',
'Mosiboom\\DcatIframeTab\\IframeTabProvider' => __DIR__ . '/..' . '/mosiboom/dcat-iframe-tab/src/IframeTabProvider.php',
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider' => __DIR__ . '/..' . '/nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.php',
'NunoMaduro\\Collision\\Adapters\\Laravel\\Commands\\TestCommand' => __DIR__ . '/..' . '/nunomaduro/collision/src/Adapters/Laravel/Commands/TestCommand.php',
......
......@@ -2661,6 +2661,69 @@
"install-path": "../monolog/monolog"
},
{
"name": "mosiboom/dcat-iframe-tab",
"version": "1.2.1",
"version_normalized": "1.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/mosiboom/dcat-iframe-tab.git",
"reference": "805adbc8af578dbde103b5cf81f04348113980ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mosiboom/dcat-iframe-tab/zipball/805adbc8af578dbde103b5cf81f04348113980ce",
"reference": "805adbc8af578dbde103b5cf81f04348113980ce",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5"
},
"time": "2021-09-17T10:08:28+00:00",
"type": "laravel-extension",
"extra": {
"laravel": {
"providers": [
"Mosiboom\\DcatIframeTab\\IframeTabProvider"
],
"aliases": {
"IframeTab": "Mosiboom\\DcatIframeTab\\IframeTab"
},
"dont-discover": []
}
},
"installation-source": "dist",
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Mosiboom\\DcatIframeTab\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jasper",
"email": "936022546@qq.com"
}
],
"description": "iframe-tab framework for dcat-admin",
"support": {
"issues": "https://github.com/mosiboom/dcat-iframe-tab/issues",
"source": "https://github.com/mosiboom/dcat-iframe-tab/tree/1.2.1"
},
"install-path": "../mosiboom/dcat-iframe-tab"
},
{
"name": "myclabs/deep-copy",
"version": "1.11.0",
"version_normalized": "1.11.0.0",
......
......@@ -5,7 +5,7 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '585b9d09bb0f0ae7a14ad8b57ae0052add3bf654',
'reference' => '89836defef5142f322d286ae9b11193431e5322f',
'name' => 'laravel/laravel',
'dev' => true,
),
......@@ -424,7 +424,7 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '585b9d09bb0f0ae7a14ad8b57ae0052add3bf654',
'reference' => '89836defef5142f322d286ae9b11193431e5322f',
'dev_requirement' => false,
),
'laravel/tinker' => array(
......@@ -481,6 +481,15 @@
'reference' => '720488632c590286b88b80e62aa3d3d551ad4a50',
'dev_requirement' => false,
),
'mosiboom/dcat-iframe-tab' => array(
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'type' => 'laravel-extension',
'install_path' => __DIR__ . '/../mosiboom/dcat-iframe-tab',
'aliases' => array(),
'reference' => '805adbc8af578dbde103b5cf81f04348113980ce',
'dev_requirement' => false,
),
'myclabs/deep-copy' => array(
'pretty_version' => '1.11.0',
'version' => '1.11.0.0',
......
The MIT License (MIT)
Copyright (c) 2019 Chen TaiHong, Jasper Chen
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# dcat-iframe-tab
## 介绍
这个扩展包基于laravel框架和dcat-admin框架,为解决dcat-admin没有自带兼容iframe架构。使用此扩展包可以构建出一个iframe架构并带有标签页管理的后台框架。
## 功能
1. 双击关闭标签页
2. 当标签页过多时,可通过鼠标滚轮选择或者按住鼠标拖动
3. 支持右键操作(目前支持的操作有:关闭所有标签、关闭其他标签、刷新当前标签、复制标签页链接)
## 安装
运行以下命令:
```
$ composer require mosiboom/dcat-iframe-tab
```
然后运行:
```
# 发布扩展必备文件
$ php artisan vendor:publish --tag=iframe-tab
# 发布扩展配置文件
$ php artisan vendor:publish --tag=iframe-tab.config
# 发布扩展的视图文件(如想自定义某些内容可发布出去,建议不要使用)
$ php artisan vendor:publish --tag=iframe-tab.view
```
`php artisan vendor:publish --tag=iframe-tab` 会将css和js发布`public/vendor/iframe-tab`
## 更新
相关更新内容请关注github的`tag`,里面有每个版本详细的更新:[https://github.com/mosiboom/dcat-iframe-tab/releases](https://github.com/mosiboom/dcat-iframe-tab/releases)
基本迭代更新命令:
```apacheconfig
composer remove mosiboom/dcat-iframe-tab
composer require mosiboom/dcat-iframe-tab:版本号
php artisan vendor:publish --tag=iframe-tab --force
```
其他文件覆盖更新:
```
$ php artisan vendor:publish --tag=iframe-tab --force
$ php artisan vendor:publish --tag=iframe-tab.config --force
```
This will override css and js files to `/public/vendor/laravel-admin-ext/iframe-tabs/`
此操作会覆盖css和js还有配置文件,配置文件可以根据自己的需要来选择是否强制覆盖
## 配置
配置文件在 `config/iframe_tab.php`下dcat-Iframe-tab可提供的配置并不多,根据自己的需要去配置:
```php
return [
# 是否开启iframe_tab
'enable' => env('START_IFRAME_TAB', true),
# 底部设置
'footer_setting' => [
'copyright' => env('APP_NAME', ''),
'app_version' => env('APP_VERSION', ''),
# 是否将底部置于菜单下
'use_menu' => false
],
# 是否开启标签页缓存
'cache' => env('IFRAME_TAB_CACHE', false),
# 更改dialog表单默认宽高
'dialog_area_width' => env('IFRAME_TAB_DIALOG_AREA_WIDTH', '50%'),
'dialog_area_height' => env('IFRAME_TAB_DIALOG_AREA_HEIGHT', '90vh'),
# iframe-tab占用的路由 默认 '/'
'router' => '/',
'domain' => null,
# 是否开启懒加载模式
'lazy_load' => true
];
```
## 新增扩展接口和扩展功能
1. 用户可以在子页面引入 `public/vendor/iframe-tab/js/extend.js`文件,或者通过调用`window.iframeTabParent`全局对象来调用父级页面的iframe-tab
2. 引入新功能:超链接监听打开新页面加入iframe-tab:用户可自行定义超链接按钮,以此来打开新标签页页面,通过添加`iframe-extends=true``iframe-tab=true` 两个属性
```html
<a iframe-extends=true iframe-tab=true href="https://github.com/mosiboom/dcat-iframe-tab">添加新的标签页</a>
```
{
"name": "mosiboom/dcat-iframe-tab",
"description": "iframe-tab framework for dcat-admin",
"type": "laravel-extension",
"authors": [
{
"name": "Jasper",
"email": "936022546@qq.com"
}
],
"extra": {
"laravel": {
"providers": [
"Mosiboom\\DcatIframeTab\\IframeTabProvider"
],
"aliases": {
"IframeTab": "Mosiboom\\DcatIframeTab\\IframeTab"
},
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"Mosiboom\\DcatIframeTab\\": "src/"
},
"files": [
"src/helpers.php"
]
},
"require": {
"php": ">=7.2.5"
},
"license": "MIT"
}
<?php
namespace Mosiboom\DcatIframeTab\Controllers;
use Dcat\Admin\Layout\Content;
use Illuminate\Routing\Controller;
class IframeController extends Controller
{
public function index()
{
$content = new Content();
return $content->view('iframe-tab::content');
}
}
<?php
namespace Mosiboom\DcatIframeTab;
use Dcat\Admin\Admin;
use Dcat\Admin\Grid;
use Dcat\Admin\Layout\Content;
use Illuminate\Support\ServiceProvider;
class IframeTabProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
//注册 Dcat的容器事件
if (config('iframe_tab.enable')) {
$this->app->resolving(Content::class, function ($content, $app) {
//设置view 为 iframe.full-content
$content->view('iframe-tab::full-content');
if(strpos(request()->getUri(),'auth/login') !== false){
#退出登录不记录当前页面
session()->forget('url.intended');
Admin::script(<<<JS
if (window != top)
top.location.href = location.href;
JS
);
}
});
Content::resolving(function (Content $content) {
//设置view 为 iframe.full-content
$content->view('iframe-tab::full-content');
if(strpos(request()->getUri(),'auth/login') !== false){
Admin::script(<<<JS
if (window != top)
top.location.href = location.href;
JS
);
}
});
Grid::resolving(function (Grid $grid) {
$grid->setDialogFormDimensions(config('iframe_tab.dialog_area_width'), config('iframe_tab.dialog_area_height'));
});
}
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
$this->loadViewsFrom(__DIR__ . '/resource/views', 'iframe-tab');
$this->loadRoutesFrom(__DIR__ . '/routes.php');
$this->publishes([
__DIR__ . '/assets/js/compress' => public_path('vendor/iframe-tab/js'),
__DIR__ . '/assets/css' => public_path('vendor/iframe-tab/css'),
], 'iframe-tab');
$this->publishes([
__DIR__ . '/resource/views' => resource_path('views/vendor/iframe-tab'),
], 'iframe-tab.view');
$this->publishes([
__DIR__ . '/iframe_tab.php' => config_path('iframe_tab.php'),
], 'iframe-tab.config');
}
}
.iframe-tab-container {
position: absolute;
top: 60px;
width: calc(100% - 260px);
max-width: 100%;
height: 40px;
background: #ffffff;
border-top: 1px solid #e2e2e2;
box-sizing: border-box;
min-height: 20px;
z-index: 1;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
}
.iframe-tab-container + .iframe-tab-wrapper {
padding: 100px 0 0 0;
top: 0;
height: calc(100vh - 100px);
min-height: 900px;
}
/*其他布局*/
.iframe-tab-sidebar-separate {
width: calc(100% - 280px - 6rem);
top: 6rem;
}
.iframe-tab-sidebar-separate + .iframe-tab-wrapper {
padding: calc(6rem + 40px) 0 0 0;
}
.header-navbar.navbar-shadow {
box-shadow: none;
}
.header-navbar.navbar-shadow {
box-shadow: none;
}
@media (min-width: 992px) {
.sidebar-mini.sidebar-collapse .iframe-tab-container {
margin-left: 5.4rem !important;
width: calc(100% - 5.4rem);
/*transition: width .3s ease-in-out;*/
}
.sidebar-mini.sidebar-collapse .iframe-tab-sidebar-separate {
margin-left: calc(6rem + 35px) !important;
width: calc(100% - 6rem - 35px - 40px);
/*transition: width .3s ease-in-out;*/
}
}
@media (min-width: 768px) {
body:not(.sidebar-mini-md) .iframe-tab-container {
margin-left: 260px;
transition: margin-left .3s ease-in-out;
}
body:not(.sidebar-mini-md) .iframe-tab-sidebar-separate {
margin-left: calc(280px + 3rem);
transition: margin-left .3s ease-in-out;
}
}
@media (max-width: 991px) {
body:not(.sidebar-mini-md) .iframe-tab-container, body:not(.sidebar-mini-md) .iframe-tab-container:before {
width: 100%;
margin-left: 0;
}
body:not(.sidebar-mini-md) .iframe-tab-sidebar-separate, body:not(.sidebar-mini-md) .iframe-tab-sidebar-separate:before {
width: calc(100% - 80px);
margin-left: 40px;
}
.iframe-tab-sidebar-separate {
margin-left: 20px;
width: calc(100% - 80px);
}
body:not(.sidebar-mini-md) .content-wrapper {
transition: margin-left .3s ease-in-out;
margin-left: 0;
}
}
#iframe-tab-container #iframe-tab .nav-link {
padding: 0 30px;
box-sizing: border-box;
line-height: 40px;
height: 40px;
border-radius: 0;
position: relative;
border-right: 1px solid #efefef;
margin-right: 0;
}
#iframe-tab-container #iframe-tab .nav-link p, #iframe-tab-container #iframe-tab .nav-link span:not(.iframe-tab-close-btn) {
display: inline;
}
.iframe-tab-close-btn {
display: none;
}
/*#iframe-tab-container #iframe-tab .nav-link.active .iframe-tab-close-btn,*/
#iframe-tab-container #iframe-tab .nav-link:hover .iframe-tab-close-btn {
position: absolute;
top: -1px;
right: 7px;
display: block;
z-index: 999;
}
#iframe-tab-container #iframe-tab .nav-link.active .iframe-tab-close-btn i {
color: white;
font-size: 12px;
transition: margin-left .3s ease-in-out;
}
#iframe-tab-container #iframe-tab .nav-link:hover .iframe-tab-close-btn {
color: #414750;
font-weight: lighter;
}
#iframe-tab {
width: 100%;
position: relative;
flex-wrap: nowrap;
}
/*右键菜单*/
.mouse-click-menu {
background-color: rgba(0, 0, 0, 0.8);
-moz-box-shadow: 2px 2px 5px #666;
-webkit-box-shadow: 2px 2px 5px #666;
box-shadow: 2px 2px 5px #666;
position: fixed;
width: 120px;
box-sizing: border-box;
border-radius: 0.5rem;
display: none;
z-index: 99999;
padding: 5px 0;
}
.mouse-click-menu ul {
width: 100%;
display: block;
padding: 5px 0;
}
.mouse-click-menu ul li {
display: block;
width: 100%;
list-style: none;
}
.mouse-click-menu .li_separate {
line-height: 0;
margin: 3px;
border-bottom: 1px solid #727575;
font-size: 0;
}
.mouse-click-menu .menu-item {
width: 100%;
display: block;
height: 25px;
line-height: 24px;
color: white;
font-size: 12px;
text-decoration: none;
text-align: center;
}
.mouse-click-menu .menu-item:hover {
background: white;
color: black;
}
.swiper-button-prev i, .swiper-button-next i {
color: #555555;
font-size: 20px;
}
.swiper-button-prev {
width: 40px;
height: 40px;
background: #efefef;
left: 0;
border: none;
box-shadow: none;
margin-top: 0;
top: 0;
outline: none;
}
.swiper-button-prev:after, .swiper-container-rtl .swiper-button-next:after {
content: '';
}
.swiper-button-next {
width: 40px;
height: 40px;
background: #efefef;
right: 0;
margin-top: 0;
top: 0;
outline: none;
}
.swiper-button-next:after, .swiper-container-rtl .swiper-button-prev:after {
content: '';
}
.swiper-slide {
width: auto !important;
}
.swiper-container {
width: calc(100% - 80px);
height: 40px;
/*background: red;*/
}
#iframe-tab-container.sidebar-dark-white #iframe-tab .nav-link {
border-right: 0;
}
#iframe-tab-container.sidebar-dark-white #iframe-tab .nav-link.active{
background: #1e1e2d;
}
#iframe-tab-container.sidebar-dark-white{
border-top: 1px solid #2c2c42;
}
#iframe-tab-container.sidebar-dark-white .swiper-button-prev,#iframe-tab-container.sidebar-dark-white .swiper-button-next{
background: #0e0e1d;
box-sizing: border-box;
border: 1px solid #2c2c42;
}
#iframe-tab-container.sidebar-dark-white .swiper-button-prev i,#iframe-tab-container.sidebar-dark-white .swiper-button-next i{
color: #efefef;
}
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('\'2B 2C\';$(5(){4 j=2D 2E(\'.14-1Y\',{2F:\'1Z\',2G:0,2H:z,2I:z,2J:z,2K:{2L:\'.14-20-21\',2M:\'.14-20-22\'},2N:z,2O:z,2P:z,2Q:{2R:0.3},2S:z});4 k={1g:$(\'#7-v-1Y\'),G:$(\'#7-v\'),2T:$(\'#7-v .q-t\'),F:$(\'#7-2U\'),2V:$(\'.7-v-J-T\'),U:$(\'.23-L .q-t:2W(.1y-1z .q-t)\'),15:$(\'.23-L-2X .1h\'),24:$(".1i-L .1i-V"),1A:$(".1i-L")};4 l={1j:5 1j(a,b){4 c=1B.M<=2||1B[2]===2Y?z:1B[2];4 d=\'\';4 e=\'N-W=1\';9(c){d=\'<25 2Z="关闭标签页" 17="7-v-J-T"><i 17="26 26-30-31"></i></25>\';e=\'N-W=0\'}r\'\\n <X 17="q-V 14-32" 1C="33">\\n <a \'+e+\' 17="q-t A" B="7-Y-\'+b+\'" N-34="35" u="#7-\'+b+\'" 1C="v" O-36="7-\'+b+\'" O-18="z">\\n \'+a+\'\\n \'+d+\'\\n </a>\\n </X>\\n \'},1k:5 1k(a,b){r\'\\n <27 17="v-28 37 P A" B="7-\'+b+\'" 1C="38" O-39="7-Y-\'+b+\'">\\n <7\\n 3a="3b: 3c;29: 1l%;2a: 1l%;2b: 0;2c: 0;3d: 0;3e: 0;"\\n H="\'+a+\'" 29="1l%" 2a="1l%" 3f="2d" 3g="0" 3h="0"\\n 3i="0"\\n 2e-x="2d" 2e-y="1Z" 3j="3k"></7>\\n </27>\\n \'}};4 m={Z:$(\'#3l\').1m()+\'3m\',E:\'\',1n:2f($(\'#3n\').1m()),1o:2f($(\'#3o\').1m()),Q:5 Q(){4 a=19.1p(6.Z);r 1a.2g(a)===3p?{}:1a.2g(a)},1D:5 1D(a,b){4 c=6.Q();c[a]=b;4 d=1a.1E(c);19.1q(6.Z,d);r c},1F:5 1F(a){4 b=6.Q();9(b[a]){3q b[a];19.1q(6.Z,1a.1E(b))}r b},1r:5 1r(){19.3r(6.Z)},1G:5 1G(){k.U.1H(\'s\');k.24.1H(\'s\');$(\'.1y-1z\').p(\'a\').1H(\'s\');4 b=k.15.p(\'X\');b.p(\'a\').s(5(e){4 a=$(6).o(\'u\');9(!a||a===\'#\'){r}e.2h();b.p(\'.q-t\').10(\'A\');$(6).C(\'A\')});k.1A.p(\'.1i-V\').s(5(e){4 a=$(6).o(\'u\');9(!a||a===\'#\'){r}e.2h()})},1I:5 1I(){4 a=k.15.p(\'X\');a.p(\'a\').s(m.1s);k.1A.p(\'a\').s(m.1s);$(\'.1y-1z\').p(\'a\').s(5(){2i.u=$(6).o(\'u\')})},1s:5 1s(){4 a=$(6).1t(),u=$(6).o(\'u\'),B=m.1b(u);9(!u||u===\'#\'){r}9(u.3s("3t")!==-1){2i.u=u;r}4 b=l.1j(a,B),R=l.1k(u,B),2j=m.1u();m.11();m.S(2j);9(k.G.p(\'#7-Y-\'+B).M<=0){j.1J(b);k.F.12(R);4 c=$(\'#7-Y-\'+B),2k=c.I(\'.q-V\').2l(),1K=$(\'#7-\'+B);j.2m(2k);j.1L();c.C(\'A\');c.o(\'O-18\',\'z\');1K.C(\'A\');1K.C(\'P\');m.S(c)}2n{k.G.p(\'#7-Y-\'+B).s()}},1v:5 1v(){4 a=$(k.U[0]).1t();4 b=$(k.U[0]).o(\'u\');4 c=6.1b(b);j.1J(l.1j(a,c,1c));k.F.12(l.1k(b,c));j.1L()},11:5 11(){k.G.p(\'.q-t\').10(\'A\');k.G.p(\'.q-t\').o(\'O-18\',\'1c\');k.F.p(\'.v-28\').10(\'A\',\'P\')},1w:5 1w(a){a.p(\'.q-t\').s();m.11();a.p(\'.q-t\').C(\'A\');a.p(\'.q-t\').o(\'O-18\',\'z\');4 b=a.p(\'.q-t\').o(\'u\');k.F.p(b).C(\'A\');k.F.p(b).C(\'P\')},1M:5 1M(){$(w).D(\'s\',\'.7-v-J-T\',5(e){4 a=$(6).I(".q-t").o(\'N-W\');9(a===\'1\'){r}4 b=$(6).I(".q-V");9($(6).I(".q-t").2o(\'A\')){4 c=b.21();4 d=b.22();9(c.M>0){m.1w(c)}2n{m.1w(d)}}4 f=$($(6).I(".q-t").o(\'u\'));b.1N();f.1N();9(m.1n===1){m.1F($(6).I(".q-t").o(\'B\').2p("-").2q())}e.3u()});$(w).D(\'3v\',\'#7-v .q-t\',5(e){$(6).p(\'.7-v-J-T\').s();r 1c});$(w).D(\'s\',\'#7-v .q-t\',5(){4 a=$(6).o(\'u\');9(m.1o===1&&$(\'\'+a).M<=0){4 b=a.2r(\'#7-\',"");1d.1e(b);1d.1e(m.Q());k.F.12(m.Q()[b].R);m.11()}4 c=$(\'\'+a);m.1x(a);$(6).C(\'A\');$(6).o(\'O-18\',\'z\');c.C(\'A\');c.C(\'P\');4 d=$(6).I(\'.q-V\').2l();j.2m(d);j.1L();m.S($(6))});$(w).D(\'3w.3x.v\',\'#7-v .q-t\',5(a){m.S($(a.3y))});$(w).D(\'3z\',\'#7-v .q-t\',5(a){w.K=5(){r 1c};4 b=a.3A;9(b===3){4 x=a.3B;4 y=a.3C;$(\'.2s-s-L\').P().3D({2b:x,2c:y});m.E=$(6)}})},1O:5 1O(){$(w).D(\'s\',\'.v-2t-t\',5(){9(m.E!==\'\'){4 a=m.E.o("u");4 b=$(a+\' > 7\').o("H");4 c=$(\'<3E>\');$("3F").12(c);c.1m(b).3G();w.3H("2t");c.1N();$(6).3I(\'P\');1P.1Q(\'复制成功\')}w.K=5(){r z}});$(w).D(\'s\',\'.v-1R-t\',5(){9(m.E!==\'\'){4 a=m.E.o("u");4 b=$(a+\' > 7\').o("H");1S.1R(b)}w.K=5(){r z}});$(w).D(\'s\',\'.v-J-3J\',5(){9(m.E!==\'\'){k.G.p(\'.q-t\').1T(5(){4 a=$(6).o(\'N-W\');9(a===\'1\'){r}$(6).p(\'.7-v-J-T\').s()})}w.K=5(){r z}});$(w).D(\'s\',\'.v-J-3K\',5(){9(m.E!==\'\'){k.G.p(\'.q-t\').1T(5(){4 a=$(6).o(\'N-W\');9(a===\'1\'){r}9(m.E.o(\'B\')===$(6).o(\'B\')){m.E.s();r}m.S($(6));$(6).p(\'.7-v-J-T\').s()})}w.K=5(){r z}});$(w).D(\'s\',\'.v-3L-3M\',5(){m.1r();1P.1Q(\'缓存已清空\');k.G.1t(\'\');k.F.1t(\'\');m.1v();k.15.p(\'.q-t.A\').10(\'A\');$(k.U[0]).C(\'A\');w.K=5(){r z}});$(w).D(\'s\',\'.v-3N\',5(){9(m.E!==\'\'){4 a=$(m.E.o("u")+\' > 7\'),H=a.o(\'H\');a.o(\'H\',\'\');a.o(\'H\',H);1P.1Q(\'页面已刷新\')}w.K=5(){r z}});$(w).D(\'s\',5(){w.K=5(){r z};$(\'.2s-s-L\').2u()})},1U:5 1U(){9(6.1n===0){6.1r();r}4 a=6.Q();1d.1e(a);9(a.M===0||1a.1E(a)==="{}"){r}m.11();2v(4 i 2w a){j.1J(a[i].2x)}9(m.1o===0){2v(4 b 2w a){k.F.12(a[b].R)}}4 c=m.1u();4 d=1c;9(c.M<=0){d=z;4 e=$(k.U[0]).o(\'u\');4 f=6.1b(e);$(\'#7-Y-\'+f).s()}4 g=c.o(\'u\');9(m.1o===1&&!d){4 h=g.2r(\'#7-\',"");1d.1e(h);1d.1e(a[h].R);k.F.12(a[h].R)}m.1x(g)},S:5 S(a){9(6.1n!==1){r}9(a.o(\'N-W\')!==\'1\'){4 b=a.o(\'B\').2p("-").2q();4 c=a.I(\'X\').2y(\'2z\');4 d=$(\'#7-\'+b).2y(\'2z\');6.1D(b,{B:b,2x:c,R:d})}},1u:5 1u(){r k.G.p(\'.q-t.A\')},1x:5 1x(c){4 d=$(c+\' > 7\').o(\'H\');4 e=k.15.p(\'X\');e.p(\'a\').1T(5(){4 a=$(6).o(\'u\');9(!a||a===\'#\'){r}9(a===d){e.p(\'.q-t\').10(\'A\');$(6).C(\'A\');4 b=$(6).I(\'.3O-3P\');9(b.M>0&&!b.2o(\'L-1R\')){b.p("a[u=\'#\']").s()}}})},1V:5 1V(){6.1G();6.1v();6.1I();6.1U();6.1M();6.1O();6.1W()},1W:5 1W(){4 a=1S.3Q.19||{1q:5 1q(){},1p:5 1p(){}},2A=\'3R-3S-3T-1f\',1f=a.1p(2A);9(1f===\'13\'){k.1g.C(\'1h-13-1X\')}$(w).D(\'13-1f.3U\',5(){k.1g.C(\'1h-13-1X\')});$(w).D(\'13-1f.2u\',5(){k.1g.10(\'1h-13-1X\')})},1b:5 1b(a){r 3V(a+6.Z).3W(8,16)}};1S.3X={14:j,3Y:k,3Z:l,40:m};m.1V()});',62,249,'||||var|function|this|iframe||if|||||||||||||||attr|find|nav|return|click|link|href|tab|document|||true|active|id|addClass|on|CLICK_TAB|iframe_tabContent|iframe_tab|src|parents|close|oncontextmenu|menu|length|data|aria|show|storageGet|tab_content_html|cacheUpdateTabBar|btn|menu_link|item|first|li|home|TAB_STORAGE_KEY|removeClass|removeTabBarStyle|append|dark|swiper|menu_content||class|selected|localStorage|JSON|generateID|false|console|log|mode|iframe_tab_container|sidebar|dropdown|tabItem|tabContentItem|100|val|USE_CACHE|LAZY_LOAD|getItem|setItem|storageDeleteAll|menuClickCallback|html|findIframeTabActiveElement|joinFirstMenu|closeAdjacentOperate|linkMenuAndIframeTab|navbar|header|drop_menu|arguments|role|storageSet|stringify|storageDelete|clearDefaultMenuEvent|unbind|menuClick|appendSlide|content_element|updateSlides|iframeTabEventRegister|remove|rightClickEventRegister|Dcat|success|open|window|each|cacheInit|init|darkMode|white|container|auto|button|next|prev|main|drop_menu_link|span|fa|div|pane|width|height|left|top|no|scrolling|parseInt|parse|preventDefault|location|choose_element|_index|index|slideTo|else|hasClass|split|pop|replace|mouse|copy|hide|for|in|tab_html|prop|outerHTML|key|use|strict|new|Swiper|slidesPerView|spaceBetween|freeMode|watchSlidesProgress|watchSlidesVisibility|navigation|nextEl|prevEl|observer|observeParents|observeSlideChildren|mousewheel|sensitivity|grabCursor|iframe_tab_link|tabContent|item_close|not|content|undefined|title|minus|circle|slide|presentation|toggle|pill|controls|fade|tabpanel|labelledby|style|position|absolute|right|bottom|frameborder|border|marginwidth|marginheight|allowtransparency|yes|use_id|_6d9e562706a26cd2|iframe_tab_cache|iframe_tab_lazy_load|null|delete|removeItem|indexOf|logout|stopPropagation|dblclick|hidden|bs|target|mousedown|which|clientX|clientY|css|input|body|select|execCommand|tooltip|all|other|clear|cache|refresh|has|treeview|parent|dcat|admin|theme|shown|md5|substr|iframeTabParent|elements|iframeTabTemplate|iframeTab'.split('|'),0,{}))
\ No newline at end of file
$(function(){window.parent.iframeTabParent&&0<$("a[iframe-extends=true]").length&&function(){var a=window.parent.iframeTabParent,f={addTab:function(c){var d=1>=arguments.length||void 0===arguments[1]?"":arguments[1],e=2>=arguments.length||void 0===arguments[2]?"icon-circle":arguments[2],b="";""!==d&&(b+=d+"-");d='&nbsp;<i class="fa fa-fw feather '+e+'"></i><p>'+(b+c.text())+"</p>";e=c.attr("href");b=a.iframeTab.generateID(e);if(0<a.elements.iframe_tab.find("#iframe-home-"+b).length)return a.elements.iframe_tab.find("#iframe-home-"+
b).click(),!1;var g=a.iframeTab.findIframeTabActiveElement();a.swiper.appendSlide(a.iframeTabTemplate.tabItem(d,b));a.elements.iframe_tabContent.append(a.iframeTabTemplate.tabContentItem(e,b));a.swiper.updateSlides();a.iframeTab.removeTabBarStyle();a.iframeTab.cacheUpdateTabBar(g);a.elements.iframe_tab.find("#iframe-home-"+b).click()},init:function(){$(document).on("click","a[iframe-tab=true]",function(c){f.addTab($(this));c.preventDefault()})}};f.init()}()});
\ No newline at end of file
/*
* JavaScript MD5
* https://github.com/blueimp/JavaScript-MD5
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*
* Based on
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/* global define */
;(function ($) {
'use strict'
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safeAdd (x, y) {
var lsw = (x & 0xffff) + (y & 0xffff)
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xffff)
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bitRotateLeft (num, cnt) {
return (num << cnt) | (num >>> (32 - cnt))
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5cmn (q, a, b, x, s, t) {
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)
}
function md5ff (a, b, c, d, x, s, t) {
return md5cmn((b & c) | (~b & d), a, b, x, s, t)
}
function md5gg (a, b, c, d, x, s, t) {
return md5cmn((b & d) | (c & ~d), a, b, x, s, t)
}
function md5hh (a, b, c, d, x, s, t) {
return md5cmn(b ^ c ^ d, a, b, x, s, t)
}
function md5ii (a, b, c, d, x, s, t) {
return md5cmn(c ^ (b | ~d), a, b, x, s, t)
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length.
*/
function binlMD5 (x, len) {
/* append padding */
x[len >> 5] |= 0x80 << (len % 32)
x[((len + 64) >>> 9 << 4) + 14] = len
var i
var olda
var oldb
var oldc
var oldd
var a = 1732584193
var b = -271733879
var c = -1732584194
var d = 271733878
for (i = 0; i < x.length; i += 16) {
olda = a
oldb = b
oldc = c
oldd = d
a = md5ff(a, b, c, d, x[i], 7, -680876936)
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)
c = md5ff(c, d, a, b, x[i + 10], 17, -42063)
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)
b = md5gg(b, c, d, a, x[i], 20, -373897302)
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)
a = md5hh(a, b, c, d, x[i + 5], 4, -378558)
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)
d = md5hh(d, a, b, c, x[i], 11, -358537222)
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)
a = md5ii(a, b, c, d, x[i], 6, -198630844)
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)
a = safeAdd(a, olda)
b = safeAdd(b, oldb)
c = safeAdd(c, oldc)
d = safeAdd(d, oldd)
}
return [a, b, c, d]
}
/*
* Convert an array of little-endian words to a string
*/
function binl2rstr (input) {
var i
var output = ''
var length32 = input.length * 32
for (i = 0; i < length32; i += 8) {
output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff)
}
return output
}
/*
* Convert a raw string to an array of little-endian words
* Characters >255 have their high-byte silently ignored.
*/
function rstr2binl (input) {
var i
var output = []
output[(input.length >> 2) - 1] = undefined
for (i = 0; i < output.length; i += 1) {
output[i] = 0
}
var length8 = input.length * 8
for (i = 0; i < length8; i += 8) {
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32)
}
return output
}
/*
* Calculate the MD5 of a raw string
*/
function rstrMD5 (s) {
return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))
}
/*
* Calculate the HMAC-MD5, of a key and some data (raw strings)
*/
function rstrHMACMD5 (key, data) {
var i
var bkey = rstr2binl(key)
var ipad = []
var opad = []
var hash
ipad[15] = opad[15] = undefined
if (bkey.length > 16) {
bkey = binlMD5(bkey, key.length * 8)
}
for (i = 0; i < 16; i += 1) {
ipad[i] = bkey[i] ^ 0x36363636
opad[i] = bkey[i] ^ 0x5c5c5c5c
}
hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)
return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))
}
/*
* Convert a raw string to a hex string
*/
function rstr2hex (input) {
var hexTab = '0123456789abcdef'
var output = ''
var x
var i
for (i = 0; i < input.length; i += 1) {
x = input.charCodeAt(i)
output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)
}
return output
}
/*
* Encode a string as utf-8
*/
function str2rstrUTF8 (input) {
return unescape(encodeURIComponent(input))
}
/*
* Take string arguments and return either raw or hex encoded strings
*/
function rawMD5 (s) {
return rstrMD5(str2rstrUTF8(s))
}
function hexMD5 (s) {
return rstr2hex(rawMD5(s))
}
function rawHMACMD5 (k, d) {
return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))
}
function hexHMACMD5 (k, d) {
return rstr2hex(rawHMACMD5(k, d))
}
function md5 (string, key, raw) {
if (!key) {
if (!raw) {
return hexMD5(string)
}
return rawMD5(string)
}
if (!raw) {
return hexHMACMD5(key, string)
}
return rawHMACMD5(key, string)
}
if (typeof define === 'function' && define.amd) {
define(function () {
return md5
})
} else if (typeof module === 'object' && module.exports) {
module.exports = md5
} else {
$.md5 = md5
}
})(this)
This diff could not be displayed because it is too large.
$(function () {
if (window.parent.iframeTabParent && $("a[iframe-extends=true]").length > 0) {
const iframeTabParent = window.parent.iframeTabParent
/*其他扩展处理*/
const iframeTabExtends = {
/**
* 添加标签
* @param element a标签元素
* @param page_title 页面标题
* @param icon 默认是圆形
*/
addTab(element, page_title = '', icon = 'icon-circle') {
let title = ''
if (page_title !== '') {
title += page_title + '-'
}
let page_html = `&nbsp;<i class="fa fa-fw feather ${icon}"></i><p>${title + element.text()}</p>`;
let url = element.attr('href')
let id = iframeTabParent.iframeTab.generateID(url);
if (iframeTabParent.elements.iframe_tab.find(`#iframe-home-${id}`).length > 0) {
iframeTabParent.elements.iframe_tab.find(`#iframe-home-${id}`).click()
return false
}
let choose_element = iframeTabParent.iframeTab.findIframeTabActiveElement()
iframeTabParent.swiper.appendSlide(iframeTabParent.iframeTabTemplate.tabItem(page_html, id))
iframeTabParent.elements.iframe_tabContent.append(iframeTabParent.iframeTabTemplate.tabContentItem(url, id))
iframeTabParent.swiper.updateSlides();
/*移除tab bar 选中样式*/
iframeTabParent.iframeTab.removeTabBarStyle()
/*更新选中缓存中的tab bar*/
iframeTabParent.iframeTab.cacheUpdateTabBar(choose_element)
//触发点击
iframeTabParent.elements.iframe_tab.find(`#iframe-home-${id}`).click()
},
init() {
$(document).on('click', 'a[iframe-tab=true]', function (e) {
iframeTabExtends.addTab($(this))
e.preventDefault()
})
}
}
iframeTabExtends.init()
}
})
/*
* JavaScript MD5
* https://github.com/blueimp/JavaScript-MD5
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*
* Based on
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/* global define */
;(function ($) {
'use strict'
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safeAdd (x, y) {
var lsw = (x & 0xffff) + (y & 0xffff)
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xffff)
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bitRotateLeft (num, cnt) {
return (num << cnt) | (num >>> (32 - cnt))
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5cmn (q, a, b, x, s, t) {
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)
}
function md5ff (a, b, c, d, x, s, t) {
return md5cmn((b & c) | (~b & d), a, b, x, s, t)
}
function md5gg (a, b, c, d, x, s, t) {
return md5cmn((b & d) | (c & ~d), a, b, x, s, t)
}
function md5hh (a, b, c, d, x, s, t) {
return md5cmn(b ^ c ^ d, a, b, x, s, t)
}
function md5ii (a, b, c, d, x, s, t) {
return md5cmn(c ^ (b | ~d), a, b, x, s, t)
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length.
*/
function binlMD5 (x, len) {
/* append padding */
x[len >> 5] |= 0x80 << (len % 32)
x[((len + 64) >>> 9 << 4) + 14] = len
var i
var olda
var oldb
var oldc
var oldd
var a = 1732584193
var b = -271733879
var c = -1732584194
var d = 271733878
for (i = 0; i < x.length; i += 16) {
olda = a
oldb = b
oldc = c
oldd = d
a = md5ff(a, b, c, d, x[i], 7, -680876936)
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)
c = md5ff(c, d, a, b, x[i + 10], 17, -42063)
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)
b = md5gg(b, c, d, a, x[i], 20, -373897302)
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)
a = md5hh(a, b, c, d, x[i + 5], 4, -378558)
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)
d = md5hh(d, a, b, c, x[i], 11, -358537222)
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)
a = md5ii(a, b, c, d, x[i], 6, -198630844)
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)
a = safeAdd(a, olda)
b = safeAdd(b, oldb)
c = safeAdd(c, oldc)
d = safeAdd(d, oldd)
}
return [a, b, c, d]
}
/*
* Convert an array of little-endian words to a string
*/
function binl2rstr (input) {
var i
var output = ''
var length32 = input.length * 32
for (i = 0; i < length32; i += 8) {
output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff)
}
return output
}
/*
* Convert a raw string to an array of little-endian words
* Characters >255 have their high-byte silently ignored.
*/
function rstr2binl (input) {
var i
var output = []
output[(input.length >> 2) - 1] = undefined
for (i = 0; i < output.length; i += 1) {
output[i] = 0
}
var length8 = input.length * 8
for (i = 0; i < length8; i += 8) {
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32)
}
return output
}
/*
* Calculate the MD5 of a raw string
*/
function rstrMD5 (s) {
return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))
}
/*
* Calculate the HMAC-MD5, of a key and some data (raw strings)
*/
function rstrHMACMD5 (key, data) {
var i
var bkey = rstr2binl(key)
var ipad = []
var opad = []
var hash
ipad[15] = opad[15] = undefined
if (bkey.length > 16) {
bkey = binlMD5(bkey, key.length * 8)
}
for (i = 0; i < 16; i += 1) {
ipad[i] = bkey[i] ^ 0x36363636
opad[i] = bkey[i] ^ 0x5c5c5c5c
}
hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)
return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))
}
/*
* Convert a raw string to a hex string
*/
function rstr2hex (input) {
var hexTab = '0123456789abcdef'
var output = ''
var x
var i
for (i = 0; i < input.length; i += 1) {
x = input.charCodeAt(i)
output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)
}
return output
}
/*
* Encode a string as utf-8
*/
function str2rstrUTF8 (input) {
return unescape(encodeURIComponent(input))
}
/*
* Take string arguments and return either raw or hex encoded strings
*/
function rawMD5 (s) {
return rstrMD5(str2rstrUTF8(s))
}
function hexMD5 (s) {
return rstr2hex(rawMD5(s))
}
function rawHMACMD5 (k, d) {
return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))
}
function hexHMACMD5 (k, d) {
return rstr2hex(rawHMACMD5(k, d))
}
function md5 (string, key, raw) {
if (!key) {
if (!raw) {
return hexMD5(string)
}
return rawMD5(string)
}
if (!raw) {
return hexHMACMD5(key, string)
}
return rawHMACMD5(key, string)
}
if (typeof define === 'function' && define.amd) {
define(function () {
return md5
})
} else if (typeof module === 'object' && module.exports) {
module.exports = md5
} else {
$.md5 = md5
}
})(this)
This diff could not be displayed because it is too large.
<?php
if (!function_exists('mosi_iframeTabBodyClass')){
function mosi_iframeTabBodyClass($body_class){
if (!empty($body_class)) {
if (!is_array($body_class)) {
$body_class = explode(' ', $body_class);
}
$iframe_body_class = array_reduce($body_class, function ($result, $item) {
return $result . ' iframe-tab-' . $item;
});
} else {
$iframe_body_class='';
}
return $iframe_body_class;
}
}
<?php
return [
# 是否开启iframe_tab
'enable' => env('START_IFRAME_TAB', true),
# 底部设置
'footer_setting' => [
'copyright' => env('APP_NAME', ''),
'app_version' => env('APP_VERSION', ''),
# 是否将底部置于菜单下
'use_menu' => false
],
# 是否开启标签页缓存
'cache' => env('IFRAME_TAB_CACHE', false),
# 更改dialog表单默认宽高
'dialog_area_width' => env('IFRAME_TAB_DIALOG_AREA_WIDTH', '50%'),
'dialog_area_height' => env('IFRAME_TAB_DIALOG_AREA_HEIGHT', '90vh'),
# iframe-tab占用的路由 默认 '/'
'router' => '/',
# iframe-tab域名(一般用于多应用后台)
'domain' => null,
# 是否开启懒加载模式
'lazy_load' => true
];
@section('content')
@include('admin::partials.alerts')
@include('admin::partials.exception')
{!! $content !!}
@include('admin::partials.toastr')
@endsection
@section('app')
{!! Dcat\Admin\Admin::asset()->styleToHtml() !!}
<div class="content-body" style="position: relative;width: 100%;height: 100%" id="app">
{{-- 页面埋点--}}
{!! admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_BEFORE']) !!}
<div class="tab-content" id="iframe-tabContent"></div>
{{-- 页面埋点--}}
{!! admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_AFTER']) !!}
</div>
{!! Dcat\Admin\Admin::asset()->scriptToHtml() !!}
{!! Dcat\Admin\Admin::html() !!}
@endsection
@if(! request()->pjax())
@include('iframe-tab::page')
@else
<title>{{ Dcat\Admin\Admin::title() }} @if($header) | {{ $header }}@endif</title>
<script>
try {
Dcat.pjaxResponded();
}catch (e) {
Dcat.wait();
}
</script>
{!! Dcat\Admin\Admin::asset()->cssToHtml() !!}
{!! Dcat\Admin\Admin::asset()->jsToHtml() !!}
@yield('app')
@endif
@section('content')
<section class="content">
@include('admin::partials.alerts')
@include('admin::partials.exception')
{!! $content !!}
@include('admin::partials.toastr')
</section>
@endsection
@section('content-header')
<section class="content-header breadcrumbs-top">
@if($header || $description)
<h1 class=" float-left">
<span class="text-capitalize">{!! $header !!}</span>
<small>{!! $description !!}</small>
</h1>
@elseif($breadcrumb || config('admin.enable_default_breadcrumb'))
<div>&nbsp;</div>
@endif
@include('admin::partials.breadcrumb')
</section>
@endsection
@section('app')
{!! Dcat\Admin\Admin::asset()->styleToHtml() !!}
<div class="content-header">
@yield('content-header')
</div>
<div class="content-body" id="app">
{{-- 页面埋点--}}
{!! admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_BEFORE']) !!}
@yield('content')
{{-- 页面埋点--}}
{!! admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_AFTER']) !!}
</div>
{!! Dcat\Admin\Admin::asset()->scriptToHtml() !!}
{!! Dcat\Admin\Admin::html() !!}
@endsection
@if(!request()->pjax())
@include('iframe-tab::full-page', ['header' => $header])
@else
<title>{{ Dcat\Admin\Admin::title() }} @if($header) | {{ $header }}@endif</title>
<script>
try {
Dcat.pjaxResponded();
}catch (e) {
Dcat.wait();
}
</script>
{!! Dcat\Admin\Admin::asset()->cssToHtml() !!}
{!! Dcat\Admin\Admin::asset()->jsToHtml() !!}
@yield('app')
@endif
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
{{-- 默认使用谷歌浏览器内核--}}
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>@if(! empty($header)){{ $header }} | @endif {{ Dcat\Admin\Admin::title() }}</title>
@if(! config('admin.disable_no_referrer_meta'))
<meta name="referrer" content="no-referrer"/>
@endif
@if(! empty($favicon = Dcat\Admin\Admin::favicon()))
<link rel="shortcut icon" href="{{$favicon}}">
@endif
{!! admin_section(Dcat\Admin\Admin::SECTION['HEAD']) !!}
{!! Dcat\Admin\Admin::asset()->headerJsToHtml() !!}
{!! Dcat\Admin\Admin::asset()->cssToHtml() !!}
<style>
#app section.content > .row {
margin-right: 0;
}
#app .dcat-box {
overflow: revert;
}
</style>
</head>
<body class="dcat-admin-body full-page {{ $configData['body_class'] }}">
<script>
var Dcat = CreateDcat({!! Dcat\Admin\Admin::jsVariables() !!});
var storage = window.parent.localStorage || {
setItem: function () {
}, getItem: function () {
}
},
key = 'dcat-admin-theme-mode',
mode = storage.getItem(key)
Dcat.darkMode.display(mode === 'dark');
window.parent.$(window.parent.document).on('dark-mode.shown', function () {
Dcat.darkMode.display(true);
});
window.parent.$(window.parent.document).on('dark-mode.hide', function () {
Dcat.darkMode.display(false);
});
</script>
{{-- 页面埋点 --}}
{!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_BEFORE']) !!}
<div class="app-content content">
<div class="wrapper" id="{{ $pjaxContainerId }}"
style="min-height:calc(100vh - 45px);box-sizing: border-box;padding: 1.5rem 3rem 3rem 3rem">
@yield('app')
</div>
@if(!isset(config('iframe_tab')['footer_setting']['use_menu'])||!config('iframe_tab')['footer_setting']['use_menu'])
<footer style="margin-left: 0" class="main-footer pt-1">
<p class="clearfix blue-grey lighten-2 mb-0 text-center">
<span class="text-center d-block d-md-inline-block mt-25">
Powered by
@if(isset(config('iframe_tab')['footer_setting'])&&config('iframe_tab')['footer_setting']['copyright']!='')
<a target=""
href="javascript:void 0">{{ config('iframe_tab')['footer_setting']['copyright'] }}</a>
@else
<a target="_blank" href="https://github.com/jqhph/dcat-admin">Dcat Admin</a>
@endif
<span>&nbsp;·&nbsp;</span>
@if(isset(config('iframe_tab')['footer_setting'])&&config('iframe_tab')['footer_setting']['app_version']!='')
v{{ config('iframe_tab')['footer_setting']['app_version'] }}
@else
v{{ Dcat\Admin\Admin::VERSION }}
@endif
</span>
<button class="btn btn-primary btn-icon scroll-top pull-right"
style="position: fixed;bottom: 2%; right: 10px;display: none">
<i class="feather icon-arrow-up"></i>
</button>
</p>
</footer>
@endif
</div>
{!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_AFTER']) !!}
{!! Dcat\Admin\Admin::asset()->jsToHtml() !!}
<script>Dcat.boot();</script>
<script src="{{asset('/vendor/iframe-tab/js/extend.js')}}"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
{{-- 默认使用谷歌浏览器内核--}}
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>{{ Dcat\Admin\Admin::title() }} @if(! empty($header)) | {{ $header }}@endif</title>
@if(! config('admin.disable_no_referrer_meta'))
<meta name="referrer" content="no-referrer"/>
@endif
@if(! empty($favicon = Dcat\Admin\Admin::favicon()))
<link rel="shortcut icon" href="{{ $favicon }}">
@endif
{!! admin_section(Dcat\Admin\Admin::SECTION['HEAD']) !!}
{!! Dcat\Admin\Admin::asset()->headerJsToHtml() !!}
{!! Dcat\Admin\Admin::asset()->cssToHtml() !!}
<link rel="stylesheet" href="{{asset('/vendor/iframe-tab/css/swiper.min.css')}}">
<link rel="stylesheet" href="{{asset('/vendor/iframe-tab/css/style.css')}}">
</head>
@extends('iframe-tab::vertical')
<body
class="dcat-admin-body sidebar-mini layout-fixed {{ $configData['body_class']}} {{ $configData['sidebar_class'] }}
{{ $configData['navbar_class'] === 'fixed-top' ? 'navbar-fixed-top' : '' }} ">
<script>
var Dcat = CreateDcat({!! Dcat\Admin\Admin::jsVariables() !!});
</script>
{!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_BEFORE']) !!}
<div class="wrapper">
{{-- {{dump(isset(config('admin.layout')['iframe_tab_cache']))}}--}}
@include('admin::partials.sidebar')
@include('admin::partials.navbar')
<div class="app-content content">
<input type="hidden" id="iframe_tab_cache" value="
@if(isset(config('admin.layout')['iframe_tab_cache']))
{{config('admin.layout')['iframe_tab_cache']}}
@else
{{config('iframe_tab.cache')?1:0}}
@endif
">
<input type="hidden" id="iframe_tab_lazy_load" value="
@if(isset(config('admin.layout')['iframe_tab_lazy_load']))
{{config('admin.layout')['iframe_tab_lazy_load']}}
@else
{{config('iframe_tab.lazy_load')?1:0}}
@endif
">
<input type="hidden" id="use_id" value="{{Admin::user()->id}}">
{{--右键菜单监控--}}
<div class="mouse-click-menu">
<ul>
<li><a href="javascript:;" class="menu-item tab-close-all">关闭所有标签页</a></li>
<li><a href="javascript:;" class="menu-item tab-close-other">关闭其他标签页</a></li>
<li><a href="javascript:;" class="menu-item tab-refresh">刷新当前标签页</a></li>
@if(isset(config('admin.layout')['iframe_tab_cache'])&&config('admin.layout')['iframe_tab_cache']==1)
<li><a href="javascript:;" class="menu-item tab-clear-cache">清空标签页缓存</a></li>
@else
@if(config('iframe_tab.cache'))
<li><a href="javascript:;" class="menu-item tab-clear-cache">清空标签页缓存</a></li>
@endif
@endif
<li class="li_separate"></li>
<li><a href="javascript:;" class="menu-item tab-copy-link">复制标签页链接</a></li>
<li><a href="javascript:;" class="menu-item tab-open-link">新标签页中打开</a></li>
</ul>
</div>
<div
class="iframe-tab-container {{mosi_iframeTabBodyClass(config('admin.layout')['body_class'])}}"
id="iframe-tab-container">
<div class="swiper-container">
<ul class="nav nav-pills mb-3 swiper-wrapper" id="iframe-tab" role="tablist"></ul>
</div>
<div class="swiper-button-prev"><i class="fa fa-angle-double-left"></i></div>
<div class="swiper-button-next"><i class="fa fa-angle-double-right"></i></div>
</div>
<div class="content-wrapper iframe-tab-wrapper" id="{{ $pjaxContainerId }}">
@yield('app')
</div>
</div>
</div>
<div id="footer-template" style="display: none">
<div
style="text-align:center;width: 100%;position: absolute;bottom: 0;height: 45px;line-height: 45px;background: #efefef">
<span class="text-center d-block d-md-inline-block mt-25">
&copy;
@if(isset(config('iframe_tab')['footer_setting'])&&config('iframe_tab')['footer_setting']['copyright']!='')
<a target=""
href="javascript:void 0">{{ config('iframe_tab')['footer_setting']['copyright'] }}</a>
@else
<a target="_blank" href="https://github.com/jqhph/dcat-admin">Dcat Admin</a>
@endif
<span>&nbsp;·&nbsp;</span>
{{date('Y')}}
</span>
</div>
</div>
{!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_AFTER']) !!}
{!! Dcat\Admin\Admin::asset()->jsToHtml() !!}
<script>Dcat.boot();</script>
<script src="{{asset('/vendor/iframe-tab/js/md5.js')}}"></script>
<script src="{{asset('/vendor/iframe-tab/js/swiper.min.js')}}"></script>
<script src="{{asset('/vendor/iframe-tab/js/base.js')}}"></script>
<script src="{{asset('/vendor/iframe-tab/js/extend.js')}}"></script>
@if(isset(config('iframe_tab')['footer_setting']['use_menu'])&&config('iframe_tab')['footer_setting']['use_menu']==true)
<script>
let html = $('#footer-template').html()
$('.main-sidebar').append(html);
</script>
@endif
</body>
</html>
<?php
use Mosiboom\DcatIframeTab\Controllers\IframeController;
if (config('iframe_tab.enable')) {
$attributes = [
'prefix' => config('admin.route.prefix'),
'middleware' => config('admin.route.middleware'),
'domain' => config('iframe_tab.domain', null)
];
app('router')->group($attributes, function ($router) {
$controller = IframeController::class;
$router->get(config('iframe_tab.router','/'), $controller . '@index');
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment