laravel-admin-extensions / wangEditor

wangEditor extension for laravel-admin
MIT License
61 stars 25 forks source link

wangEditor和hasMany有冲突 #4

Open Fykex opened 6 years ago

Fykex commented 6 years ago
protected function form()
    {
        $form = new Form(new Product);
        $form->text('title', '商品名称');
        $form->decimal('price', '商品价格');
        $form->image('image', '商品图');
        $form->switch('on_sale', '是否上架')->default(1);
        $form->switch('required_sale', '促销产品')->default(0);
        $form->hasMany('skus', function (Form\NestedForm $form) {
            $form->text('title', 'SKU名称');
            $form->decimal('price', 'sku价格');
            $form->text('description', 'sku描述');
            $form->number('amount', '次数');
        });
        $form->editor('description', '商品描述');
        return $form;
    }

编辑器不能正常显示,而注释掉$form->hasMany()后能正常使用

jingzhongwa commented 5 years ago

遇到同样的问题