原创 Vue之Props

1. Prop寫法 在DOM模板中使用時,要使用橫線分隔,如下的 post-title Vue.component('blog-post', { // camelCase in JavaScript props: ['po

原创 Vue之處理邊界情況

處理邊界情況 All the features on this page document the handling of edge cases,meaning unusual situations that sometimes

原创 ECMAScript2015文檔概述

4、概述 Overview ECMAScript is an object-oriented programming language for performing computations and manipulating

原创 ECMAScript 2015 Features - Babel

ECMAScript 2015 Features - Babel 1. 箭頭函數和this Unlike functions, arrows share the same lexical _this _as their surr

原创 Vue插槽的那些事兒

2.4 插槽 1. 插槽內容 插槽可以包含任意的模板代碼,包括html,甚至其他組件。 如下:<slot></slot> 在渲染時將被替換成組件<text-document> 之間的所有內容 完整代碼 2. 編譯作用域 插槽裏插

原创 Vue之過渡動畫(一)

3.1、進入/離開 & 列表過渡 1. Overview Vue provides a variety of ways to apply transition effects when items are inserted,

原创 用正則表達式限制input輸入框只能輸入整數的一段簡單代碼

要實現input框只能輸入正整數,如果檢測到輸入其他類型的數據就直接爲0;代碼如下: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title

原创 掌握React的基本使用,重塑前端開發

1. Handling Events Html中處理添加事件: <a href="#" onclick="console.log('The link was clicked.'); return false"> Click m

原创 搞懂React的state和生命週期函數(lifecycle methods)

State and Lifecycle 何謂state A component needs state when some data associated with it changes over time. For examp

原创 Components make life easier(組件複用讓生活更美好)

Components and Props Conceptually, components are like JavaScript functions. They accept arbitrary inputs (called

原创 React中的JSX和React elements的概念

Introducing JSX JSX語法實際上是在創建對象,產生的對象稱爲React elements; 對這些React elements進行渲染,構建出DOM const element = ( <h1 cl

原创 React的渲染element(做最少的DOM操作)

Rendering Elements An element describes what you want to see on the screen. 原則:儘可能少的操作DOM 如下面react官網的例子就是很好的說明: f

原创 Git分支管理和常見的分支工作流

1. Branch Management 查看分支 git branch 查看分支並顯示每個分支最後一次提交 $ git branch -v iss53 93b412c Fix javascript issue *

原创 Git如何管理遠程倉庫分支?

It’s important to note that when you do a fetch that brings down new remote-tracking branches, you don’t automatic

原创 一圖弄懂Git rebase

兩種合併分支的方式:merge,rebase With the rebase command, you can take all the changes that were committed on one branch and