WebStorm

WebStorm开发Vue项目

蹲街弑〆低调 提交于 2020-01-31 01:12:31
先搭建开发环境,在上一篇文章中有介绍 1.新建项目 然后下面这一段可能会比较久 是否选择vue-router,这里我们选择是,待会后面会用到 是否使用eslint检查,这里我们选择否 是否选择单元测试,这里我们也选择否 是否选择e2e测试,这里我们选择是 是否使用npm包管理器 然后项目就搭建完成了,接下来我们需要选择安装包 假如您的网速比较慢的话,我们可以在控制台中输入 cnpm install 当所有安装包下载完成之后我们就可以启动我们的项目了 在地址拦输入http://localhost:8088,如何出现如下界面,那么恭喜你搭建成功了 接下来,我们对vue-cli中的各个项目进行分析,方便我们以后的开发中能够更好的进行管理 项目目录: |-- build // 项目构建(webpack)相关代码 | |-- build.js // 生产环境构建代码 | |-- check-version.js // 检查node、npm等版本 | |-- dev-client.js // 热重载相关 | |-- dev-server.js // 构建本地服务器 | |-- utils.js // 构建工具相关 | |-- webpack.base.conf.js // webpack基础配置 | |-- webpack.dev.conf.js // webpack开发环境配置 | |--

基于WebStorm记录得HTML--Event(一)事件

房东的猫 提交于 2020-01-26 23:14:36
1.1 事件 事件:是可以被 js 检测到的行为,实质上是一种交互操作。 例如:我们可以给某按钮添加一个 【 onClick 点击事件 】 ,当用户对按钮发生点击时来触发某个函数。 事件的作用: (1) 各个元素之间可以借助事件来进行交互 (2) 用户和页面之间也可以通过事件来交互 (3) 后端和页面之间也可以通过事件来交互(减缓服务器的压力) ps :注意:事件通常与函数配合使用,当事件发生时函数才会执行。 1.2 事 件传播 / 事件传递 / 事件流 一个事件发生后,会在子元素和父元素之间传播( propagation )。这种传播分成三个阶段 第一阶段:从window对象传导到目标节点(上层传到底层),称为“捕获阶段”( capture phase )。 第二阶段:在目标节点上触发,称为“目标阶段”(target phase )。 第三阶段:从目标节点传导回window 对象(从底层传回上层),称为“冒泡阶段”( bubbling phase )。 w3c 规定:事件冒泡 + 事件捕获 + 事件真正的触发者等各个分支构成了 js 的事件机制。 ps :如没有特殊情况,均采用事件冒泡。 ps : HTML 事件采用冒泡机制来处理事件。即 点击 d2 时会先执行 d2 的绑定事件(即执行 test2 函数)。 然后采用事件冒泡将事件传递给上一级 DOM 节点 d1 ,然后 d1

How to disable WebStorms unused function color feature?

北城以北 提交于 2020-01-24 14:09:08
问题 I was wondering if anything knows how to disable the feature in WebStorm where if you create a function and don't call it yet, the color will just stay green and not gray. I went inside the preferences area and changed my global function colors to green but they only turn green if I call them. For any uncalled functions will stay gray. 回答1: Go to File -> Settings... Open Editor -> Colors & Fonts -> General Save the current scheme as a custom one expand Errors and Warnings on the right change

Semantic-ui-vue components not recognized by WebStorm

杀马特。学长 韩版系。学妹 提交于 2020-01-24 03:51:06
问题 I'm using WebStorm as my IDE and normally Vue components are recognized as valid HTML tags, however the components of this integration aren't. Anyone any ideas on how to fix this? App.vue <template> <div id="app"> <sui-menu fixed inverted> <sui-container> <a href="#" is="sui-menu-item" class="header"> <img src="/src/assets/logo.png" class="logo"> Project Name </a> <a is="sui-menu-item" href="#">Home</a> </sui-container> </sui-menu> <sui-container class="main" text> <sui-header size="huge"

GitHub webstorm 及 README.md 姿势

