最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

uniapp頁面完成水印添加功能代碼示例(自定義文字)

 更新時間:2025年01月10日 09:21:16   作者:苦逼的猿寶  
這篇文章主要介紹了uniapp頁面完成水印添加功能(自定義文字)的相關(guān)資料,包括如何編寫頁面代碼、數(shù)據(jù)代碼以及如何展示效果圖,通過代碼介紹的非常詳細(xì),需要的朋友可以參考下

頁面代碼

<template>
	<view class="">
		<!-- 水印 -->
		<view class="watermark-container" v-if="text">
			<view class="zhanshiyemian">
				<view class="weikaifang-sty" v-for="(item, index) in generateWatermarks()" :key="index">
					{{ text }}
				</view>
			</view>
		</view>
		<!-- 代碼 -->
		<view class="content">
			<!-- 搜索 -->
			<view class="serchform_time">
				<view class="left">
					<view class="contentx">全部訂單</view>
					<view></view>
				</view>
				<view class="right">
					<view @click="show = true" class="serchform_t">時間</view>
					<view>1</view>
				</view>
			</view>
			<u-popup :show="show" :round="10" mode="top" @close="close" @open="open">
				<view>
					<text>出淤泥而不染,濯清漣而不妖</text>
				</view>
			</u-popup>
			<!-- 主體展示 -->
			<view class="content_center">
				<view v-for="item in list" :key="item">
					<view class="title">{{item.time}}</view>
					<view v-for="(aitem,index) in item.listevery" :key="index" class="box_center">
						<view class="aa">
							<view class="left">
								{{aitem.time}}
							</view>
							<view class="right">
								{{aitem.status}}
							</view>
						</view>
						<view class="bb">
							<view class="left">

							</view>
							<view class="right">
								{{aitem.a}}
							</view>
						</view>
						<view class="cc">
							<view class="left">

							</view>
							<view class="right">
								{{aitem.b}}
							</view>
						</view>
						<view class="dd">
							<view class="left">
								{{aitem.to}}
							</view>
							<view class="right">
								{{aitem.money}} <text>元</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		listFive
	} from '../listMessage.js'
	export default {
		name: "Watermark",
		data() {
			return {
				itemCount: 0,
				list: [],
				show: false,
			};
		},
		props: {
			text: {
				type: String,
				default: '阿寶科技'
			},
		},
		mounted() {
			this.calculateWatermarkCount();
			console.log(listFive, 'listFive');
			this.list = listFive
		},
		onReady() {
			// 微信小程序需要用此寫法
			// this.$refs.datetimePicker.setFormatter(this.formatter)
		},
		beforeDestroy() {},
		methods: {
			formatter(type, value) {
				if (type === 'year') {
					return `${value}年`
				}
				if (type === 'month') {
					return `${value}月`
				}
				if (type === 'day') {
					return `${value}日`
				}
				return value
			},
			calculateWatermarkCount() {
				const screenWidth = uni.getSystemInfoSync().windowWidth;
				const screenHeight = uni.getSystemInfoSync().windowHeight;
				const watermarkWidth = 25;
				const watermarkHeight = 140;
				const horizontalCount = Math.ceil(screenWidth / watermarkWidth);
				const verticalCount = Math.ceil(screenHeight / watermarkHeight);
				this.itemCount = horizontalCount * verticalCount;
			},
			generateWatermarks() {
				return Array(this.itemCount).fill(null);
			},
			open() {
				// console.log('open');
			},
			close() {
				this.show = false
				// console.log('close');
			}
		},
	}
</script>
<style lang="scss">
	page {
		background-color: #f3f3f3;
	}

	.from-stye {
		position: relative;
		z-index: 999;
		pointer-events: none;
	}

	.zhanshiyemian {
		position: absolute;
		width: 100%;
		z-index: 9999;
		pointer-events: none;
		display: flex;
		flex-wrap: wrap;
		line-height: 100rpx;
	}

	.weikaifang-sty {
		font-size: 12px;
		color: #cccccc63;
		width: 25%;
		text-align: center;
		transform: rotate(-30deg);
		/* 順時針旋轉(zhuǎn)30度 */
	}

	.content {
		padding: 0 30rpx;
		box-sizing: border-box;
		background-color: #f3f3f3;

		.serchform_time {
			height: 100rpx;
			background-color: #fff;
			box-shadow: 0 4px 6px -6px #999;
			position: fixed;
			top:  0;
			left: 0;
			right: 0;
			z-index: 9999;
			display: flex;
			justify-content: space-evenly;

			.right,
			.left {
				// width: 50%;
				display: flex;
				align-items: center;
			}

			.left {
				.contentx {
					font-weight: 600;
				}
			}

			.rigth {
				.serchform_t {
					position: relative;
					margin-bottom: 40px;
					/* 確保有足夠的空間顯示彈出框 */
				}
			}
		}

		.content_center {
			padding-top:140rpx;
			box-sizing: border-box;

			.title {
				font-weight: 600;
			}

			.box_center {
				width: 100%;
				height: 260rpx;
				background-color: #fff;
				border-radius: 20rpx;
				margin: 20rpx 0;
				padding: 20px;
				box-sizing: border-box;

				.aa,
				.bb,
				.cc,
				.dd {
					display: flex;

				}

				.aa {
					justify-content: space-between;

					.left {
						font-size: 28rpx;
						font-weight: 600;
					}

					.right {
						font-size: 26rpx;
						color: #333;
					}
				}

				.bb,
				.cc {
					margin: 20rpx 0;
					align-items: center;

					.left {
						background-color: greenyellow;
						width: 10rpx;
						height: 10rpx;
						border-radius: 50%;
						margin-right: 20rpx;
					}
				}

				.cc {
					.left {
						background-color: red;
					}
				}

				.dd {
					justify-content: space-between;

					.left {
						padding: 0 4rpx;
						font-size: 22rpx;
						background-color: #e6f1fb;
						color: #4669bb;
						height: 34rpx;
					}

					.right {
						font-size: 32rpx;
						font-weight: 600;

						text {
							font-size: 24rpx;
							font-weight: 500;
						}
					}
				}
			}
		}
	}
