上一页 1 2 3 4 5 6 ··· 98 下一页
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> *{margin: 0;padding: 0;} .nav,.bar{ list-style: none; ove 阅读全文
posted @ 2023-08-11 17:05 JackieDYH 阅读(9) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script type="text/javascript"> window.onload = function(){ var ptS = document.ge 阅读全文
posted @ 2023-08-10 09:15 JackieDYH 阅读(64) 评论(0) 推荐(0) 编辑
摘要: <script setup> <script setup> import { ref, watch, onMounted, computed ,getCurrentInstance,} from 'vue'; import { useRouter, useRoute } from 'vue-rout 阅读全文
posted @ 2023-08-09 18:20 JackieDYH 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 代码实现了一个基本的滑动功能,通过鼠标按下、鼠标松开和鼠标移动事件来监听滑动操作。 具体实现逻辑如下: 在 onMounted 钩子函数中,我们为滚动容器添加了三个事件监听器:mousedown 事件:当鼠标按下时,设置 control.isDown 为 true,记录鼠标起始位置 control. 阅读全文
posted @ 2023-08-07 09:57 JackieDYH 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 实现代码 可以随意填写删除 <template> <div class="verification-container"> <input v-for="(code, index) in verificationCodes" :key="index" v-model="verificationCode 阅读全文
posted @ 2023-08-02 14:37 JackieDYH 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 在Vue3中,可以使用<input type="file">标签来实现上传文件的功能,同时可以通过<div>标签来实现拖拽上传的功能。 首先,在template中定义一个包含<input>和<div>标签的组件: <template> <div class="dropzone" @dragover. 阅读全文
posted @ 2023-08-02 10:41 JackieDYH 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Vue3中采用EventBus方式进行组件间通信与Vue2有一定区别 1.创建EventBus 在Vue2中,我们可以在main.js中创建一个全局的EventBus,代码如下: // EventBus.js import Vue from 'vue' const EventBus = new Vu 阅读全文
posted @ 2023-07-31 18:02 JackieDYH 阅读(93) 评论(0) 推荐(0) 编辑
摘要: FormData 您可以使用以下代码循环该对象并将其添加到formData对象中: const formData = new FormData(); const object = { "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMy0wNy0yMFQwNjozMzoxMS4 阅读全文
posted @ 2023-07-31 10:08 JackieDYH 阅读(37) 评论(0) 推荐(0) 编辑
摘要: JavaScript实现web端鼠标横向滑动&触控板滑动效果 支持鼠标拖动滑动&触控板滑动效果 web端实现滑动,就是对鼠标按下、鼠标松开、鼠标移动事件进行监听 效果图 代码 结构代码 <template> <div class="swiper"> <div class="container" re 阅读全文
posted @ 2023-07-28 21:20 JackieDYH 阅读(335) 评论(0) 推荐(0) 编辑
摘要: async/await 的优势在于处理 then 链 单一的 Promise 链并不能发现 async/await 的优势,但是,如果需要处理由多个 Promise 组成的 then 链的时候,优势就能体现出来了(很有意思,Promise 通过 then 链来解决多层回调的问题,现在又用 async 阅读全文
posted @ 2023-07-26 18:29 JackieDYH 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 98 下一页