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

vue2 .sync 修饰符

vue2 .sync 修饰符

在这里插入图片描述
**创建 工程:
H:\java_work\java_springboot\vue_study

ctrl按住不放 右键 悬着 powershell

H:\java_work\java_springboot\js_study\Vue2_3入门到实战-配套资料\01-随堂代码素材\day04\准备代码\13-sync修饰符

vue --version
vue create v-sync-demo
cd v-sync-demo
npm run serve

App.vue

<template><div class="app"><button class="logout" @click="isShow = true">退出按钮</button><BaseDialog :visible.sync="isShow"></BaseDialog></div>
</template><script>
import BaseDialog from "./components/BaseDialog.vue";export default {data() {return {isShow: false,};},components: {BaseDialog,},
};
</script><style>
</style>

BaseDialog.vue

<template><div v-show="visible" class="base-dialog-wrap"><div class="base-dialog"><div class="title"><h3>温馨提示:</h3><button @click="close" class="close">x</button></div><div class="content"><p>你确认要退出本系统么?</p></div><div class="footer"><button>确认</button><button>取消</button></div></div></div>
</template><script>
export default {props: {visible: Boolean,},methods: {close() {this.$emit("update:visible", false);},},
};
</script><style scoped>
.base-dialog-wrap {width: 300px;height: 200px;box-shadow: 2px 2px 2px 2px #ccc;position: fixed;left: 50%;top: 50%;transform: translate(-50%, -50%);padding: 0 10px;
}
.base-dialog .title {display: flex;justify-content: space-between;align-items: center;border-bottom: 2px solid #000;
}
.base-dialog .content {margin-top: 38px;
}
.base-dialog .title .close {width: 20px;height: 20px;cursor: pointer;line-height: 10px;
}
.footer {display: flex;justify-content: flex-end;margin-top: 26px;
}
.footer button {width: 80px;height: 40px;
}
.footer button:nth-child(1) {margin-right: 10px;cursor: pointer;
}
</style>
http://www.lryc.cn/news/190018.html

相关文章:

  • 使用Tensorrt的一般步骤
  • uniapp apple 苹果登录 离线本地打包
  • 【数据库】Sql Server数据迁移,处理自增字段赋值
  • JOSEF约瑟 矿用一般型选择性漏电继电器 LXY2-660 Φ45 JKY1-660
  • DHCP自动分配IP原理
  • 读书笔记-《ON JAVA 中文版》-摘要26[第二十三章 注解]
  • IDEA报Error:java:无效的源发行版13解决方式
  • 基于SpringBoot的健身房管理系统
  • 竞赛选题 深度学习 植物识别算法系统
  • 希尔贝壳受邀参加《人工智能开发平台通用能力要求 第4部分:大模型技术要求》标准第一次研讨会
  • 虹科方案 | AR助力仓储物流突破困境:规模化运营与成本节约
  • spring容器ioc和di
  • Maven 仓库地址
  • 【2023研电赛】安谋科技企业命题特别奖:面向独居老人的智能居家监护系统
  • [Machine learning][Part4] 多维矩阵下的梯度下降线性预测模型的实现
  • LCR 078. 合并 K 个升序链表
  • JVM面试题:(三)GC和垃圾回收算法
  • hive建表指定列分隔符为多字符分隔符实战(默认只支持单字符)
  • android.app.RemoteServiceException: can‘t deliver broadcast
  • 信创办公–基于WPS的EXCEL最佳实践系列 (单元格与行列)
  • VsCode同时编译多个C文件
  • Android绑定式服务
  • 系统韧性研究(1)| 何谓「系统韧性」?
  • 使用Perl脚本编写爬虫程序的一些技术问题解答
  • SAP内部转移价格(利润中心转移价格)的条件
  • WRF如何批量输出文件添加或删除文件名后缀
  • Ubuntu右上角不显示网络的图标解决办法
  • AM@数列极限
  • Vue-2.3v-model原理
  • ​左手 Serverless,右手 AI,7 年躬身的古籍修复之路