我正在使用 GatsbyJS 和 TypeScript 以及 gatsby-plugin-sass 插件。我正在尝试为组件导入单独的样式,如下例 - 导入“./Card.scss”。
import React from 'react';
import Colors from '../../constants/Colors';
import './Card.scss'
interface CardProps {
children: any,
padding?: number,
marginBottom?: number,
borderRadius?: number,
hover?: boolean,
border?: boolean
}
const Card: React.FunctionComponent<CardProps> = ({ children, padding, marginBottom, borderRadius, hover, border }) => {
const cardStyling = {
backgroundColor: Colors.white,
padding: padding,
marginBottom: marginBottom,
borderRadius: borderRadius,
border: (border ? '1px solid #E8EAED' : '0'),
} as React.CSSProperties;
return(
<div style={cardStyling} className={hover ? 'card-shadow card-hover card-padding' …Run Code Online (Sandbox Code Playgroud) 我正在使用带有ASP.Net Core 2.0和Razor Pages的应用程序。我一直在关注有关如何将文件上传到Azure blob存储的Microsoft文档,但到目前为止还无法正常工作。
我有两个单独的模型类。一种用于文件上传,另一种用于Word。
文件上传类:
public class WordUpload
{
public IFormFile SoundFile { get; set; }
public IFormFile SoundFileSentence { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
其他类:
public class Word
{
public int ID { get; set; }
public string Answer { get; set; }
public string AlternativeAnswer { get; set; }
public string Hint { get; set; }
public int Length { get; set; }
public int Vowels { get; set; }
public string Language { get; set; } …Run Code Online (Sandbox Code Playgroud)