随笔分类 -  vue前端

摘要:https://www.zhihu.com/question/25003398 parseUrl(url){ var json = {}; if(url undefined || typeof(url) != 'string' || url.indexOf("?") == -1 ||url.inde 阅读全文
posted @ 2021-05-13 14:52 不带R的墨菲特 阅读(110) 评论(0) 推荐(0)
摘要:npm install monaco-editor@0.23.0https://microsoft.github.io/monaco-editor/ 阅读全文
posted @ 2021-05-12 16:39 不带R的墨菲特 阅读(288) 评论(1) 推荐(0)
摘要:在数组中的用法: const arr = [2, 3, 5, 4, 5, 2, 2];for(let i of arr){console.log(i) //打印出来的是value 2,3,5,4,2,2}for(let i in arr){console.log(i) //打印出来的是下标 0,1, 阅读全文
posted @ 2021-05-12 16:14 不带R的墨菲特 阅读(128) 评论(0) 推荐(0)
摘要:<style lang="less" scoped> div /deep/ .ant-modal-content{ height: 600px; width: 1000px; } div /deep/ .ant-modal-body{ height: 80%; width: 100%; } </st 阅读全文
posted @ 2021-05-08 10:55 不带R的墨菲特 阅读(1303) 评论(1) 推荐(0)
摘要:先说下效果: 代码: <template> <div> <a-card title="form-data" :bordered="true" style="width: 40%"> <div> <a-form ref="form" layout="inline" :model="form" > <d 阅读全文
posted @ 2021-05-07 16:12 不带R的墨菲特 阅读(428) 评论(0) 推荐(0)
摘要:1. import JsonViewer from 'vue-json-viewer' 只可以读: 案例: <div style=" width: 1000px; margin: auto; margin-top: 35px;"> <json-viewer v-model="form.headers 阅读全文
posted @ 2021-05-05 12:27 不带R的墨菲特 阅读(1439) 评论(0) 推荐(0)
摘要:<template> <div> <div id="components-form-demo-advanced-search"> <a-form class="ant-advanced-search-form" :form="form" :label-col="{ span: 5 }" :wrapp 阅读全文
posted @ 2021-05-01 04:02 不带R的墨菲特 阅读(158) 评论(0) 推荐(0)
摘要:1.文本双向绑定: 语法:{{ var}} 实例: 文本插值 <div id="app"> <p>{{ message }}</p> </div> <script> new Vue({ el: '#app', data: { message: '<h1>菜鸟教程</h1>' } }) </scrip 阅读全文
posted @ 2021-04-29 16:06 不带R的墨菲特 阅读(222) 评论(0) 推荐(0)
摘要:<template> <div> <div><formsearch></formsearch></div> <!-- <div><modalbox></modalbox></div> --> <div> <a-table :columns="columns" :data-source="data" 阅读全文
posted @ 2021-04-29 15:42 不带R的墨菲特 阅读(2988) 评论(0) 推荐(0)
摘要:vue2.x 适合使用 main.js如下: import 'ant-design-vue/dist/antd.css'; import { message } from 'ant-design-vue'; Vue.prototype.$message = message; Vue.use(Antd 阅读全文
posted @ 2021-04-28 17:34 不带R的墨菲特 阅读(1518) 评论(0) 推荐(0)
摘要:<template> <a-table :columns="columns" :data-source="data" :scroll="{ x: 1300,y:1500}" class="tb_list" ref="table" :pagination="{ current: table.pageN 阅读全文
posted @ 2021-04-28 15:09 不带R的墨菲特 阅读(353) 评论(0) 推荐(0)
摘要:npm remove request npm install request 自己测试的,网上很多改webpack.conf 的没啥用我压根没动那里 阅读全文
posted @ 2021-04-26 19:22 不带R的墨菲特 阅读(599) 评论(1) 推荐(0)
摘要:设置 router/index.js router.beforeEach((to, from, next) => { if (to.name !== 'login' && !isAuthenticated) next({ name: 'login' }) else next() }) 完整设置ind 阅读全文
posted @ 2021-04-26 17:23 不带R的墨菲特 阅读(311) 评论(0) 推荐(0)
摘要:1. 路由登陆后跳转到主页: router/index.js 配置 // Avoided redundant navigation to current location const originalPush = Router.prototype.push Router.prototype.push 阅读全文
posted @ 2021-04-26 16:48 不带R的墨菲特 阅读(450) 评论(0) 推荐(0)
摘要:<div class="login-home"> <a-form name="loginform" id="components-form-demo-normal-login" :form="form" class="login-form" @submit="handleSubmit" > <a-f 阅读全文
posted @ 2021-04-25 20:21 不带R的墨菲特 阅读(619) 评论(0) 推荐(0)
摘要:html <input id="upload_file" type="file" multiple @change="v_upload_files"/> 注意input file 是不支持v-model的,因为v-model是双向数据绑定,而input file里面的文件只能通过点击选取来进行变更。 阅读全文
posted @ 2021-04-25 19:37 不带R的墨菲特 阅读(147) 评论(0) 推荐(0)
摘要:接口请求: 安装:npm install axios --save main.js配置 import axios from 'axios'; import qs from 'qs'; Vue.prototype.$axios=axios; Vue.prototype.qs=qs; axios.def 阅读全文
posted @ 2021-04-25 19:20 不带R的墨菲特 阅读(334) 评论(0) 推荐(0)
摘要:默认支持modal宽度修改但是高度.ant-modal-body,默认不支持修改,所以需要先通过挂在元素再css穿透/deep/ .ant-modal-body{} 修改样式 可以看到修改成功效果: 阅读全文
posted @ 2021-04-22 17:50 不带R的墨菲特 阅读(5119) 评论(0) 推荐(0)
摘要:说明: :rowKey 带:的表示绑定的是表达式带冒号的表示绑定的是表达式不带的表示绑定的就是值 解决办法有三种,注意这里的id就是datasoure="data" 的data的一个属性 <a-table :columns="columns" :data-source="tableData" siz 阅读全文
posted @ 2021-04-22 14:34 不带R的墨菲特 阅读(312) 评论(0) 推荐(0)
摘要:1.配置淘宝镜像 npm config set registry https://registry.npm.taobao.org ## 注释使用淘宝镜像,不在赘述 第一步安装vue cnpm install vue 第二步: 安装 vue-cli 如果提示: npm WARN deprecated 阅读全文
posted @ 2020-11-21 22:40 不带R的墨菲特 阅读(138) 评论(0) 推荐(0)