当前位置:网站首页>js显示隐藏手机号
js显示隐藏手机号
2022-08-02 23:44:00 【@小朱呀路】


<template>
<view>
<view class="flex a-c" style="height: 100rpx;width: 100%; ">
<view class="" style="height: 50rpx " >
{
{
xphonenumbool?allphonenum:isunum}}
</view>
<view class="aj-c" @click="select" style="width: 100rpx;height: 50rpx ">
<!-- 方法很多
<image v-if="!xphonenumbool" src="../../static/noseay.png" ></image>
<image v-if="xphonenumbool" src="../../static/yeseay.png" ></image>
-->
<image :src="`../../static/${
!xphonenumbool?'noseay':'yeseay'}.png`" >
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
allphonenum: '18338088912',
xphonenum: '',
xphonenumbool: false,
}
},
methods: {
select() {
this.xphonenumbool = !this.xphonenumbool;
},
},
computed: {
isunum: function() {
const newarr = this.allphonenum.split('');
newarr.forEach((item, index, arr) => {
if (index > 2 && index < 7) {
arr[index] = '*'
}
})
return newarr.join('');
}
}
}
</script>
<style>
image {
width: 100%;
height: 100%;
}
</style>
边栏推荐
- 程序员如何优雅地解决线上问题?
- 【系统架构设计师】第三章 数据库系统
- 即席查询—— Kylin使用
- 公司招个程序员,34岁以上两年一跳的不要,开出工资以为看错了
- 谷歌 Chrome 浏览器 104 正式版发布:加快网页加载,蓝牙 API 改进
- 稳压电源: 电路图及类型
- I have been in the software testing industry for nearly 20 years, let me talk to you about today's software testing
- Moco of Mock tools use tutorial
- 2022第十一届财经峰会:优炫软件斩获双项大奖
- flutter空安全问题,平时用到的数据一定要注意
猜你喜欢

【系统架构设计师】第三章 数据库系统

# DWD层及DIM层构建## ,220801 ,

【QT】自定义工程封装成DLL并如何调用(带ui界面的)

I have been in the software testing industry for nearly 20 years, let me talk to you about today's software testing

公司招个程序员,34岁以上两年一跳的不要,开出工资以为看错了

Jenkins汉化设置
思源笔记 本地存储无使用第三方同步盘,突然打不开文件。

为了面试阿里,熬夜肝完这份软件测试笔记后,Offer终于到手了

Visual Studio中vim模拟器

智能合约安全-可重入攻击(SW107-Reentrancy)
随机推荐
vant-swipe自适应图片高度+图片预览
ORA-55610: Invalid DDL statement on history-tracked table
5、Citrix云桌面初始化Storefront设置
js基础知识整理之 —— 全局作用域
IDEA多线程调试
嵌入式分享合集26
What is the matter that programmers often say "the left hand is knuckled and the right hand is hot"?
优秀论文以及思路分析01
Day117. Shangyitong: Generate registered order module
【Autosar RTM】
语音合成模型小抄(1)
3、Xendesktop更改发布桌面的显示名称(MCS静态桌面)
基于rt-thread studio的STM32裸机开发——LED
Find My技术|智能防丢还得看苹果Find My技术
科研用Cholesterol-PEG-NHS,NHS-PEG-CLS,胆固醇-聚乙二醇-活性酯
Apache Doris 1.1 特性揭秘:Flink 实时写入如何兼顾高吞吐和低延时
js基础知识整理之 —— 判断语句和三元运算符
谷歌 Chrome 浏览器 104 正式版发布:加快网页加载,蓝牙 API 改进
flutter空安全问题,平时用到的数据一定要注意
典型相关分析CCA计算过程