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

@@ -216,8 +216,8 @@ export default {
/**
* 建立折線圖
* @param { object } chartData chart data
* @param { object } content titels
* @param { string } yUnit y 軸單位 date | count
* @param { object } content titels 標題文字
* @param { string } yUnit y 軸單位 'date' | 'count',可傳入以上任一。
*/
getLineChart(chartData, content, yUnit) {
let datasetsPrimary;
@@ -391,7 +391,7 @@ export default {
/**
* 建立長條圖
* @param { object } chartData chart data
* @param { object } content titels
* @param { object } content titels 文字標題
*/
getBarChart(chartData, content) {
const maxX = chartData.x_axis.max;
@@ -540,9 +540,9 @@ export default {
/**
* 建立水平長條圖
* @param { object } chartData chart data
* @param { object } content titels
* @param { object } content titels 標題的文字
* @param { boolean } isSingle 單個或雙數 activity
* @param { string } xUnit x 軸單位 date | count
* @param { string } xUnit x 軸單位 'date' | 'count',可傳入以上任一。
*/
getHorizontalBarChart(chartData, content, isSingle, xUnit) {
const maxY = chartData.y_axis.max;

View File

@@ -176,7 +176,7 @@ export default {
methods: {
/**
* switch map type
* @param {string} type processMap | bpmn
* @param {string} type 'processMap' | 'bpmn',可傳入以上任一。
*/
switchMapType(type) {
this.mapType = type;
@@ -184,7 +184,7 @@ export default {
},
/**
* switch curve style
* @param {string} style 直角 unbundled-bezier | taxi
* @param {string} style 直角 'unbundled-bezier' | 'taxi',可傳入以上任一。
*/
switchCurveStyles(style) {
this.curveStyle = style;
@@ -192,7 +192,7 @@ export default {
},
/**
* switch rank
* @param {string} rank 直向 TB | 橫向 LR
* @param {string} rank 直向 'TB' | 橫向 'LR',可傳入以上任一。
*/
switchRank(rank) {
this.rank = rank;
@@ -200,8 +200,8 @@ export default {
},
/**
* switch Data Layoer Type or Option.
* @param {string} e
* @param {string} type freq | duration
* @param {string} option 下拉選單中的選項
*/
switchDataLayerType(type, option){
this.dataLayerType = type;
@@ -210,7 +210,7 @@ export default {
},
/**
* switch trace id and data
* @param {string} id
* @param {event} e input 傳入的事件
*/
async switchTraceId(e) {
if(e.id == this.traceId) return;
@@ -223,7 +223,7 @@ export default {
},
/**
* 將 element nodes 資料彙整
* @param {object} type processMapData | bpmnData
* @param {object} type 'processMapData' | 'bpmnData',可傳入以上任一。
*/
setNodesData(mapData) {
let mapType = this.mapType;
@@ -315,7 +315,7 @@ export default {
},
/**
* 將 element edges 資料彙整
* @param {object} type processMapData | bpmnData
* @param {object} type 'processMapData' | 'bpmnData',可傳入以上任一。
*/
setEdgesData(mapData) {
let mapType = this.mapType;
@@ -346,7 +346,7 @@ export default {
},
/**
* create cytoscape's map
* @param {string} type this.mapType processMap | bpmn
* @param {string} type this.mapType 'processMap' | 'bpmn',可傳入以上任一。
*/
createCy(type) {
let graphId = document.getElementById('cy');

View File

@@ -213,8 +213,8 @@ export default {
/**
* 建立折線圖
* @param { object } chartData chart data
* @param { object } content titels
* @param { string } yUnit y 軸單位 date | count
* @param { object } content titels 標題文字
* @param { string } yUnit y 軸單位 'date' | 'count'
*/
getLineChart(chartData, content, yUnit) {
let datasets;
@@ -357,7 +357,7 @@ export default {
/**
* 建立長條圖
* @param { object } chartData chart data
* @param { object } content titels
* @param { object } content titels 標題文字
*/
getBarChart(chartData, content) {
const maxX = chartData.x_axis.max;
@@ -471,9 +471,9 @@ export default {
/**
* 建立水平長條圖
* @param { object } chartData chart data
* @param { object } content titels
* @param { object } content titels 標題文字
* @param { boolean } isSingle 單個或雙數 activity
* @param { string } xUnit x 軸單位 date | count
* @param { string } xUnit x 軸單位 'date' | 'count',可傳入以上任一。
*/
getHorizontalBarChart(chartData, content, isSingle, xUnit) {
const maxY = chartData.y_axis.max;

View File

@@ -369,7 +369,7 @@
},
/**
* 選擇該 files 進入 Discover/Compare/Design 頁面
* @param {object} file
* @param {object} file 該 file 的詳細資料
*/
enterDiscover(file){
let type;
@@ -409,8 +409,8 @@
},
/**
* Right Click DOM Event
* @param {event} event
* @param {string} file
* @param {event} event 該 file 的詳細資料
* @param {string} file file's name
*/
onRightClick(event, file) {
this.selectedType = file.type;
@@ -420,7 +420,7 @@
},
/**
* Right Click Table DOM Event
* @param {event} event
* @param {event} event 該 file 的詳細資料
*/
onRightClickTable(event) {
this.selectedType = event.data.type;
@@ -430,8 +430,8 @@
},
/**
* Right Click Gride Card DOM Event
* @param {event} event
* @param {number} index
* @param {event} event 該 file 的詳細資料
* @param {number} index 該 file 的 index
*/
onGridCardClick(file, index) {
this.selectedType = file.type;
@@ -441,10 +441,10 @@
},
/**
* File's Rename
* @param {string} type
* @param {number} id
* @param {string} source hover icon
* @param {string} fileName
* @param {string} type 該檔案的 type
* @param {number} id 該檔案的 id
* @param {string} source hover icon 該檔案的 icon
* @param {string} fileName file's name
*/
rename(type, id, source, fileName) {
if(type && id && source === 'list-hover') {
@@ -456,9 +456,9 @@
},
/**
* Delete file
* @param {string} type
* @param {number} id
* @param {string} source hover icon
* @param {string} type 該檔案的 type
* @param {number} id 該檔案的 id
* @param {string} source hover icon 該檔案的 icon
*/
async deleteFile(type, id, name, source) {
let srt = '';
@@ -516,9 +516,9 @@
},
/**
* Download file as CSV
* @param {string} type
* @param {number} id
* @param {string} source hover icon
* @param {string} type 該檔案的 type
* @param {number} id 該檔案的 id
* @param {string} source hover icon 該檔案的 icon
*/
download(type, id, source, name) {
if(type && id && source === 'list-hover' && name) {
@@ -555,7 +555,7 @@
this.$router.push({name: 'CompareDashboard', params: params});
},
/**
*
* Grid 模板時的篩選器
* @param {event} event choose columnType item
*/
getGridSortData(event) {

View File

@@ -85,6 +85,7 @@ export default {
methods: {
/**
* when input onChange value , isInvalid === false.
* @param {event} event input 傳入的事件
*/
changeHandler(event) {
let inputValue = event.target.value;

View File

@@ -25,8 +25,6 @@ export default {
getUserData,
}
},
methods: {
},
mounted() {
this.getUserData();
}

View File

@@ -143,7 +143,7 @@ export default {
uploadConfirm,
/**
* Rename 離開 input 的行為
* @param {Event} e
* @param {Event} e input 傳入的事件
*/
onBlur(e) {
const baseWidth = 20;
@@ -160,7 +160,7 @@ export default {
},
/**
* Rename 輸入 input 的行為
* @param {Event} e
* @param {Event} e input 傳入的事件
*/
onInput(e) {
const baseWidth = 20;
@@ -170,8 +170,8 @@ export default {
},
/**
* input 寬度隨著 value 響應式改變
* @param {String} text
* @param {Event} e
* @param {String} text file's name
* @param {Event} e input 傳入的事件
*/
getTextWidth(text, e) {
// 替換空格為不斷行的空格
@@ -190,7 +190,7 @@ export default {
},
/**
* 驗證,根據新的 selectedColumns 更新 informData 和 repeatedData
* @param {Array} data
* @param {Array} data 已選擇的 type 的 data
*/
updateValidationData(data) {
const nameOccurrences = {};