前端
mh_code
无名之辈
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
vue错误NavigationDuplicated: Avoided redundant navigation to current location:
避免了到当前位置的冗余导航:解决办法就是在router下面的index.js加上一段代码const originalPush = VueRouter.prototype.push;VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch((err) => err);};加上之后错误就消失了,如果对你有用,记得点赞。...原创 2021-07-19 14:18:46 · 335 阅读 · 1 评论 -
关于git。
第一步新建一个文件夹 然后git init (初始化文件夹使文件夹可管理)第二步git status 查看状态第三步git add .git commit -m '要提交的信息'git remote add origin https://github.com/mahao9/vue_practice.git ‘远程在这个地址上面创建源’git push -u origin main如果抛出这个错误git add README.md如果抛出这个错误...原创 2021-07-14 23:55:14 · 161 阅读 · 0 评论 -
关于el-table不能及时更新数据的问题
闲来无事写一写父子组件之间通讯的demo,遇到了好多坑,真的是菜。好,现在就记录下来。demo大概是上面的样子 点击新增个人信息 弹出子组件然后输入表单信息添加到父组件内,并可以在父组件上点击编辑按钮 弹出子组件回显要编辑的表单信息。遇到的最坑的地方就是el-table 不能及时回显数据(但是数据已经更新)。1.父组件控制子组件的显示<add-list :title="title" :dialogVisible.sync="isShowInfo...原创 2021-07-13 17:09:51 · 4410 阅读 · 2 评论 -
el-select如何获取label
<el-form-item label-width="0" prop="field101"> <el-select v-model="selectModel.field101" placeholder="请选择下拉选择" clearable :style="{ width: '100%' }" .原创 2021-07-12 14:16:52 · 734 阅读 · 0 评论 -
2021-03-27
1.如果一个 变量根本没有被声明,使用typeof反而不会报错。typeof undeclared_variable //"undefined"2.在没有let之前,typeof是一个百分百安全的运算符,永远不会报错。3.在代码块内,使用let命令声明了一个变量,在声明之前该变量都是不可用的,这在语法上称为“暂时性死区”。...原创 2021-03-27 08:02:07 · 106 阅读 · 0 评论 -
使用vue-cli创建的vue项目,用vsCode启动后,再使用vue ui 打开项目仪表盘就会报错,错误信息如下截图所示。
解决办法:如图所示 以管理员身份打开PowerShell 窗口。运行set-ExecutionPolicy RemoteSigned 选择A即可之后再到vsCode终端里面执行 vue ui 就可以启动项目仪表盘了 。原创 2021-03-26 20:09:35 · 1079 阅读 · 0 评论 -
Mac安装nodejs
1.首先安装homebrew/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"查看安装是否成功 brew --v2. 安装nodebrew install node坚持node npm 是否安装完成node -vnpm -v3.安装淘宝镜像npm install -g cnpm --registry=https://r...原创 2021-03-26 11:48:57 · 255 阅读 · 0 评论 -
2021-03-15
我们前端在对后台接口的时候,往往会发现接口中的某个字段没有数据,回显的事null 或者 '' 再或者是 undefined,比如我们获取后台借口头像的地址imgURl ,var imgURL;if(imgURL!=null && typeof(imgURL)!= undefined&&imgURL !=''){ //imgURL有内容才执行的代码 }此时我们就可以换另外一种写法,if (!!imgURL) { //imgURL 有内容才执行的代原创 2021-03-15 21:53:40 · 106 阅读 · 0 评论 -
vue v-for循环内的数据按钮点击增减className
<template> <div> <ul> <li v-for="(item, index) in cureList" :key="item.id"> <div class="special-cure" @click="toggleActive(index)" :class="{ active: item.isActive }"> .原创 2020-06-20 09:50:03 · 677 阅读 · 0 评论 -
vue 点击添加class,其他元素移除class(循环数组)
<div class="admin-main-nav"> <ul id="mainNav"> <li v-for="(item, index) in items" :key="item.id" :class="{ active: current == index }" @click="selectNav(index)" > &l.原创 2020-05-28 17:44:17 · 1940 阅读 · 1 评论 -
css使用text-align: justify;解决两个
.publish-the-line .publish-prefix{ width: 52px;}.publish-prefix span{ width: 100%; display: inline-block; text-align: justify; height: 15px; overflow: hidden; letter-spacing:1px;}.publis...原创 2020-04-08 15:35:38 · 574 阅读 · 0 评论 -
小程序金额显示隐藏
要求上面的金额显示隐藏。wxml:<view class="month-spendingBox"> <view class="month-spendingInwrap" bindtap="eyeChange"> <text>本月支出 (元)</text> <view class="spending-...原创 2020-04-07 16:02:52 · 909 阅读 · 0 评论 -
小程序点击按钮显示隐藏
wxml:<view > <button class="{{showView?'show':'hide'}}" bindtap="change">{{showView?'隐藏':'显示'}}</button> <button class="{{showView?'hide':'show'}}" bindtap="change">...原创 2020-04-07 15:05:50 · 5488 阅读 · 1 评论 -
http service 测试移动端h5
首先下载安装node.js node 官网就可以 。然后npm install -g http-server 安装手机服务执行命令打开.bat 的文件原创 2020-03-20 13:50:59 · 229 阅读 · 0 评论 -
table表头固定,内容出滚动条。
表格固定。内容可以滚动(已截图)。 <div class="m-table-scroll "> <table class="m-table table-bordered is-fixed"> <thead> <tr> <th class="thead">标题</th>...原创 2019-12-26 11:33:30 · 555 阅读 · 0 评论 -
新闻列表的图片img 自适应大小铺满美观
.hui-news-list-r { width: 32%; float: right; height: 78px; line-height: 78px;}.hui-news-list-r img { width: 100%; height: 100%; object-fit: cover;}原创 2019-10-17 11:22:35 · 715 阅读 · 0 评论
分享