A brief introduction to VUE uni-app basic components

A brief introduction to VUE uni-app basic components

1. scroll-view

When using vertical scrolling, you need to give a fixed height and set the height through CSS; when using horizontal scrolling, you need to add white-space: nowrap ; style.

scroll-y : allows vertical scrolling, scroll-x: allows horizontal scrolling

@scroll : triggered when scrolling, event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY}

Two-way data binding

<template>
	<view>
		<scroll-view class="scroll" scroll-y="true" @scroll="scroll">
			<view v-for="i in 100">{{i}}</view>
		</scroll-view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				flag:true
			}
		},
		methods: {
			scroll(e){
				console.log(e.detail);
			}
		}
	}
</script>

<style>
	.scroll{
		height:400rpx;
	}
</style>

Summarize

This article ends here. I hope it can be helpful to you. I also hope you can pay more attention to more content on 123WORDPRESS.COM!

You may also be interested in:
  • Detailed explanation of the use of router-view components in Vue
  • Detailed explanation of how to use Teleport, a built-in component of Vue3
  • A brief discussion on VUE uni-app custom components
  • Detailed explanation of Vue development Sort component code
  • A detailed discussion of components in Vue

<<:  Detailed explanation of the buffer pool in MySQL

>>:  XHTML Getting Started Tutorial: Simple Web Page Creation

Recommend

Summary of web design experience and skills

■ Website theme planning Be careful not to make yo...

Steps to install MySQL on Windows using a compressed archive file

Recently, I need to do a small verification exper...

Summary of Linux date command knowledge points

Usage: date [options]... [+format] or: date [-u|-...

Detailed explanation of MySQL's Seconds_Behind_Master

Table of contents Seconds_Behind_Master Original ...

Introduction to generating Kubernetes certificates using OpenSSL

Kubernetes supports three types of authentication...

MySQL optimization: use join instead of subquery

Use JOIN instead of sub-queries MySQL supports SQ...

js method to delete a field in an object

This article mainly introduces the implementation...

Common problems and solutions during MySQL MGR construction

Table of contents 01 Common Faults 1 02 Common Fa...

Vue implements graphic verification code

This article example shares the specific code of ...

MySQL trigger trigger add, delete, modify and query operation example

This article uses examples to describe the add, d...

Three ways to copy MySQL tables (summary)

Copy table structure and its data The following s...

NodeJs high memory usage troubleshooting actual combat record

Preface This is an investigation caused by the ex...

Web designers should optimize web pages from three aspects

<br />With the increase of bandwidth, there ...

vue.js downloads pictures according to picture url

Recently, when I was working on a front-end vue.j...