08 2024 档案

摘要:封装弹框组件 // 封装 Modal.confirm 方法 function confirm(title: string, content: string, okText: string = '确定', cancelText: string = '取消') { return new Promise< 阅读全文
posted @ 2024-08-30 13:52 seekHelp 阅读(100) 评论(0) 推荐(0) 编辑
摘要:在 Vue CLI 中,只有以 VUE_APP_ 开头的变量才会被 webpack.DefinePlugin 静态嵌入到客户端包中。这是因为在打包过程中,Vue CLI 会将环境变量中以 VUE_APP_ 开头的变量注入到应用程序中,以便 Vue.js 应用程序在运行时能够访问这些变量。 其他的变量 阅读全文
posted @ 2024-08-12 14:22 seekHelp 阅读(74) 评论(0) 推荐(0) 编辑
摘要:directive/dialogDrag.js import Vue from "vue"; Vue.directive('dialogDrag', { bind(el, binding, vnode, oldVnode) { //弹框可拉伸最小宽高 let minWidth = 400; let 阅读全文
posted @ 2024-08-12 11:48 seekHelp 阅读(354) 评论(0) 推荐(0) 编辑
摘要:1、组件结构 2、组件封装 src/components/StampBadge/src/StampBadge.vue 文件代码 <template> <div class="first-ring" v-bind="getBindValue" :class="getStampBadgeClass" > 阅读全文
posted @ 2024-08-09 16:04 seekHelp 阅读(108) 评论(0) 推荐(0) 编辑
摘要:.test { /* 设置全屏宽高,覆盖于页面上方 */ position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; opacity: 0.8; /* 生成的图片是有一张,开启repeat自动填充 */ background: rep 阅读全文
posted @ 2024-08-09 15:58 seekHelp 阅读(28) 评论(0) 推荐(0) 编辑
摘要:1、组件封装 <template> <div ref="watermarkContainerRef" class="watermark-container"> <!-- 插槽--> <slot></slot> </div> </template> <script setup> import { re 阅读全文
posted @ 2024-08-09 15:55 seekHelp 阅读(198) 评论(0) 推荐(0) 编辑
摘要:遇到一个需求就是对这个 el-notification 加一个倒计时进度条,方便用户知道该通知何时自动关闭。 一、示例代码 (1)基于Vue2+ElementUI的项目 <template> <div> <el-button @click="showTip">do it</el-button> </ 阅读全文
posted @ 2024-08-07 09:53 seekHelp 阅读(276) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示