小编use*_*314的帖子

如何解决与根composer.json要求的冲突?

当我想composer require filament/forms:"^2.0"在新的 Laravel 9 安装上使用作曲家安装灯丝/表单时,出现以下错误:

./composer.json has been updated
Running composer update filament/forms --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires filament/forms 2.0 -> satisfiable by filament/forms[v2.0.0].
    - filament/forms v2.0.0 requires laravel/framework ^8.56 -> found laravel/framework[v8.56.0, ..., 8.x-dev] but it conflicts with your root composer.json require (^9.19).


Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Run Code Online (Sandbox Code Playgroud)

laravel composer-php

4
推荐指数
1
解决办法
2万
查看次数

jQuery表单转发器和select2不能一起工作

我正在使用Select2和jQuery表单转发器(https://github.com/DubFriend/jquery.repeater)

我已经在google /上搜索了2天,但似乎无法让它工作.

include jquery/select2.js/jquery.repeater.js

var form = $('#form');
form.find('select').select2();

form.repeater({
    show: function () {
    $(this).show(function(){
        form.find('select').select2('destroy').select2();
    });
    },
    hide: function (remove) {
      $(this).hide(remove);
    }
});
Run Code Online (Sandbox Code Playgroud)

问题是jQuery.repeater克隆了div标签,其中input2已经初始化并且已经更改了DOM,因此jQuery.repeater会复制更改的DOM.我试图在调用重复动作之前销毁select2,但是dindt也可以工作.

forms jquery repeater jquery-select2 jquery.repeater

1
推荐指数
1
解决办法
4311
查看次数