
Vue
文章平均质量分 58
losedguest
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
一次性搞清楚element-ui里用到this._l()是什麼意思
參考 https://segmentfault.com/q/1010000017896162/a-1020000017896676查看Vue.js的源碼,可以看到如下兩段代碼 function installRenderHelpers (target) { target._o = markOnce; target._n = toNumber; target._s = toString; target._l = renderList; target._t = re原创 2021-01-16 10:32:26 · 1669 阅读 · 0 评论 -
elementui源碼解讀-問題8 Render里渲染用標籤直接賦值變量時 產生Module parse failed: Unexpected token (44:6)
Module parse failed: Unexpected token (44:6)File was processed with these loaders:* ./node_modules/vue-loader/lib/index.jsYou may need an additional loader to handle the result of these loaders.Vue項目在Render函數里直接渲染時,直接採用(<標籤></標籤>)模式的賦值時.原创 2020-12-17 14:12:59 · 687 阅读 · 0 评论 -
elementui源碼解讀-問題7 SCSS問題
異常Module build failed (from ./node_modules/sass-loader/dist/cjs.js):SassError: Undefined mixin.@include b(button) {// 此處內容即mixin里的@content}使用SCSS @include 但是使用@mixin定義 b增加定義如下@mixin b($block) { $B: $block !global; .#{$B} { @content;原创 2020-11-27 11:11:12 · 265 阅读 · 0 评论 -
elementui源碼解讀-問題6 vue-loader異常
1異常Module build failed (from ./node_modules/vue-loader/index.js):TypeError: Cannot read property 'vue' of undefined參考https://my.oschina.net/u/1033181/blog/2253646升級vue-loadernpm install vue-loader@latest2異常vue-loader升級后Module Error (from ./no原创 2020-11-27 10:04:17 · 170 阅读 · 0 评论 -
elementui源碼解讀-問題5 TypeError: compilation.mainTemplate.applyPluginsWaterfall is not a function
TypeError: compilation.mainTemplate.applyPluginsWaterfall is not a function參考 https://blog.youkuaiyun.com/zaocha321/article/details/104080778升級npm i --save-dev html-webpack-plugin@next原创 2020-11-26 16:56:31 · 802 阅读 · 0 评论 -
elementui源碼解讀-問題4 處理scss文件卡死,fibers缺失
1.npm run dev時,產生以下錯誤12% building modules 18/25 modules 7 active ...e-style-loader\lib\addStylesClient.js## There is an issue with `node-fibers` ##`D:\losedguest\MyDemo\Vue\workplace\node_modules\_fibers@5.0.0@fibers\bin\win32-x64-64\fibers.node` is mis原创 2020-11-26 15:57:50 · 847 阅读 · 0 评论 -
elementui源碼解讀-問題3 找不到scss文件
This relative module was not found:* ../packages/theme/index.scss in ./src/main.js需要安裝 以下命令cnpm install node-sass --save-devcnpm install sass-loader --save-dev原创 2020-11-24 16:56:04 · 350 阅读 · 0 评论 -
elementui源碼解讀-問題2 import Element from ‘main/index.js‘其中main指向何處
Element-UI里的引入Element都是這樣 import Element from 'main/index.js'可是在文檔結構里找了一圈也沒有找到main文件其實這個main是一個別名在webpack的js文件里設定了對應關係比如當前使用npm run dev:play 運行的項目npm run dev:play 運行用的webpack.demo.js進行的打包webpack.demo.js里配置別名設置如下 (引用的config.js里的alias).原创 2020-11-24 16:04:12 · 385 阅读 · 0 评论 -
Element-UI源碼解讀 問題1 樣式theme-chalk里安裝相關依賴時報錯
無法下載 https://github.com/sass/node-sass/releases/download/v4.14.1/win32-x64-64_binding.nodewin32-x64-64_binding.node 到淘寶鏡像里 https://npm.taobao.org/mirrors/node-sass 找到對應的版本的資料手動下載下載完后放在本地C:\Users\Administrator\AppData\Roaming\npm-cache\node-sass\4.14.1原创 2020-11-24 14:51:57 · 194 阅读 · 0 评论 -
electron 異常2-打包
1.打包異常Cannot compute electron version from installed node modules - none of the possible electron modules are installed.electron-builder --win原因是package.json里沒有設置依賴 "devDependencies": { "electron": "^11.0.2", "electron-builder": "^22.9.1原创 2020-11-20 13:48:07 · 5060 阅读 · 0 评论 -
electron 異常1 --運行electron .
1 unable to find Electron app at..Cannot find module...修改以下代碼后,依然不起作用//var app = require('app'); // 控制应用生命周期的模块。//var BrowserWindow = require('browser-window'); // 创建原生浏览器窗口的模块const electron = require('electron');const app = electron.app;con.原创 2020-11-20 10:32:43 · 1292 阅读 · 2 评论 -
Vue命令用不了
'vue' is not recognized as an internal or external command,operable program or batch file.重新安裝的NodeJS后,發現Vue命令不能用了解決方案,重新安裝安裝cnpmnpm install -g cnpm --registry=https://registry.npm.taobao.org安裝vuecnpm install vue -g安裝vue-clicnpm instal.原创 2020-11-20 08:16:31 · 6517 阅读 · 0 评论 -
nativefier 異常問題記錄及解決方案--封裝網頁
1.全局安裝nativefier,命令行輸入 npm install nativefier -g,當前已裝,不再執行了,2.安裝后查看版本 nativefier -v 當前最新版本 是10.1.5,安裝指定版本 npm install nativefier@^9.1.0 -g3.封裝網頁時(nativefier -n baidu www.baidu.com),卡了 版本10.1.5 ,可能是這個版本的問題 後續換了版本 9.1.0URL "www.baidu.com" lacks a原创 2020-11-17 16:34:37 · 2387 阅读 · 1 评论 -
Vue里實現Spliter的組件
效果代碼:使用組件代碼<template> <div id="app"> <div style="width:400px;height:300px;margin-left:200px;border:1px solid;overflow:visible;position:relative;"> <splitervbox> <template v-slot:leftBox>haha</te原创 2020-05-22 15:37:32 · 865 阅读 · 0 评论 -
在IE11瀏覽器上Element-UI的日期時間控件綁定的值不顯示,el-input組件不能輸入中文問題
環境上的問題win10IE11.657.18362版本11.0.175KB4537767第一個問題 el-date-picker和el-time-picker綁定的值不顯示<el-date-picker ref='_date1' v-model="form.date" :format="dateFormat" type="date" placeholder="选择日期...原创 2020-03-11 15:05:32 · 562 阅读 · 0 评论 -
element-ui升級后el-input採用:value綁定的值時,無法輸入
element-ui 2.3.8 版本的可以輸入element-ui 2.12.0不能輸入element-ui升級后el-input採用:value綁定的值時,無法輸入<el-input type="text" :value="inputvalue" title='ccc'></el-input>data () { re...原创 2019-10-29 11:34:31 · 1787 阅读 · 0 评论 -
ESlint 檢查項及其解決辦法
1.錯誤提示 ✘ http://eslint.org/docs/rules/no-trailing-spaces Trailing spaces not allowed src\App.vue:2:17 <div id="app"> 方案1.這句的意思是 在<div id="app">這行代碼後面存在空格,去掉空格方案2,調整規則,但是目前規則...原创 2018-12-04 16:46:44 · 1136 阅读 · 0 评论 -
跨域問題記錄
問題如上圖,提示說是跨域問題,一直沒有解決,先記錄下問題描述:.本機運行Vue項目里有個文件上傳功能,點擊上傳是服務器根本就沒有收到請求,在不同域下報錯,在同源域下正常運行,其他post請求數據的跨域都正常運行(服務器端只設定了 context.Response.AddHeader("Access-Control-Allow-Origin", "*");)網上解決方案一堆,都沒有解決...原创 2018-11-30 11:56:55 · 178 阅读 · 0 评论 -
axios 在IE瀏覽器存在的Bug
參考:https://blog.youkuaiyun.com/zhouzhenchina/article/details/77686320問題描述在IE瀏覽器 get請求出現第一請求時後臺收到請求,在參數和請求地址不變的情況,後面的請求後臺都沒有收到請求信號但是axios請求卻有值,且返回的值是第一請求的值原因是 IE浏览器提供的ajax对象在发送get请求时,会查看请求地址是否访问过,如果...原创 2018-12-12 17:06:40 · 245 阅读 · 0 评论 -
Vue.config.productionTip = false 是什麽意思
阻止启动生产消息,常用作指令。阻止启动生产消息 這又是什麽意思?看下效果Vue.config.productionTip = falseVue.config.productionTip = true 感覺多了一行信息...原创 2019-01-21 09:56:06 · 139312 阅读 · 7 评论 -
Vue使用說明備註
1.新建的Vue項目沒有高亮.參考https://blog.youkuaiyun.com/jiandan1127/article/details/79521885安裝Vetur,不起作用卸載重裝,還無用可以看下相關其他項 比如 Vetur E原创 2019-03-28 16:21:25 · 164 阅读 · 0 评论 -
Vue里使用Element UI的Tabs時el-tab-pane的隱藏和顯示
1.效果圖隱藏相關項后 <el-tabs v-model="selectTab" ref="tabs" type="border-card" tab-position="top" @tab-click="handleTabClick"> <el-tab-pane name="0" :label="$t('main.vie...原创 2019-04-26 11:22:55 · 32806 阅读 · 5 评论 -
Vue Element的坑 checked框跑到最後面了
1.<el-table>里面用uid的checked多選功能,選中框應該在最前面的配置 uid設置在第一個位置export default [{ name: "uid", type:"checked", cname: i18n.t(path + 'uid'), width:"40" },效果本應該是這樣的結果 選擇框跑到最後了...原创 2019-04-15 11:44:21 · 645 阅读 · 0 评论 -
Vue Router路由參數問題,修改,取消,加參數
通過Rooter跳轉網頁時,可能需要修改url參數或者取消url參數this.$router.push({path: '/login',query:{userid:'xxxx'} //傳遞參數});傳遞參數時,需要搞清楚window.location.search和window.location.hash的區別參考:https://www.jianshu.com/p/...原创 2019-04-29 12:10:03 · 444 阅读 · 0 评论 -
Vue axios請求配置項
來源 https://www.runoob.com/vue2/vuejs-ajax-axios.html{ // `url` 是用于请求的服务器 URL url: "/user", // `method` 是创建请求时使用的方法 method: "get", // 默认是 get // `baseURL` 将自动加在 `url` 前面,除非 `url` 是一个绝对 ...转载 2019-06-05 11:53:01 · 171 阅读 · 0 评论 -
Vue里採用XMLHttpRequest跨域問題
net.後臺程序添加,這些方法context.Response.AddHeader("Access-Control-Allow-Origin", "*");context.Response.AddHeader("Access-Control-Allow-Credentials", "true");context.Response.AddHeader("Access-Control-All...原创 2019-09-19 15:02:21 · 2075 阅读 · 0 评论 -
Vue 安裝
1.打开命令行窗口,输入 (注:要使用npm命令需要安装nodejs)npm install -g cnpm --registry=https://registry.npm.taobao.org碰到checkPermissions Missing write access这类问题的,大多是因为安装过一次导致的解决方案删除node_modules文件夹C:\Users\Adm...原创 2018-11-19 16:51:45 · 329 阅读 · 0 评论