cards有一个 ->width() 选项 . 如何定义高度?
->width()
虽然Nova不提供 ->height() 方法,但当您生成Nova卡时,它会自动创建 resources/js/components/Card.vue (see Nova card documentation)
->height()
resources/js/components/Card.vue
Card.vue文件允许您修改卡元素的Vue模板 . 从Nova uses the Tailwind CSS framework开始,您应该可以在Card.vue中使用Height classes of Tailwind CSS .
截至目前,您只能使用 ->width() 方法从Card的php文件中调整卡的宽度 .
当您将卡宽度设置为 1/2 时,卡中的内容似乎溢出 . 我通过将 h-auto 类添加到 Card.vue 中的 <card> 来解决了这个问题 .
1/2
h-auto
Card.vue
<card>
2 回答
虽然Nova不提供
->height()
方法,但当您生成Nova卡时,它会自动创建resources/js/components/Card.vue
(see Nova card documentation)Card.vue文件允许您修改卡元素的Vue模板 . 从Nova uses the Tailwind CSS framework开始,您应该可以在Card.vue中使用Height classes of Tailwind CSS .
截至目前,您只能使用
->width()
方法从Card的php文件中调整卡的宽度 .当您将卡宽度设置为
1/2
时,卡中的内容似乎溢出 . 我通过将h-auto
类添加到Card.vue
中的<card>
来解决了这个问题 .