加入ViewerJS,目前什么都没有实现
This commit is contained in:
parent
c1f6934a86
commit
797a958490
13
assets/ViewerJsAsset.php
Normal file
13
assets/ViewerJsAsset.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\assets;
|
||||||
|
|
||||||
|
use yii\web\AssetBundle;
|
||||||
|
|
||||||
|
class ViewerJsAsset extends AssetBundle
|
||||||
|
{
|
||||||
|
public $sourcePath = '@npm/viewerjs/dist';
|
||||||
|
public $js = [
|
||||||
|
'viewer.min.js',
|
||||||
|
];
|
||||||
|
}
|
@ -1,7 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "yiisoft/yii2-app-basic",
|
"name": "yiisoft/yii2-app-basic",
|
||||||
"description": "Yii 2 Basic Project Template",
|
"description": "Yii 2 Basic Project Template",
|
||||||
"keywords": ["yii2", "framework", "basic", "project template"],
|
"keywords": [
|
||||||
|
"yii2",
|
||||||
|
"framework",
|
||||||
|
"basic",
|
||||||
|
"project template"
|
||||||
|
],
|
||||||
"homepage": "https://www.yiiframework.com/",
|
"homepage": "https://www.yiiframework.com/",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
@ -26,7 +31,8 @@
|
|||||||
"ext-rar": "*",
|
"ext-rar": "*",
|
||||||
"wapmorgan/unified-archive": "^1.2",
|
"wapmorgan/unified-archive": "^1.2",
|
||||||
"symfony/console": "^6.1",
|
"symfony/console": "^6.1",
|
||||||
"gemorroj/archive7z": "^5.7"
|
"gemorroj/archive7z": "^5.7",
|
||||||
|
"npm-asset/viewerjs": "^1.11"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"yiisoft/yii2-debug": "~2.1.0",
|
"yiisoft/yii2-debug": "~2.1.0",
|
||||||
@ -43,7 +49,7 @@
|
|||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
"yiisoft/yii2-composer" : true
|
"yiisoft/yii2-composer": true
|
||||||
},
|
},
|
||||||
"process-timeout": 1800,
|
"process-timeout": 1800,
|
||||||
"fxp-asset": {
|
"fxp-asset": {
|
||||||
@ -76,6 +82,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"repositories": [
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "composer",
|
||||||
|
"url": "https://asset-packagist.org"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "composer",
|
"type": "composer",
|
||||||
"url": "https://asset-packagist.org"
|
"url": "https://asset-packagist.org"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
/* @var $directory string 当前路径 */
|
/* @var $directory string 当前路径 */
|
||||||
|
|
||||||
|
use app\assets\ViewerJsAsset;
|
||||||
use app\models\NewFolderForm;
|
use app\models\NewFolderForm;
|
||||||
use app\models\RenameForm;
|
use app\models\RenameForm;
|
||||||
use app\models\Share;
|
use app\models\Share;
|
||||||
@ -24,6 +25,7 @@ $this->title = '文件管理';
|
|||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
FontAwesomeAsset::register($this);
|
FontAwesomeAsset::register($this);
|
||||||
JqueryAsset::register($this);
|
JqueryAsset::register($this);
|
||||||
|
ViewerJsAsset::register($this);
|
||||||
$this->registerCssFile('@web/css/home_style.css');
|
$this->registerCssFile('@web/css/home_style.css');
|
||||||
?>
|
?>
|
||||||
<div class="home-directory">
|
<div class="home-directory">
|
||||||
|
Loading…
Reference in New Issue
Block a user