我有一个关于在材料设计中实现谷歌地图自动完成功能的问题:
<md-autocomplete flex="" md-no-cache="ctrl.noCache" md-selected-item="ctrl.selectedItem" md-search-text="ctrl.searchText" md-items="item in ctrl.querySearch(ctrl.searchText)" md-item-text="item.display" md-floating-label="Favorite state">
<span md-highlight-text="ctrl.searchText">{{item.display}}</span>
</md-autocomplete>
角度材质自动完成 https://material.angularjs.org/#/demo/material.components.autocomplete | 谷歌地图自动完成 http://plnkr.co/edit/hgF0az?p=preview
如何在谷歌地图自动完成(角度)中使用材料设计自动完成?
提前致谢。
我找到了这个解决方案:我只覆盖 css 属性:
/*maps autocomplete*/
.pac-item{
font-family:RobotoDraft,Roboto,'Helvetica Neue',sans-serif !important;
font-weight: 300 !important;
color: rgb(33,33,33) !important;
line-height: 40px !important;
/*font-weight: 800;*/
}
.pac-item-query{
font-family:RobotoDraft,Roboto,'Helvetica Neue',sans-serif !important;
font-size: 16px;
}
.pac-item:hover{
background-color: #eeeeee !important;
transition: background .15s linear;
}
.pac-container{
color: rgb(33,33,33) !important;
background-color: #fafafa;
/*font-weight: 800;*/
}
.pac-icon, .pac-icon-marker{
background: none !important;
background-image: none !important;
}