Download the PHP package woodynew/z-dcat-iframe-tab without Composer

On this page you can find all versions of the php package woodynew/z-dcat-iframe-tab. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package z-dcat-iframe-tab

dcat-iframe-tab

介绍

这个扩展包基于laravel框架和dcat-admin框架,为解决dcat-admin没有自带兼容iframe架构。使用此扩展包可以构建出一个iframe架构并带有标签页管理的后台框架。

功能

支持简中、繁中、英文文案,并在语言变化时清除旧语言标签缓存。开发和接入说明见多语言开发指南;升级后需要重新发布静态资源(见下方发布命令)。

  1. 双击关闭标签页
  2. 当标签页过多时,可通过鼠标滚轮选择或者按住鼠标拖动
  3. 支持右键操作(目前支持的操作有:关闭所有标签、关闭其他标签、刷新当前标签、复制标签页链接)

安装

运行以下命令:

然后运行:

php artisan vendor:publish --tag=iframe-tab 会将css和js发布public/vendor/iframe-tab

更新

相关更新内容请关注github的tag,里面有每个版本详细的更新:https://github.com/woodynew/z-dcat-iframe-tab/releases

基本迭代更新命令:

其他文件覆盖更新:

上述命令会把 css、js 覆盖到 public/vendor/iframe-tab;带 --force 时配置文件也会被覆盖,配置文件可按需选择是否强制覆盖。

配置

多语言

扩展内置 zh_CN、zh_TW、en 语言包,右键菜单、关闭按钮和操作提示跟随 Laravel 当前语言。无需安装 Kit 也能通过 app()->setLocale() 使用;如需界面语言选择器,可启用 Dcat Admin Kit 的 features.locale_switcher。

翻译键使用 iframe-tab::iframe.*。应用可在 Laravel 语言目录的 vendor/iframe-tab/<语言>/iframe.php 中覆盖文案。

更新后执行 php artisan vendor:publish --tag=iframe-tab --force 发布 JS。如果应用覆盖过 resources/views/vendor/iframe-tab/vertical.blade.php,还需要手工合并新视图的翻译调用和 iframe-tab-i18n JSON 数据块。

缓存包含标签的 HTML。首次升级或当前语言变化时会清除旧标签缓存并重新打开首页,防止恢复旧语言标题;同语言刷新保留原有缓存行为。切换语言前请先保存编辑内容。Kit 的选择器会刷新同源顶层页面;使用自己的切换器时也需要刷新顶层框架。业务菜单及页面标题的翻译由应用负责。

联动回归测试

测试使用相邻 dcat-admin-kit 仓库的 Composer 和 Playwright 开发依赖(先在 Kit 中完成 composer install、npm ci)。不需要启动 Demo 或连接业务数据库:

默认使用本机 Chrome;CI 可设置 CI=1 使用已安装的 Playwright Chromium。Kit 位于其他位置时设置 KIT_PATH。测试覆盖 Session、CSRF、三种语言、主页面与 iframe 内切换、同语言缓存恢复及旧语言缓存失效。

src/assets/js/compress/base.js 是实际发布文件,与 src/assets/js/base.js 保持同步;本次使用相同源码,避免依赖额外的压缩工具。

配置项

配置文件在 config/iframe_tab.php下dcat-Iframe-tab可提供的配置并不多,根据自己的需要去配置:

首页不要指向外壳路由

开启后,扩展会占用 GET {admin前缀}{router}(默认就是 /admin)作为外壳:侧边栏、标签栏和一块空的 iframe。页面加载时,脚本把侧边栏第一条菜单的地址放进这个 iframe。

dcat-admin 安装时的 Dashboard 菜单 uri 是 /,渲染出来仍是 /admin。第一条菜单因此又打开了外壳自己,后台会一层层嵌套。

新项目按下面接:

  1. 真正的首页另给一条路由,例如 /admin/home。router(默认 /)留给外壳。
  2. 把第一条菜单的 uri 从 / 改成 home。这条会被自动打开,不能指向外壳。
  3. 其它菜单也不要指向 router。业务页用自己的路径。

登录后打开 /admin 看到的是外壳,标签里加载的是 /admin/home。

新增扩展接口和扩展功能

  1. 用户可以在子页面引入 public/vendor/iframe-tab/js/extend.js文件,或者通过调用window.iframeTabParent全局对象来调用父级页面的iframe-tab
  2. 引入新功能:超链接监听打开新页面加入iframe-tab:用户可自行定义超链接按钮,以此来打开新标签页页面,通过添加iframe-extends=true 和 iframe-tab=true 两个属性

All versions of z-dcat-iframe-tab with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package woodynew/z-dcat-iframe-tab contains the following files

Loading the files please wait ...