docs: Update all files JSDoc.

This commit is contained in:
chiayin
2024-03-29 15:49:05 +08:00
parent 4ba71d1193
commit e391c9a237
55 changed files with 260 additions and 219 deletions

View File

@@ -148,12 +148,15 @@ export default {
},
},
methods: {
/**
* 關閉選單視窗
*/
onClose () {
this.openTimeSelect = false;
},
/**
* get focus element
* @param {event} event
* @param {event} event input 傳入的事件
*/
onFocus(event) {
this.lastInput = event.target;
@@ -161,7 +164,7 @@ export default {
},
/**
* when blur update input value and show number
* @param {event} event
* @param {event} event input 傳入的事件
*/
onBlur(event) {
let baseInputValue = event.target.value;
@@ -202,7 +205,7 @@ export default {
},
/**
* 上下箭頭時的行為
* @param {event} event
* @param {event} event input 傳入的事件
*/
onKeyUp(event) {
event.target.value = event.target.value.replace(/\D/g, '');
@@ -213,9 +216,9 @@ export default {
},
/**
* 上下箭頭時的行為
* @param {element} input
* @param {number} goUp
* @param {boolean} selectIt
* @param {element} input input 傳入的事件
* @param {number} goUp 上箭頭的鍵盤代號
* @param {boolean} selectIt 是否已執行
*/
actionUpDown(input, goUp, selectIt = false) {
const tUnit = input.dataset.tunit;
@@ -291,8 +294,8 @@ export default {
},
/**
* 設定 dhms 的數值
* @param {number} totalSeconds
* @param {string} size
* @param {number} totalSeconds 總秒數
* @param {string} size 'min' | 'max',可選以上任一,最大值或最小值
*/
secondToDate(totalSeconds, size) {
totalSeconds = parseInt(totalSeconds);