小编Y.F*_*kov的帖子

如何使用 Vuetify 创建连续的 v-slide-group?

有没有人设法用 Vuetify 创建一个连续的 v-slide-group?我已经使用自定义箭头和所有内容创建了这个 v-slide-group,但现在我必须让它连续 - 当到达最后一个项目时(通过单击绿色箭头或滑动)它必须重新开始。我已经看到这个功能是在 v-carousel 组件中实现的(以及循环道具),但是有没有办法用 v-slide-group 实现它?

在此处输入图片说明

vue.js vuetify.js

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

Laravel 迁移不兼容的外键

我被告知要删除我们其中一个表的自动递增功能,但这开始导致问题:

PDOException::(“SQLSTATE[HY000]:一般错误:3780 引用列“limitCardId”和外键约束“rolling_control_cards_limitcardid_foreign”中引用的列“id”不兼容。”)

以下是有问题的键:

PK$table->integer('id');

氟肯$table->integer('limitCardId')->unsigned()->index();

关系$table->foreign('limitCardId')->references('id')->on('limit_cards');

我读过其他几篇文章,提出了几种解决方案,但是没有一个解决我的问题,这里列出了我已经尝试过的内容:

在我的基表模型中定义它:

    protected $primaryKey = 'id';
    public $incrementing = false;
Run Code Online (Sandbox Code Playgroud)

Schema::disableForeignKeyConstraints();在方法的开头添加 up()Schema::enableForeignKeyConstraints();最后,我运行了composer dump-autoload, php artisan config:clear, php artisan cache:clear

正如建议的,这是两个表的精简版本,基表:

 public function up()
    {
        Schema::create('limit_cards', function (Blueprint $table) {
            $table->integer('id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('limit_cards');
    }
Run Code Online (Sandbox Code Playgroud)

相关表:

    public function up()
    {
        Schema::create('rolling_control_cards', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('limitCardId')->unsigned()->index();
            $table->unique(['controlCardNumber', …
Run Code Online (Sandbox Code Playgroud)

mysql laravel eloquent

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

标签 统计

eloquent ×1

laravel ×1

mysql ×1

vue.js ×1

vuetify.js ×1