###### tags: `會議紀錄` ###### Thunder: `A1 #日期轉換` `A1 #畫面display` ###### CodeReview: `筆記分享` `Debounce` ###### Announcement: ###### Attendee: 政儀、永佳、偉恩、弘翊、政儒 # 📌[R]2019/12/10前端會議 ## 踩雷事件 ### ⚡A1 #1 說明: 客戶在美國、登打日期與瀏覽頁日期不一致 問題: new Date()會根據目前的格林威治時間新增,用戶使用美國時間轉換導致差一天 :::success 日期轉換方法:CommonFn/convertBackEndDate2DateString ```typescript= /** * 後端日期 轉換 特定格式字串 * @param dateObj 日期物件 * @param format 格式 */ convertBackEndDate2DateString(backEndDate: string, format: string = 'YYYY/MM/DD'): string { if (typeof (backEndDate) !== 'string') { return ''; } const a = backEndDate.split(/[^0-9]/); const date = new Date(+a[0], +a[1] - 1, +a[2]); if (date && !isNaN(date.getTime())) { const dd = date.getDate(); const mm = date.getMonth() + 1; const yyyy = date.getFullYear(); return format.replace(/YYYY/g, `${yyyy}`).replace(/MM/g, `${(mm > 9 ? '' : '0') + mm}`).replace(/DD/g, `${(dd > 9 ? '' : '0') + dd}`); } else { return null; } } ``` ::: #2 說明: 程式撰寫 畫面問題 問題: 如果你的tags已經有display:,[hieedn]="true"就會無效,因為[hieedn]="true"代表display:"none"; ## 寫法交流 ### ⛏筆記分享 [a1worker主題說明書](https://hackmd.io/@c_pSsDGCQsOGTM6RJ6O2iw/rJRpe0Nar) [淺談HTML、CSS](https://hackmd.io/@c_pSsDGCQsOGTM6RJ6O2iw/HJ_Ow2_hB) [A1 Team Work System 動態載入 css 的方法](https://hackmd.io/@c_pSsDGCQsOGTM6RJ6O2iw/Bk2WNnohH) ::: info work-diary.component.ts的createHtmlStyleTags 先將scss轉成css放在靜態資料夾,透過程式創建css ```html <style>@import url(assets/themes/${你的主題名稱}Theme.css)</style> ``` ::: > [name=弘翊] ### ⛏Debounce [實力解析防抖動]([https://jinlong.github.io/2016/04/24/Debouncing-and-Throttling-Explained-Through-Examples/](https://jinlong.github.io/2016/04/24/Debouncing-and-Throttling-Explained-Through-Examples/)) ## 事情公告 ### 📢無事情公告