首页 > 其他分享 >HTML5引入element

HTML5引入element

时间:2024-08-21 11:19:12浏览次数:10  
标签:oldPrice title 598 price jpg element HTML5 saleCount 引入

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">

</head>
<body>
<div id="app">
    <el-container>
        <el-header>
            <el-menu style="width: 1200px;margin: 0 auto" mode="horizontal"
                             background-color="#0aa1ed" text-color="#fff"
                             active-text-color="#f00" @select="handleSelect">
                        <el-menu-item index="1">精彩活动</el-menu-item>
                        <el-menu-item index="2">精品女装</el-menu-item>
                        <el-menu-item index="3">品牌男装</el-menu-item>
                        <el-menu-item index="4">母婴产品</el-menu-item>
                        <el-menu-item index="5">数码科技</el-menu-item>

                    </el-menu>
            </el-row>
        </el-header>
        <el-main style="width: 1200px;margin: 0 auto">
            <el-row gutter="20">
                <el-col span="18">
                    <!--走马灯开始-->
                    <el-carousel height="300px">
                        <el-carousel-item>
                            <img src="imgs/b1.jpg" width="100%" height="100%">
                        </el-carousel-item>
                        <el-carousel-item>
                            <img src="imgs/b2.jpg" width="100%" height="100%">
                        </el-carousel-item>
                        <el-carousel-item>
                            <img src="imgs/b3.jpg" width="100%" height="100%">
                        </el-carousel-item>
                    </el-carousel>
                    <!--走马灯结束-->
                </el-col>
                <el-col span="6">
                    <el-card>
                        <h3>
                            <i style="font-weight: bold"
                               class="el-icon-trophy">销量最高</i>
                        </h3>
                        <el-divider></el-divider>
                        <el-table :data="topArr">
                            <!--type="index" 设置当前列的内容为12345678-->
                            <el-table-column type="index" label="排名"></el-table-column>
                            <el-table-column prop="title" label="商品名"></el-table-column>
                            <el-table-column prop="saleCount" label="销量"></el-table-column>
                        </el-table>
                    </el-card>

                </el-col>
            </el-row>
            <!--商品列表开始-->
            <el-row gutter="20">
                <el-col style="margin: 10px 0" span="6" v-for="p in productArr">
                    <el-card>
                        <img :src="p.url" width="100%">
                        <p >{{p.title}}</p>
                        <p style="font-size: 12px">¥{{p.price}} <s>{{p.oldPrice}}</s>
                            <span style="float: right">销量:{{p.saleCount}}件</span>
                        </p>
                    </el-card>
                </el-col>
            </el-row>
            <!--商品列表结束-->
        </el-main>
     
    </el-container>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
    let v = new Vue({
        el: '#app',
        data: function () {
            return {
                topArr:[{title:"小米手机",saleCount:1432},
                    {title:"安踏拖鞋",saleCount:987},
                    {title:"李宁毛巾",saleCount:957}],
                productArr:[{title:"森马牛仔裤女宽松慢跑裤运动风2022春季新款",price:233,oldPrice:598,url:"imgs/a.jpg",saleCount:2342},
                    {title:"茵曼马甲连衣裙两件套春季新款娃娃领色织格长袖背心裙套装",price:233,oldPrice:598,url:"imgs/b.jpg",saleCount:2342},
                    {title:"雪中飞墨绿色短袖t恤女夏2022新款纯棉半袖打底体恤夏季",price:233,oldPrice:598,url:"imgs/c.jpg",saleCount:2342},
                    {title:"【佟丽娅同款】鸭鸭明星同款羽绒服2021年冬季新款时尚",price:233,oldPrice:598,url:"imgs/d.jpg",saleCount:2342},
                    {title:"BEASTER小恶魔鬼脸明星同款夹克毛绒保暖加厚字母印花",price:233,oldPrice:598,url:"imgs/e.jpg",saleCount:2342},
                    {title:"香影毛呢外套女中长款2021年冬季新款气质韩版娃娃领",price:233,oldPrice:598,url:"imgs/f.jpg",saleCount:2342},
                    {title:"SEMIR森马商场同款打底针织毛衣纯色高领新品显瘦",price:233,oldPrice:598,url:"imgs/g.jpg",saleCount:2342},
                    {title:"美特斯邦威女MTEE 贺岁系列中长款风衣736598",price:233,oldPrice:598,url:"imgs/h.jpg",saleCount:2342},
                    {title:"imone2021秋款黑色小西装外套女韩版学生宽松学",price:233,oldPrice:598,url:"imgs/i.jpg",saleCount:2342},
                    {title:"BEASTER 小恶魔明星同款保暖长袖街头潮流连帽卫",price:233,oldPrice:598,url:"imgs/j.jpg",saleCount:2342},
                    {title:"憨厚皇后100%绵羊皮2021秋海宁真皮皮衣女长款修",price:233,oldPrice:598,url:"imgs/k.jpg",saleCount:2342},
                    {title:"美特斯邦威高腰牛仔裤女宽松小脚新款春秋彩色",price:233,oldPrice:598,url:"imgs/a.jpg",saleCount:2342}]
            }
        },
        methods:{
            handleSelect(key,keyPath){
                console.log(key);
            }
        }
    })
