Document My Library – Module FE
Contents
1. File
1.1 dataURLtoFile
dataURLtoFile(dataurl, filename)
Description: | parse base64 to file like input form |
Response: | File |
Params: | – filename: Ex: test.jpg |
2. Time
2.1 getYears
getYears(from, to, select = false)
Description: | data years from->to |
Response: | Array |
Params: | – Select: | true return type item { value: 1, name: ‘1’} else only number |
2.2 getMonths
getMonths(from = 1, to = 12, select = false)
Description: | data month from->to |
Response: | Array |
Params: | – Select: | true return type item { value: 1, name: ‘1’} else only number |
2.3 getHours
getHours(from = 0, to = 23, select = false)
Description: | data hour from->to |
Response: | Array |
Params: | – Select: | true return type item { value: 1, name: ‘1’} else only number |
2.4 getMinutes
getMinutes(step = 5, select = false)
Description: | data minutes 0 – 59 by step |
Response: | Array |
Params: | – Select: | true return type item { value: 1, name: ‘1’} else only number |
2.5 daysInMonth
daysInMonth(dateString, subName = true, select = false)
Description: | data days in month |
Response: | Array |
Params: | – dateString date type string exp: 1990-01-01 – subName: name have ” 日” in response item – Select: | true return type item { value: 1, name: ‘1’} else only number |
2.6 formatDate
formatDate(date)
Description: | exp: 1990-01-01 -> 1990年1月1 |
Response: | String |
3. Validate
3.1 checkOnlyNumber
checkOnlyNumber(string)
Description: | check only number of string |
Response: | Boolean true => is number else not number |
4. Other
4.1 scrollToTop
scrollToTop(top = 0)
Description: | handle scroll to top |
Response: | Action scoll to top |
4.2 stripHtml
stripHtml(html)
Description: | strip html |
Response: | String |
4.3 convertBase64
convertBase64(val)
Description: | text to base64 |
Response: | String |
5. Vue 2
6. Vue 3
6.1 SpinnerV3
<SpinnerV3 :loading="loading" />
Description: | Component for loading |