- 博客(11)
- 收藏
- 关注
原创 二进制blob处理
利用请求头中的responseType:‘blob’,去自动接受blob流文件,然后使用new Blob()方法处理和后续下载const blob1 = new Blob([res]);//new Blob([res])中不加data就会返回下图中[objece objece]内容(少取一层) //const blob = new Blob([res.data]);//new Blob([res])中不加data就会返回下图中[objece objece]内容(少取
2022-05-31 16:14:44 419 1
原创 vue3 antd treeSelect 懒加载问题
html代码<a-tree-select show-search v-model:value="form.organId" :style="{ width: '100%' }" :tree-data="treeData" :load-data="onLoadData" :replace-fields="{ children: 'children', title: 'deptName', key: 'deptId', value: 'deptId' }" placeholder="请选择
2021-10-26 14:31:49 1513 1
转载 Vue子组件调用父组件的方法函数
第一种方法直接在子组件中通过this.$parent.event来调用父组件的方法父组件<template> <div> <child></child> </div></template><script> import child from './components/dam/child'; export default { components: { child
2021-10-26 14:15:36 323
原创 computed、watch、methods的先后执行顺序
1#computed:计算属性将被混入到 Vue 实例中。所有 getter 和 setter 的 this 上下文自动地绑定为 Vue 实例。2#methods:methods 将被混入到 Vue 实例中。可以直接通过 VM 实例访问这些方法,或者在指令表达式中使用。方法中的 this 自动绑定为 Vue 实例。3#watch:是一种更通用的方式来观察和响应 Vue 实例上的数据变动。一个对象,键是需要观察的表达式,值是对应回调函数。值也可以是方法名,或者包含选项的对象。Vue 实例将会在实例化时调用
2021-10-26 14:07:00 1307
原创 vue3 vite.config.ts 配置
import { defineConfig } from 'vite'import vue from '@vitejs/plugin-vue'import styleImport from 'vite-plugin-style-import'import { resolve } from 'path'// https://vitejs.dev/config/export default defineConfig({ base: './',//打包后的静态资源路径修改 plugins: [
2021-10-26 14:05:12 1651
原创 git merge 用法
一、开发分支(dev)上的代码达到上线的标准后,要合并到 master 分支git checkout devgit pullgit checkout mastergit merge devgit push -u origin master二、当master代码改动了,需要更新开发分支(dev)上的代码git checkout master git pull git checkout devgit merge master git push -u origin dev...
2021-10-26 11:56:30 128
原创 git常用命令错误failed to push some refs to ‘xxxx‘
error: failed to push some refs to 'https://github.com/ZJyoung1997/JZShop.git'hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused by another repository pushinghint: to the same ref. You
2021-06-15 09:42:45 120
转载 vue 点击选中改变样式
data里isActive:-1,method里checkedItem(index){this.isActive=index;},页面里<div v-for="(item,index) in nameoptions" v-bind:class="{active:index==isActive}" @click="checkItem(index)>{{item.name}}</div>
2021-05-20 10:03:59 616
原创 如何修改NPM全局模式的默认安装路径及修改npm默认源
输入npm路径,查看当前配置:1.npm config ls运行的结果为:第一步:找到node文件夹,在其根部录下创建node_global和node_cache两个文件夹第二步:在cmd命令窗口分别输入以下命令npm config set prefix "node_gobal文件夹的路径"npm config set cache "node_cache文件夹的路径"第三步:配置环境变量,在我的电脑属性中找到高级系统设置,然后找到环境变量,最后找到path编辑添加node_go
2020-12-14 18:21:20 525
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人