[英]How to install Jquery UI in YII2?
I work on YII project (advanced) and want to use JUI Extension for Yii 2 I've put "yiisoft/yii2-jui": "~2.0.0" line to my composer.json file and run composer install . 我正在YII项目上工作(高级),并且想为Yii 2使用JUI扩展程序。我已经将“ yiisoft / yii2-jui”:“〜2.0.0”行添加到我的composer.json文件中并运行composer install 。 After that I've tried to use widget:
之后,我尝试使用小部件:
<?php
use yii\jui\Sortable;
/* @var $this yii\web\View */
/* @var $searchModel common\models\SearchSomeModel */
/* @var $dataProvider yii\data\ActiveDataProvider */
echo Sortable::widget([
'items' => [
'Item 1',
['content' => 'Item2'],
[
'content' => 'Item3',
'options' => ['tag' => 'li'],
],
],
'options' => ['tag' => 'ul'],
'itemOptions' => ['tag' => 'li'],
'clientOptions' => ['cursor' => 'move'],
]); ?>
But there was an error: 但是有一个错误:
The file or directory to be published does not exist: /path/advanced/vendor/bower/jquery-ui
要发布的文件或目录不存在:/ path / advanced / vendor / bower / jquery-ui
Then I've read a recomendation on github to remove composer.lock and /vendor folder and made composer install again. 然后,我在github上阅读了一份建议书,删除了composer.lock和/ vendor文件夹,并再次安装了composer 。
After that any page of my app gives error: 之后,我的应用程序的任何页面都会出现错误:
The file or directory to be published does not exist: /path/advanced/vendor/bower/jquery/dist
要发布的文件或目录不存在:/ path / advanced / vendor / bower / jquery / dist
What am I doing wrong? 我究竟做错了什么?
It seems you have outdated fxp plugin. 看来您已经过时的fxp插件。
Run: 跑:
composer self-update
composer global require "fxp/composer-asset-plugin:~1.2.0"
cd /path/to/advanced/application
composer update
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.