我正在尝试在代码中添加一个单选按钮。 但是由于某种原因,这些样式无法正常工作,我没有创建任何类都不能覆盖单选按钮样式。 填充元素未居中且没有棱角材质样式。
以前,我已将其添加到我的app.module中,并导入到组件中。 我正在使用@ angular / material:“ 6.3.0
{
"name": "petpo-fe-admin-dashboard",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "webdriver-manager update --versions.chrome=2.37 && ng e2e --webdriver-update=false",
"docs": "typedoc --options typedoc.json --exclude '**/*+(e2e|spec|index|mock).ts' ./src/"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/cdk": "^6.3.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/material": "^6.3.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
"@fortawesome/angular-fontawesome": "0.1.0-10",
"@fortawesome/fontawesome-svg-core": "^1.2.0-11",
"@fortawesome/free-solid-svg-icons": "^5.1.0-11",
"@ng-bootstrap/ng-bootstrap": "^2.0.0",
"bootstrap": "^4.1.1",
"core-js": "^2.5.4",
"crypto-js": "^3.1.9-1",
"jwt-decode": "^2.2.0",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.1",
"@angular/cli": "~6.0.1",
"@angular/compiler-cli": "^6.0.0",
"@angular/language-service": "^6.0.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "5.1.2",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typedoc": "^0.11.1",
"typescript": "~2.7.2"
}
}
<mat-radio-group aria-label="Select an option">
<mat-radio-button value="1">Option 1</mat-radio-button>
<mat-radio-button value="2">Option 2</mat-radio-button>
</mat-radio-group>
答案 0 :(得分:0)
很显然,这与sumproduct
组件的内部元素存在CSS冲突。检查内部元素以查看不希望有的边距或填充的来源。
答案 1 :(得分:0)
问题解决了。没有导入任何实质性主题,因此就是问题所在。谢谢大家。