可紊 提交于 2020-01-23 10:55:19
README.md 语法格式: 规范的README文件开头都写上一个标题,这被称为大标题。 标题: #一级标题 ##二级标题 ###三级标题 ####四级标题 #####五级标题 ######六级标题 超链接 : [百度](http://www.baidu.com) 单行文本: 使用两个Tab符实现单行文本。 多行文本 多行文本和单行文本异曲同工,只要在每行行首加两个Tab 部分文字高亮 把它用 ` ` 包围起来。注意这不是单引号,而是Tab上方,数字1左边的按键(注意使用英文输入法)。 前面有圆点符号 * xxx 注意*后面有一个空格 插入图片 ![](https://github.com/liuqiuchen/ImageCache/raw/master/Logo/foryou.gif) 给图片加上超链接 [![baidu]](http://baidu.com) [baidu]:http://www.baidu.com/img/bdlogo.gif "百度Logo" 插入代码片段 在代码的上一行和下一行用 ``` 标记 注意 ``` 是tab键上面的,不是单引号! GitHub webstorm 版本控制代码: 另一种方式: 调试: 来源: https://www.cnblogs.com/lqcdsns/p/5504451.html

Error when saving in Web Storm (Permission Denied)

 ̄綄美尐妖づ 提交于 2020-01-23 06:50:08
问题 When I click save in Web Storm I get the following Error: Could not save project: java.io.FileNotFoundException:/Applications/XAMPP/xamppfiles/htdocs/[myFileName]/.idea/workspace.xml~ (Permission denied) As far as I can tell my changes are being saved. Can any one tell me what's causing this and if it's something I need to be concerned about. 来源: https://stackoverflow.com/questions/12733824/error-when-saving-in-web-storm-permission-denied

Efficient usage of WebStorm IDE

你说的曾经没有我的故事 提交于 2020-01-22 05:10:30
问题 I've recently fallen in love in WebStorm as an IDE for JavaScript development. The problem is, I come from a world of vim and lightweight editors, so I probably can't fully appreciate all the power that comes with IDE. Yes, I've seen the presentations and read the docs, but there's a lot of features and I'm not sure which of them are truly useful. So, here goes my question: how do you use WebStorm and what do you find most useful? Any power-usage tips? Configuration hacks? Plugins worth

webstorm部署vue项目

拟墨画扇 提交于 2020-01-19 01:44:00
webstorm部署vue项目 一、安装Vue CLI 1.安装Node.js 二、构建前端项目 1.进入工作目录 2.生成项目目录 3.启动项目 三、把项目导入webstorm 这篇文章主要介绍一下如何用webstorm部署一个vue项目。 我的操作系统是Windows,其他系统略有不同。 一、安装Vue CLI 1.安装Node.js 去 官网 下载最新的LTS版本。 下载完成后直接进行安装,需要注意的是在安装的过程中要注意把Nodejs添加到环境变量。 安装完成后在cmd中输入 node -v ,判断安装是否成功。 然后输入 npm -g install npm ,把npm更新到最新的版本。 最后,运行 npm install -g vue-cli 安装vue的命令行工具。 二、构建前端项目 1.进入工作目录 这里选择一个你的工作目录,因为我这里是准备把项目部署到webstorm上,所以就把工作目录直接选在webstorm的工程文件夹下。 2.生成项目目录 vue init webpack YOUR_PROJECT_NAME 3.启动项目 然后进入新创建的目录,运行 npm run dev 启动项目 进入生成的链接,可以看到 到这里项目就成功运行成功了,接下来把项目导入到webstrom里就可以了。 三、把项目导入webstorm 在webstorm里也可以直接右键

How to import js-modules into TypeScript file?

你说的曾经没有我的故事 提交于 2020-01-18 15:53:13
问题 I have a Protractor project which contain such a file: var FriendCard = function (card) { var webElement = card; var menuButton; var serialNumber; this.getAsWebElement = function () { return webElement; }; this.clickMenuButton = function () { menuButton.click(); }; this.setSerialNumber = function (numberOfElements) { serialNumber = numberOfElements + 1; menuButton = element(by.xpath('.//*[@id=\'mCSB_2_container\']/li[' + serialNumber + ']/ng-include/div/div[2]/i')); }; this.deleteFriend =

How to import js-modules into TypeScript file?

☆樱花仙子☆ 提交于 2020-01-18 15:51:49
问题 I have a Protractor project which contain such a file: var FriendCard = function (card) { var webElement = card; var menuButton; var serialNumber; this.getAsWebElement = function () { return webElement; }; this.clickMenuButton = function () { menuButton.click(); }; this.setSerialNumber = function (numberOfElements) { serialNumber = numberOfElements + 1; menuButton = element(by.xpath('.//*[@id=\'mCSB_2_container\']/li[' + serialNumber + ']/ng-include/div/div[2]/i')); }; this.deleteFriend =