biome format --write
This commit is contained in:
parent
8372348148
commit
9262e803ec
415 changed files with 54076 additions and 17419 deletions
|
|
@ -1,49 +1,49 @@
|
|||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faCircleNotch,
|
||||
faTimes
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { faCircleNotch, faTimes } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
library.add(
|
||||
faCircleNotch,
|
||||
faTimes
|
||||
)
|
||||
library.add(faCircleNotch, faTimes)
|
||||
|
||||
const Importer = {
|
||||
props: {
|
||||
submitHandler: {
|
||||
type: Function,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
submitButtonLabel: { type: String },
|
||||
successMessage: { type: String },
|
||||
errorMessage: { type: String }
|
||||
errorMessage: { type: String },
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
file: null,
|
||||
error: false,
|
||||
success: false,
|
||||
submitting: false
|
||||
submitting: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change () {
|
||||
change() {
|
||||
this.file = this.$refs.input.files[0]
|
||||
},
|
||||
submit () {
|
||||
submit() {
|
||||
this.dismiss()
|
||||
this.submitting = true
|
||||
this.submitHandler(this.file)
|
||||
.then(() => { this.success = true })
|
||||
.catch(() => { this.error = true })
|
||||
.finally(() => { this.submitting = false })
|
||||
.then(() => {
|
||||
this.success = true
|
||||
})
|
||||
.catch(() => {
|
||||
this.error = true
|
||||
})
|
||||
.finally(() => {
|
||||
this.submitting = false
|
||||
})
|
||||
},
|
||||
dismiss () {
|
||||
dismiss() {
|
||||
this.success = false
|
||||
this.error = false
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default Importer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue