【问题标题】:Vaadin Java: Import problem with css fileVaadin Java:css文件的导入问题
【发布时间】:2021-03-04 14:43:41
【问题描述】:

我正在编写 Vaadin 教程系列第 8 部分

视频:https://www.youtube.com/watch?v=ttuBu8dYNn0

文字版:https://vaadin.com/learn/tutorials/modern-web-apps-with-spring-boot-and-vaadin/creating-custom-reusable-components-in-vaadin?medium=social

因此,我正在努力导入给定的 css 文件的最后一步。我所做的与所示教程中的完全相同,但表单样式没有改变。似乎 css 文件不起作用。

Vaadin 版本 14.4.2

我的项目文件夹包括。主视图:

CSS 文件:

/* List view */
.list-view .content {
    display: flex;
}

.list-view .contact-grid {
    flex: 2;
}

.list-view .contact-form {
    flex: 1;
    padding: var(--lumo-space-m);
}

@media all and (max-width: 1100px) {
    .list-view.editing .toolbar,
    .list-view.editing .contact-grid {
        display: none;
   }
}

我的网络应用程序

应该是这样的:

【问题讨论】:

  • @BasilBourque 请检查已编辑的问题。版本似乎没有明确定义。

标签: java css vaadin vaadin-flow vaadin10


【解决方案1】:

在我添加以下与其他问题有关的依赖项后解决:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-validation</artifactId>
</dependency>

【讨论】:

    猜你喜欢
    • 2016-02-13
    • 1970-01-01
    • 2013-05-21
    • 2020-09-01
    • 1970-01-01
    • 2019-05-22
    • 2017-03-03
    • 1970-01-01
    相关资源
    最近更新 更多