This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import loadImage from 'blueimp-load-image' | |
| const VueImageAutoRotate = { | |
| install (Vue, options) { | |
| Vue.directive('auto-rotate', { | |
| bind (el, binding, vnode) { | |
| if (vnode.tag !== 'img') { | |
| console.error('Warning: auto-rotate directive valid in img tag.') | |
| } else { | |
| const imageUrl = vnode.elm.src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <video ref="video" v-bind="$attrs" muted controls preload="metadata" :poster="poster" v-on="$listeners"> | |
| <source v-if="isHls" :src="videoUrl" type="application/x-mpegURL" /> | |
| <source v-else :src="videoUrl" type="video/mp4"> | |
| </video> | |
| </template> | |
| <script> | |
| import Hls from 'hls.js' | |
| export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 性別 - 定数 | |
| */ | |
| export const SEX_TYPES = { | |
| MALE: '1', | |
| FEMALE: '2' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <el-date-picker | |
| v-model="until_date" | |
| type="date" | |
| placeholder="日付を選択" | |
| @change="until_date = $moment($event).endOf('day').format()"> | |
| </el-date-picker> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * src/api/http.js | |
| */ | |
| import axios from 'axios' | |
| import qs from 'qs' | |
| /** | |
| * | |
| * parse error response | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { withParams } from 'vuelidate/lib/validators/common' | |
| import isFinite from 'lodash/isFinite' | |
| import toNumber from 'lodash/toNumber' | |
| export default withParams({ type: 'number' }, value => { | |
| return isFinite(toNumber(value)) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ref, withParams } from 'vuelidate/lib/validators/common' | |
| import toNumber from 'lodash/toNumber' | |
| const numericExpr = /^[0-9]*$/ | |
| export default biggerThan => withParams( | |
| { type: 'biggerThan', bg: biggerThan }, | |
| function (value, parentVm) { | |
| if (numericExpr.test(value) && numericExpr.test(ref(biggerThan, this, parentVm))) { | |
| return toNumber(value) > toNumber(ref(biggerThan, this, parentVm)) | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # feat (feature) | |
| # fix (bug fix) | |
| # docs (documentation) | |
| # style (formatting, missing semi colons, …) | |
| # refactor | |
| # test (when adding missing tests) | |
| # chore (maintain) | |
| feat(scope)[#x] title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install rename | |
| rename 's/(.+).html.markdown$/$1.md/' *.html.markdown |