当前位置:网站首页>Harmony food menu interface
Harmony food menu interface
2022-06-25 07:24:00 【respectable-face】
Run the renderings
Code segment
data In the code cookbook-hotcat.json
[
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " Home Dishes "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " soup "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " Sichuan cuisine "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " Cantonese cuisine "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " breakfast "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " Hot pot "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " vegetable dish "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " porridge "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " Cold Dishes "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " bake "
},
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"title": " drink "
}
]
data In the code cookbook-list.json
{
"ret": true,
"data": [
{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
},{
"img": "https://i.postimg.cc/pLZ0kNL8/pic-01.jpg",
"all_click": "3334.9\u4e07",
"favorites": "20.4\u4e07"
}
]
}
news in hotcake Code hml
<div class="cb-hc-container">
<div class="cb=hc-title">
<text>
Hot categories
</text>
</div>
<div class="cb-hc-list">
<div class="cb-hc-item" for="{
{list}}">
<image src="{
{$item.img}}"></image>
<text>{
{$item.title}}</text>
</div>
</div>
</div>
news in hotcake Code js
// @ts-nocheck
import list from '../../../common/data/cookbook-hotcat.json'
export default{
data:{
list:[]
},
onReady(){
this.list=list
}
}
news in hotcake Code css
.cb-hc-container {
flex-direction: column;
}
.cb-hc-title {
border-bottom-width: 0.5px;
border-bottom-color: #eee;
height: 44px;
}
text {
font-size: 12px;
padding-left: 10px;
}
.cb-hc-list {
flex-wrap: wrap;
margin-top: 20px;
}
.cb-hc-item {
width: 33.33333%;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
image {
object-fit: cover;
width: 70px;
height: 70px;
border-radius: 8px;
}
text {
font-size: 14px;
line-height: 30px;
}
swiper In the code hml
<div class="cb-swiper-container">
<swiper>
<image for="{
{list.slice(0,5)}}" src="{
{$item.img}}">
</image>
</swiper>
</div>
swiper In the code js
export default{
props:{
list:{
type:Array
}
},
onReady(){
console.log(this.list)
}
}
swiper In the code css
.cb-swiper-container {
height: 240px;
}
swiper {
width: 100%;
}
image {
width: 100%;
height: 100%;
object-fit: fill;
}
top In the code hml
<div class="cb-top-container">
<div class="cb-title-title">
<text>
Fine dishes
</text>
</div>
<div class="cb-top-body">
<div class="cb-top-item" for="{
{list.slice(0,10)}}">
<image src="{
{$item.img}}"></image>
<div class="cb-top-item-info">
<text class="cb-top-item-title">
{
{$item.name}}
</text>
<text class="cb-top-item-subtitle">
{
{$item.all_click}} Browse {
{$item.favorites}} Collection
</text>
</div>
</div>
</div>
</div>
top In the code js
export default{
props:{
list:{
type:Array
}
},
onReady(){
console.log(this.list)
}
}
top In the code css
.cb-top-container {
flex-direction: column;
background-color: #f5f5f5;
}
.cb-title-title {
height: 50px;
padding-top: 5px;
padding-left: 10px;
color: #333;
}
text {
font-size: 12px;
}
.cb-top-body {
flex-wrap: wrap;
padding-left: 10px;
padding-right: 10px;
}
.cb-top-item {
width: 50%;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: white;
padding-bottom: 15px;
margin-bottom: 10px;
height: 160px;
}
image {
width: 100%;
flex: 1;
object-fit: contain;
}
.cb-top-item-info {
height: 50px;
flex-direction: column;
align-items: center;
}
.cb-top-item-title {
font-size: 16px;
}
.cb-top-item-subtitle {
font-size: 12px;
color: #666;
font-weight: 100;
}
news in index.hml Code
<element name='cb-hotcake' src='./hotcake/hotcake'></element>
<element name='cb-swiper' src='./swiper/swiper.hml'></element>
<element name='cb-top' src='./top/top.hml'></element>
<element name='comp' src='../../components/tabbar/tabbar.hml'></element>
<div class="cb-container">
<div class="cb-title">
<text>
Information Center
</text>
</div>
<div class="cb-body">
<list>
<list-item class="cb-body-item">
<!-- <cb-hotcake></cb-hotcake>-->
<cb-swiper list="{
{list}}"></cb-swiper>
<!-- <cb-hotcake></cb-hotcake>-->
</list-item>
</list>
</div>
<div class="cb-body">
<list>
<list-item class="cb-body-item">
<cb-hotcake></cb-hotcake>
<!-- <cb-hotcake></cb-hotcake>-->
</list-item>
</list>
</div>
<div class="cb-body">
<list>
<list-item class="cb-body-item">
<cb-top list="{
{list}}"></cb-top>
</list-item>
</list>
<comp index="1"></comp>
</div>
</div>
news in index.js Code
// @ts-nocheck
import list from '../../common/data/cookbook-list.json'
export default {
data: {
list:[]
// title: ""
},
onInit() {
this.list=list.data;
// this.title = this.$t('strings.world');
}
}
news in index.css Code
.cb-container {
flex-direction: column;
}
.cb-title {
width: 100%;
height: 44px;
justify-content: center;
align-items: center;
background-color: #ee742f;
}
text {
color: white;
font-size: 16px;
font-weight: normal;
}
.cb-body {
flex: 1;
}
.cb-body-item {
flex-direction: column;
}
边栏推荐
- [introduction to UVM== > episode_9] ~ register model, integration of register model, general methods of register model, application scenarios of register model
- 13 `bs_duixiang.tag标签`得到一个tag对象
- 【批处理DOS-CMD命令-汇总和小结】-外部命令-cmd下载命令、抓包命令(wget)
- Make fertilizer Safi from crop residues locally to increase yield by 30% and improve soil
- 太上老君的炼丹炉之分布式 Quorum NWR
- The e-book "action guide for large organizations to further promote zero code application platform" was officially released!
- Pratique de gestion hiérarchique basée sur kubesphere
- lotus windowPoSt 手动触发时空证明计算
- lotus v1.16.0-rc2 Calibration-net
- 单片机IO详解(上拉 下拉 准双向 输入 输出 推挽 开漏)
猜你喜欢
ES 终于可以搜到”悟空哥“了!
基於 KubeSphere 的分級管理實踐
1W words | 40 pictures | hard core es actual combat
[Shangshui Shuo series] day 5
【pytest】修改allure报告中的logo及参数化
正版photoshop2022购买体验经历分享
Don't you know the evolution process and principle of such a comprehensive redis cluster model?
正版photoshop2022購買體驗經曆分享
【工具分享】一款颜值与技能并重的软件
How is the network connected?
随机推荐
48 张图 | 手摸手教你微服务的性能监控、压测和调优
Chang Wei (variables and constants) is easy to understand
想买股票去哪个证券公司开户更快更安全
Debug through yalc before releasing NPM package
lotus v1.16.0-rc3 calibnet
ES 终于可以搜到”悟空哥“了!
Why use NoSQL with MySQL?
Blue Bridge Cup SCM module code (external interrupt) (code + comment)
How to store the directory / hierarchy / tree structure in the database- How to store directory / hierarchy / tree structure in the database?
Harmony美食菜单界面
Conditional grouping with $exists inside $cond
keepalived監控進程,自動重啟服務進程
313. Binary sum
Loopholes in the missed scanning system of Lvmeng and its repair scheme
[Shangshui Shuo series] day 4
[Introduction aux uvm== > Episode 9] ~ modèle de registre, intégration du modèle de registre, méthode conventionnelle du modèle de registre, scénario d'application du modèle de registre
Blue Bridge Cup SCM module code (matrix key) (code + comments)
How do I know if mysqlnd is an active driver- How to know if MySQLnd is the active driver?
正版photoshop2022購買體驗經曆分享
全局变量&局部变量