本文介绍了如何将具有新样式 css 的类添加到 v-dialog、vuetify?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天.我正在使用 vuetify,在组件中使用以下 v-dialog:

<div><!--指标--><v-dialog class="vdialognew" v-model="mostrarIndicator" persistent><v-内容><v-容器流体填充高度><v-layout align-center justify-center><cube-shadow class="spinnerRotate"></cube-shadow></v-layout></v-容器></v-content></v-对话框><!-------------->

</模板><样式范围>.vdialognew {box-shadow:无!重要;最大宽度:610px!重要;}</风格>

正如您将在 v-dialog 中看到的,我添加了 vdialognew 类来应用这些新样式,但是当通过检查浏览器控制台加载内容时,我发现 vdialognew 类仅适用于它.同样,如果我在 v-dialog 标签中使用 style 属性,它对我不起作用.我怎样才能做出这样的改变?

我正在做这个修改以消除在绿色方块后面看到的框:

在此先非常感谢您.祝福

解决方案

传递class";到 v 对话框不起作用.

使用content-class";反而.你的情况

应该可以.

查看 v-dialog 文档

Good day. I am working with vuetify, using the following v-dialog in a component:

<template>
  <div>
    <!--Indicador-->
      <v-dialog class="vdialognew" v-model="mostrarIndicator" persistent>
        <v-content>
          <v-container fluid fill-height>
            <v-layout align-center justify-center>
                <cube-shadow class="spinnerRotate"></cube-shadow>
            </v-layout>
          </v-container>
        </v-content>
      </v-dialog>
    <!-------------->
  </div>
</template>
<style scoped>
.vdialognew {
  box-shadow: none !important;
  max-width: 610px !important;
}
</style>

As you will see in v-dialog I have added the vdialognew class, to apply those new styles, but when loading the content by checking in the browser console, I see that the vdialognew class does not apply to it, only. Similarly, if I use the style property inside the v-dialog tag, it does not work for me. How can I make such a change?

I am doing this modification to eliminate the box that is seen behind the green square:

Thank you very much in advance. Blessings

解决方案

Passing "class" to the v-dialog won't work.

Use "content-class" instead. In your case

<v-dialog content-class="vdialognew" v-model="mostrarIndicator" persistent>

should work.

Have a look at the v-dialog docs

这篇关于如何将具有新样式 css 的类添加到 v-dialog、vuetify?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 21:47