随笔 - 28  文章 - 2  评论 - 1  阅读 - 25021
03 2022 档案
前端代理部署问题
摘要:作为前端最常出现的两个场景。 一,打包再本地部署 二,打包给服务器部署 不管哪种都属要配置代理才能解决跨域问题 VUE 主要是两个文件。 1.根目录下的vue.config.js中的 devServer 属性下进行配置.代理后访问 localhost:8088/ = http://xxx.xxx.x 阅读全文
posted @ 2022-03-24 14:55 blue_hl 阅读(247) 评论(0) 推荐(0) 编辑
canvas绘制
摘要:canvas <canvas id="canvas" ref="Canvas" /> 绘制画布 const canvas = ref<any | null>(null); const draw = (value: string) => { // 创建 context 对象 const ctx = c 阅读全文
posted @ 2022-03-23 09:37 blue_hl 阅读(57) 评论(0) 推荐(0) 编辑
VUE3的学习和使用(四)用viewerjs插件实现图片预览
摘要:用viewerjs插件实现图片预览 // 安装依赖 "viewerjs": "^1.9.0" 在template里展示图片并设置点击事件 <template> <ul id="img-area"> <li v-for="(item,index) in imgList" :key="item.id"> 阅读全文
posted @ 2022-03-22 10:44 blue_hl 阅读(2122) 评论(0) 推荐(0) 编辑
VUE3的学习和使用(三)用execCommand实现文本复制
摘要:利用execCommand复制文本 <template> <button @click="copyText">复制</button> <section id="copy-text"> ... </section> </template> // 复制监测详情内容 const copyText = () 阅读全文
posted @ 2022-03-21 10:52 blue_hl 阅读(480) 评论(0) 推荐(0) 编辑
VUE3的学习和使用(二)vuex+ts的使用
摘要:Vuex 是专门为 Vue.js 设计的状态管理库,用于管理共享状态。如: 多个视图依赖于同一状态,或者来自不同视图的行为需要变更同一状态。 vue3中对vuex的使用写法 首先在main.ts中引入store 在src的目录下创建store用于放置vuex文件,在index.ts中引入 impor 阅读全文
posted @ 2022-03-18 15:30 blue_hl 阅读(3038) 评论(0) 推荐(0) 编辑
VUE3的学习和使用(一)
摘要:vue3相比vue2更加轻量,区别之一就是使用setup代替了data,methods,还有响应式数据类型ref,reactive的使用。 新建一个index.vue <template> html元素 </template> <script setup lang="ts"> ts逻辑 </scri 阅读全文
posted @ 2022-03-18 10:34 blue_hl 阅读(503) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

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