为什么我无法使用p-calendar [PrimeNG]进行适当的样式设计 [英] Why I'm not getting proper styling with p-calendar [PrimeNG]
问题描述
我正在学习Angular.我正在做一个项目.我决定从 primeng
添加一个< p-calendar>
组件.我也安装了软件包.版本是:
I'm learning Angular. I'm working on a project. I decided to add a <p-calendar>
component from primeng
. I installed the packages also. The versions were:
"primeicons": "^2.0.0",
"primeng": "^5.2.7",
我一切都很好.看到这个:
I was getting everything perfectly. See this:
但是现在我只想获得几个月的时间.我想将其更改为月份选择器.经过研究后,我发现 primeng:^ 5.2.7
中仅提供月份选择器.所以我升级到:
But now when I want to get months only. I wanted to change it to month picker. After doing some research I came to know that month only picker is not available in primeng: ^5.2.7
. So i upgraded to:
"primeicons": "^2.0.0",
"primeng": "6.1.6",
,我还将这些属性添加到< p-calendar>
标记中:
and I also added these attributes to <p-calendar>
tag:
view="month" dateFormat="mm/yy"
组件工作正常.但是为什么我会失去所有样式.那些圆圈和悬停效果,等等.
Component is working fine. But Why I lost all the styling. Those circles and hover effects, etc. See this:
老实说,我不太擅长CSS和样式.请帮忙.
Honestly, I'm not very good at css and styling. Please help.
我的 angular.json :
"styles": [
"src/styles.scss",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
]
有什么方法可以编辑或覆盖设计.
Is there any way to edit or overwrite the designs.
推荐答案
https://www.primefaces.org/primeng/#/setup
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeng/resources/themes/omega/theme.scss",
"node_modules/primeicons/primeicons.css"
]
这篇关于为什么我无法使用p-calendar [PrimeNG]进行适当的样式设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!