夜光序言:
叶子是不会飞翔的翅膀,翅膀是落在天上的叶子。
正文:
以道御术 / 以术识道
{
"pages": [
"pages/index/index",
"pages/category/category",
"pages/goods_list/goods_list",
"pages/goos_list/goos_list",
"pages/cart/cart",
"pages/collect/collect",
"pages/order/order",
"pages/search/search",
"pages/user/user",
"pages/feedback/feedback",
"pages/login/login",
"pages/auth/auth",
"pages/pay/pay"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#e5e5e5",
"navigationBarTitleText": "优购",
"navigationBarTextStyle": "black"
},
"style": "v2",
"sitemapLocation": "sitemap.json",
"tabBar": {
"color": "#999",
"selectedColor": "#ff2d4a",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "icons/b.png",
"selectedIconPath": "icons/b1.png"
},
{
"pagePath": "pages/category/category",
"text": "分类",
"iconPath": "icons/c.png",
"selectedIconPath": "icons/c1.png"
},
{
"pagePath": "pages/cart/cart",
"text": "购物车",
"iconPath": "icons/d.png",
"selectedIconPath": "icons/d2.png"
},
{
"pagePath": "pages/user/user",
"text": "我的",
"iconPath": "icons/a.png",
"selectedIconPath": "icons/a1.png"
}
]
}
}
需要加一个分号,否则下面会报红
/**app.wxss**/
/* 夜光:这里我们需要导入之前引入的样式文件 */
/* @import "./styles/iconfont.wxss"; */
@import "./styles/iconfont.wxss"
page,view,text,swiper,swiper-item,image,navigator{
padding: 0;
margin: 0;
box-seizing:border-box;
}
page{
--themeColor:#eb4450;
}
view{
/* 使用主题颜色 */
color: var(--themeColor);
}
第二步:声名引用,哪个页面需要用到这个组件~
.search_input {
height:90rpx;
padding:10rpx;
background-color:#e5e5e5;
}
navigator{
height:100%;
display:flex;
justify-content:center;
align-items:center;
background-color:aliceblue;
border-radius: 15rpx;
color: #666;
}
<!--components/SearchInput/SearchInput.wxml-->
<view class="search_input">
<navigator url="/pages/search/search">
搜索
</navigator>
</view>
有一些合法的域名嗯