</script>
</html>


出自 https://blog.csdn.net/qq_58024411/article/details/132180224

标签:oldPrice,title,598,price,jpg,element,HTML5,saleCount,引入
From: https://www.cnblogs.com/baozhengrui/p/18371210

相关文章

  • Elementui-Plus动态渲染图标icon
    一、在main.ts引入相关依赖:import*asElementPlusIconsVuefrom'@element-plus/icons-vue'for(const[key,component]ofObject.entries(ElementPlusIconsVue)){app.component(key,component)}二、使用component组件进行动态加载<componentclass="icons&qu......
  • HTML5新增和删减
    html5发展HTML5是HTML最新的修订版本,2014年10月由万维网联盟(W3C)完成标准制定。HTML5仍处于完善之中。然而,大部分现代浏览器已经具备了某些HTML5支持h5添加csshack,csszoom知识点特性新的特殊内容元素,比如header、nav、section、article、footer新的表单控件,比如r......
  • Element Plus 应用和router应用
    1.ElementPlus折叠按钮的应用el-menu组件为最初框架el-menu-item子框架按钮键el-sub-menu折叠按钮.el-menu--horizontal>.el-menu-item:nth-child(7){margin-right:auto;}位置样式constactiveIndex=ref('1')使用索引main.js中引用全局ElementPlus引用包......
  • elementUI Steps 步骤条样式修改
    1.修改前的效果2.修改后的效果2.实现代码<template><el-steps:active="active"align-center><templatev-for="iteminarrData"><el-step:key="item.id":title="item.name":class=&......
  • HTML5服装电商网上商城模板源码
    文章目录1.设计来源1.1主界面1.2购物车界面1.3电子产品界面1.4商品详情界面1.5联系我们界面1.6各种标签演示界面2.效果和源码2.1动态效果2.2源代码源码下载万套模板,程序开发,在线开发,在线沟通         【博主推荐】:前些天发现了一个巨牛的人工智能......
  • HTML5+CSS3学习笔记补充——移动端网页+Bootstrap框架
    移动端网页和Bootstrap框架1.视口:用来约束HTML尺寸<!--视口标签是HTML骨架默认生成的设置网页宽度与逻辑分辨率(即设备)宽度一致--><metaname="viewport"content="width=device-width,initial-scale=1.0">2.二倍图:防止设计稿图片在高分辨率屏幕下模糊失真3.......
  • FastJson引入存在DDos攻击安全漏洞案例分析
    FastJson引入存在DDos攻击安全漏洞案例分析背景   某集团公司门户网站接口存在DDos攻击安全漏洞,其他服务端工程中依赖Fastjson进行序列化。Fastjson是阿里巴巴开发的一款高性能的JavaJSON处理库。本身在处理JSON数据时可能存在安全性问题,如JSON注入攻击。DDoS攻击是指攻击者......
  • 基于VSC的MVDC微电网(±10kV)转换器的互连通过等效RL电缆模块实现,此外,在电缆侧引入了
     ......
  • springboot+vue前后端分离项目-项目搭建19-ElementUI图标+聊天室
    一、ElementUI图标按照官网这两步,注册所有图标,然后就能直接使用 1.安装后在vue/package.json里能看到包 2.注册所有图标 3.点击自动复制,直接就能使用 4.效果: ......
  • 结合isis、ospf、路由策略的实验;直连引入ospf中,解决路由环路以及次优路径问题
    192.168.1.1:缩写为192第一步:把直连引入ospf中[R5]ipip-prefixdirectindex10permit192.168.1.132[R5]route-policydirect1permitnode10[R5-route-policy]if-matchip-prefixdirect[R5-ospf-1]import-routedirectroute-policydirect1结果:R2或者R3的......