Javascript
【bootstrap-table】相關連結
bootstap-table 官網 bootstrap table filterBy数据刷选过滤器和查询条件 - itxst.com
【Bootstrap-table】bs_table_common.js
var bootstrapTableBaseConfig = { height: getHeight(), idField:"dv_no", toolbar:"...
【ES6】其他新語法
預設值 function sum(a, b = 1) { // 加入預設值避免錯誤 return a + b; } console.log(sum(1));
【ES6】物件拷貝
淺層拷貝(只複製一層,內容物件還是參考至同一位址) const person = { name: '小明', obj: {} } const person2 = {...p...
【ES6】物件拷貝
淺層拷貝(只複製一層,內容物件還是參考至同一位址) const person = { name: '小明', obj: {} } const person2 = {...p...
【ES6】非同步 與 promise
非同步 function getData() { setTimeout(() => { console.log('... 已取得遠端資料'); }, 0); } //...
【ES6】展開
合併陣列 const groupA = ['小明', '杰倫', '阿姨']; const groupB = ['老媽', '老爸']; const groupC = [...groupA...
【ES6】陣列方法
https://www.youtube.com/watch?v=_vFuDQ_6Xt8
【ES6】箭頭函式
改寫原 functoin // 傳統寫法 function fn(a, b) { return a * b; } // 箭頭函式 const fn = (a, b) => { ...
【ES6】賦值解構
取出特定值作為變數 // #1 取出特定值作為變數 const person = { name: '小明', age: 16, like: '鍋燒意麵' } const...
【ES6】async / await
使用方式 // #1 當資料有順序性的時候 const fn1 = () =>{ axios.get("https://randomuser.me/api/") .then((r...
【ES6】ESModual
什麼樣的匯出對應什麼樣的匯入 預設匯入(一個匯出檔只能有一個) 常見的匯出方式,通常用於匯出物件,在 React 開發中可用來匯出元件 /** 匯出頁 exportDefa...
【ES6】import / export
匯入的類型要看匯出的形式,所以我用匯入方式來說明 使用default 匯出 匯入就可以取任何名稱 import fn from './func.js'; fn(); // 匯出檔案 f...
【JS】相關資源
教學 现代 JavaScript 教程
【JS】iframe 自適應內容高度
<script type="text/javascript"> function SetCwinHeight() { var iframeid = document.getEl...
【ES6】null 判斷
https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Optional_chaining ...
【Tool】常用方法
*判斷為空 const isEmpty = (val) => { // null or undefined if (val == null) return true; ...