程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了覆盖 withStyles 中背景的不透明度不起作用大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_675_0@如何解决覆盖 withStyles 中背景的不透明度不起作用? 开发过程中遇到覆盖 withStyles 中背景的不透明度不起作用的问题如何解决?下面主要结合日常开发的经验,给出你关于覆盖 withStyles 中背景的不透明度不起作用的解决方法建议,希望对你解决覆盖 withStyles 中背景的不透明度不起作用有所启发或帮助;

我有一个使用 withStyles 的 StyledDialog,但我不知道如何覆盖 MuiBACkdrop-root,这样它就不会使内容变暗。这个类的正确字段名称是什么?

const StyledDialog = withStyles({
  BACkdrop:{
    root:{
      BACkgroundcolor:'transparent'
    },},paper:{
    padding: 0,BoxShadow:'none',height: 188,wIDth:'35%',Transition:' all 0.8s ease-in-out',borderRadius:14
  }
})(Dialog);

P.S 我知道我可以将其用作 Dialog 道具,例如 BACkdropProps={{style:{BACkground:'transparent'} }} 但我想用 withStyles 写

@H_675_0@解决方法

要覆盖 MuiBACkdrop-root,您应该这样做:

import { getRepository } from "typeorm";
import { Report } from "../models";

export interface IReportPayload {
    incidentDesc: String;
    city: String;
    country: String;
}

export const getReports = async (): Promise<Array<Report>> => {
    const reportRepository = getRepository(Report);
    return reportRepository.find();
};

大佬总结

以上是大佬教程为你收集整理的覆盖 withStyles 中背景的不透明度不起作用全部内容,希望文章能够帮你解决覆盖 withStyles 中背景的不透明度不起作用所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。