
前端框架
前端框架
乡野码夫
写字楼里写字间,写字间里程序员;
程序人员写程序,又拿程序换酒钱。
酒醒只在网上坐,酒醉还来网下眠;
酒醉酒醒日复日,网上网下年复年。
但愿老死电脑间,不愿鞠躬老板前;
奔驰宝马贵者趣,公交自行程序员。
别人笑我忒疯癫,我笑自己命太贱;
不见满街漂亮妹,哪个归得程序员?
展开
-
从React中获取Button的传过来的参数
handleSearch = (e) => { if (e) { e.preventDefault(); } const { dispatch, form } = this.props; dispatch({ type: 'content/contentpByTime', payload: { time: e.currentTarget.value, }, }); } render(..原创 2021-11-28 15:53:46 · 958 阅读 · 0 评论 -
React修改Antd组件样式的方法
在组件里面添加标签进行修改,如用包住要修改的文字样式,添加spanClass样式即可原创 2021-10-26 21:28:55 · 1220 阅读 · 0 评论 -
momentjs本地与数据库utc时间相差8小时解决方法
momentjs本地与数据库utc时间相差8小时解决方法日常日期存储中,浏览器–>server端–>服务器 数据库时间是utc时区,会和本地北京时间相差8小时。解决方案一: 将数据库date类型改为string类型,这样简单方便????解决方案二:转为(moment.js)utc类型存入数据库( 1 ) 在前端页面选取时间时,将选取时间通过mement.js的utc方法先进行转换:moment(date).utc() ;( 2 ) 在server端往数据库储存时,需要将日期通过toD转载 2021-10-26 21:25:32 · 4016 阅读 · 0 评论 -
react错误 index.js:1 Warning: Invalid DOM property `class`. Did you mean `className`?
在react这个错误的原因是class是关键字,然后className是类名,把class改为className就可以啦!错误代码:index.js:1 Warning: Invalid DOM property class. Did you mean className?转载 2021-08-22 18:37:28 · 2518 阅读 · 0 评论 -
vue项目使用本地ip访问
在vue的配置文件config/index.js中修改host属性值:方法1.将host值改为本地ip地址;方法2.将host值改为 “0.0.0.0”。//这种应该是linux才有用'use strict'// Template version: 1.3.1// see http://vuejs-templates.github.io/webpack for documentation.const path = require('path')module.exports = { de原创 2021-04-18 22:50:10 · 1156 阅读 · 0 评论 -
Vue中保存token,取出token
场景:使用Vue前后端分离,登陆时成功或失败时,后台代码重定向一个待token地址,要在地址中获取token,并保存在Vue中,以便随时拿出来获取登录信息<script> export default { this.getParams(); var token = this.$route.query.token;//从URL地址上得到token // 将数据放在当前组件的数据内 localStorage.setI原创 2021-04-18 22:44:43 · 1886 阅读 · 0 评论 -
vue控制元素显示隐藏,使用v-if
new Vue({ el: '#app', data: { showOne:false, showTwo:false } methods: { changeStatus(){ if("设置的条件"){ this.showOne= true; this.showTwo= true; } } } })原创 2021-02-07 22:21:41 · 996 阅读 · 0 评论 -
Vue在表格单元格(el-table-column)中添加超链接访问
<el-table-column show-overflow-tooltip label="操作"> <template slot-scope="scope"> <span class="span-text" v-if="scope.row.linkUrl!== undefined && scope.row.linkUrl.length >=1"><a link :href="scope.row.linkUrl" target="_bla原创 2021-02-07 22:15:22 · 8410 阅读 · 0 评论 -
Vue中一行文字过多时,超出文本内容用省略号...隐藏显示
<div class="info-title">文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多文字过多 </div>.info-title { color: #19d3ea; font-size: 18px; width: 100%; /*一定要设置...原创 2021-01-31 22:07:17 · 9875 阅读 · 0 评论 -
vue新页面打开超链接方法
window.open("https://baidu.com");原创 2021-01-31 22:04:08 · 2816 阅读 · 0 评论 -
Vue-Vue文本渲染三种方法 {{}}、v-html、v-text
{{ }}将元素当成纯文本输出v-htmlv-html会将元素当成HTML标签解析后输出v-textv-text会将元素当成纯文本输出代码: <div id="app"> <!-- {}}/v-text不能解析html元素,只会照样输出 --> <p>{{hello}}</p> <p v-text = 'hello'></p> <p v-html =原创 2021-01-31 22:01:55 · 189 阅读 · 0 评论 -
vue router打开新页面并传递参数,接收参数
a页面 跳转到 b页面未跳转的之前页面(a页面)下代码:const { href } = this.$router.resolve({ name: 'contentArticle', //需要打开的新页面vue的名字 query: { id: id //携带的参数,多个使用,隔开 }});window.open(href, "_blank");//跳转需要跳转到的新页面(b页面)下的代码data() { return { id: '', };},created(原创 2021-01-31 21:58:35 · 2308 阅读 · 0 评论 -
vue中axios基本用法
1.首先安装axios:1):npm install2):npm install vue-axios --save3):npm install qs.js --save //这一步可以先忽略,它的作用是能把json格式的直接转成data所需的格式2.安装成功后,在main.js页面引用:import Vue from 'vue'import axios from 'axios'Vue.prototype.$axios = axios //全局注册,使用方法为:this.$axio转载 2021-01-30 22:49:57 · 449 阅读 · 1 评论 -
Vue.js在页面加载时执行某个方法
mounted: function(){ this.getTest(); }, methods: { getTest();}原创 2021-01-30 22:30:52 · 1701 阅读 · 0 评论 -
vue关于v-if判读数据是否为空的使用问题
<span class="span-text" v-if="item4.guideLink!== undefined && item4.guideLink.length >=1"><a link :href="item4.guideLink" target="_blank">办事指南</a></span>原创 2021-01-30 22:20:22 · 8932 阅读 · 0 评论 -
vue 常用ui组件库
vux github ui demo:https://github.com/airyland/vuxMint UI项目主页:http://mint-ui.github.io/#!/zh-cndemo:http://elemefe.github.io/mint-ui/#/github地址:https://github.com/ElemeFE/mint-ui中文文档地址:http://mint-ui.github.io/docs/#!/zh-cniviewiView 配套的工作流:https://转载 2021-01-23 21:41:19 · 186 阅读 · 0 评论 -
vue开发环境搭建及配置
转载地址:https://www.cnblogs.com/harbors/p/12673337.html转载 2021-01-23 21:32:47 · 85 阅读 · 0 评论