当前位置: 首页 > news >正文

uniapp常用标签

一.uni-app常用标签

该组件类似HTML中的<a>组件,但只能跳转本地页面。目标页面必须在pages.json中注册
二. 标签用法
1.view
类似于HTML中的div标签通常用于布局和包裹其他标签


2.scroll-view
在指定的区域设置一块可以左右滚动的区域,通常用于下拉刷新和商品主体部分


代码示例
<template>
    <scroll-view class="scrollview" scroll-y="true">
        <view class="box">0</view>
        <view class="box">1</view>
        <view class="box">2</view>
        <view class="box">3</view>
        <view class="box">4</view>
        <view class="box">5</view>
        <view class="box">6</view>
        <view class="box">7</view>
        <view class="box">8</view>
        <view class="box">9</view>
    </scroll-view>
</template>
 
<script>
 
</script>
 
<style>
    .scrollview {
        height: 100px;
        border: 1px solid red;
        white-space: nowrap;
    }
 
    .box {
        widows: 100px;
        height: 100px;
        background-color: aqua;
 
    }
</style>

3.swiper
用于制作轮播图


代码示例
<template>
<swiper class="swiper" indicator-dots autoplay interval="1000">
    <swiper-item class="swiperview">111</swiper-item>
    <swiper-item class="swiperview">222</swiper-item>
    <swiper-item class="swiperview">333</swiper-item>
    <swiper-item class="swiperview">444</swiper-item>
    </swiper>
</template>
 
<script>
 
</script>
 
<style>
    .swiper {
        height: 100px;
        border: 1px solid red;
        white-space: nowrap;
    }
 
    .swiperview {
        widows: 100px;
        height: 100px;
        background-color: aqua;
 
    }
</style>

4.image
相对于HMTL中的img,用于展示图片


代码示例
<template>
    <scroll-view class="scrollview" scroll-y="true">
        <image src="../../static/1.jpeg" class="imger"></image>
        <image src="../../static/2.jpeg" class="imger"></image>
        <image src="../../static/3.png" class="imger"></image>
        <image src="../../static/4.jpg" class="imger"></image>
        <image src="../../static/5.png" class="imger"></image>
    </scroll-view>
</template>
 
<script>
 
</script>
 
<style>
    .scrollview {
        height: 280px;
        border: 1px solid red;
    }
</style>

5.text

6.navigator


7.button

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • MATLAB 中的 reshape 函数
  • blender中获取虚拟相机渲染图片上每像素对应的纹理上的像素值
  • 3.美食推荐系统(Java项目springboot和vue)
  • linux 硬件 arm架构 汇编语言
  • 步进电机相关
  • erlang学习:用OTP构建系统23.12练习题
  • day-48 分割回文串
  • 1037 计算数列和
  • tcp如何保证可靠性传输
  • 保研考研机试攻略(满分篇):第一章——技巧之巅(2)
  • linux进程处理
  • Shader学习笔记
  • C#中的Array.Sort()和Reverse()
  • JAVA-JVM 内存模型类加载器GC算法GC调优
  • 【技巧】Excel检查单元格的值是否在另一列中
  • 深入了解以太坊
  • 《深入 React 技术栈》
  • 【刷算法】从上往下打印二叉树
  • java正则表式的使用
  • JDK9: 集成 Jshell 和 Maven 项目.
  • Laravel Telescope:优雅的应用调试工具
  • MaxCompute访问TableStore(OTS) 数据
  • Nginx 通过 Lua + Redis 实现动态封禁 IP
  • node 版本过低
  • React Native移动开发实战-3-实现页面间的数据传递
  • Spring Boot快速入门(一):Hello Spring Boot
  • vue-cli在webpack的配置文件探究
  • 从重复到重用
  • 搞机器学习要哪些技能
  • 解决iview多表头动态更改列元素发生的错误
  • 每天一个设计模式之命令模式
  • 浅谈Golang中select的用法
  • 区块链分支循环
  • 使用阿里云发布分布式网站,开发时候应该注意什么?
  • 用mpvue开发微信小程序
  • “十年磨一剑”--有赞的HBase平台实践和应用之路 ...
  • hi-nginx-1.3.4编译安装
  • 微龛半导体获数千万Pre-A轮融资,投资方为国中创投 ...
  • 支付宝花15年解决的这个问题,顶得上做出十个支付宝 ...
  • ​html.parser --- 简单的 HTML 和 XHTML 解析器​
  • #QT(智能家居界面-界面切换)
  • $.ajax,axios,fetch三种ajax请求的区别
  • (rabbitmq的高级特性)消息可靠性
  • (论文阅读笔记)Network planning with deep reinforcement learning
  • (四)React组件、useState、组件样式
  • (算法)区间调度问题
  • (学习总结16)C++模版2
  • (译) 函数式 JS #1:简介
  • (原)Matlab的svmtrain和svmclassify
  • (转)Sql Server 保留几位小数的两种做法
  • (转)母版页和相对路径
  • (转)总结使用Unity 3D优化游戏运行性能的经验
  • ***通过什么方式***网吧
  • .bat批处理(三):变量声明、设置、拼接、截取
  • .NET Core 网络数据采集 -- 使用AngleSharp做html解析