</style>

數(shù)據(jù)代碼

export const listFive = [{
	time:"07月24日",
	listevery:[
		{
			time:'23:36',
			status:'已支付',
			a:'張三哈哈哈',
			b:'李四哈哈哈',
			to:'高德渠道',
			money:'18.15'
		},
		{
			time:'23:36',
			status:'已支付',
			a:'張三哈哈哈',
			b:'李四哈哈哈',
			to:'高德渠道',
			money:'18.15'
		}
	]
},{
	time:"07月25日",
	listevery:[
		{
			time:'23:36',
			status:'已支付',
			a:'張三哈哈哈',
			b:'李四哈哈哈',
			to:'高德渠道',
			money:'18.15'
		},
		{
			time:'23:36',
			status:'已支付',
			a:'張三哈哈哈',
			b:'李四哈哈哈',
			to:'高德渠道',
			money:'18.15'
		}
	]
},{
	time:"07月26日",
	listevery:[
		{
			time:'23:36',
			status:'已支付',
			a:'張三哈哈哈',
			b:'李四哈哈哈',
			to:'高德渠道',
			money:'18.15'
		}
	]
}]

效果圖

總結(jié) 

到此這篇關(guān)于uniapp頁面完成水印添加功能(自定義文字)的文章就介紹到這了,更多相關(guān)uniapp頁面水印添加功能內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • uni-app?開發(fā)微信小程序定位功能

    uni-app?開發(fā)微信小程序定位功能

    這篇文章主要介紹了uni-app?開發(fā)微信小程序定位,通過使用onLocationChange方法持續(xù)監(jiān)聽地址,根據(jù)定位精度字段判斷是否使用此次定位的經(jīng)緯度,需要的朋友可以參考下
    2022-04-04
  • vue_drf實現(xiàn)短信驗證碼

    vue_drf實現(xiàn)短信驗證碼

    我們在做網(wǎng)站開發(fā)時,登錄頁面很多情況下是可以用手機(jī)號接收短信驗證碼,本文主要介紹了vue_drf實現(xiàn)短信驗證碼,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2021-07-07
  • vue中使用keep-alive動態(tài)刪除已緩存組件方式

    vue中使用keep-alive動態(tài)刪除已緩存組件方式

    這篇文章主要介紹了vue中使用keep-alive動態(tài)刪除已緩存組件方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-08-08
  • Vue實現(xiàn)下拉表格組件

    Vue實現(xiàn)下拉表格組件

    這篇文章主要為大家詳細(xì)介紹了Vue實現(xiàn)下拉表格組件,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-04-04
  • vue項目打包部署到服務(wù)器的方法示例

    vue項目打包部署到服務(wù)器的方法示例

    這篇文章主要介紹了vue項目打包部署到服務(wù)器的方法示例,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-08-08
  • 如何設(shè)置Vue全局公共方法

    如何設(shè)置Vue全局公共方法

    這篇文章主要介紹了如何設(shè)置Vue全局公共方法,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2023-05-05
  • vue生成token并保存到本地存儲中

    vue生成token并保存到本地存儲中

    這篇文章主要介紹了vue生成token并保存到本地存儲中,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下
    2018-07-07
  • 詳解Vue之計算屬性

    詳解Vue之計算屬性

    這篇文章主要介紹了Vue之計算屬性的相關(guān)知識,文中講解非常細(xì)致,代碼幫助大家更好的理解和學(xué)習(xí),感興趣的朋友可以了解下
    2020-06-06
  • 在Vue中使用MQTT實現(xiàn)通信過程

    在Vue中使用MQTT實現(xiàn)通信過程

    文章介紹了在Vue項目中集成MQTT的步驟:安裝mqtt.js庫,創(chuàng)建MQTT連接工具類以實現(xiàn)復(fù)用,通過Vue組件或直接在頁面使用MQTT客戶端,最后強(qiáng)調(diào)這是個人經(jīng)驗分享,鼓勵支持腳本之家
    2025-07-07
  • vue3鼠標(biāo)經(jīng)過顯示按鈕功能的實現(xiàn)

    vue3鼠標(biāo)經(jīng)過顯示按鈕功能的實現(xiàn)

    本篇文章介紹了如何使用 Vue3 實現(xiàn)一個鼠標(biāo)經(jīng)過顯示按鈕的效果,我們使用了 Vue3 的 Composition API 來創(chuàng)建響應(yīng)式的數(shù)據(jù),并使用了?@mouseover?和?@mouseleave?事件來監(jiān)聽鼠標(biāo)的移入和移出事件,感興趣的朋友一起看看吧
    2024-04-04

最新評論

玛沁县| 伊金霍洛旗| 六盘水市| 呼玛县| 江源县| 娄烦县| 安图县| 博野县| 满城县| 蓝田县| 钦州市| 西青区| 进贤县| 团风县| 安顺市| 玉林市| 大竹县| 余江县| 平武县| 宿松县| 崇义县| 逊克县| 阿勒泰市| 上思县| 越西县| 邢台市| 彰化市| 苏尼特右旗| 青神县| 镇巴县| 汶上县| 广宁县| 土默特右旗| 贵南县| 南宁市| 郯城县| 霍州市| 凤翔县| 侯马市| 沁源县| 宁夏|