tag edit
This commit is contained in:
parent
b6332a3e12
commit
ba577aec52
7 changed files with 285 additions and 192 deletions
41
src/components/confirm_modal/text_confirm.js
Normal file
41
src/components/confirm_modal/text_confirm.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import ConfirmModal from './confirm_modal.vue'
|
||||
//import Select from 'src/components/select/select.vue'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String
|
||||
},
|
||||
message: {
|
||||
type: String
|
||||
},
|
||||
cancelText: {
|
||||
type: String
|
||||
},
|
||||
confirmText: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
emits: ['hide', 'show', 'action'],
|
||||
data: () => ({
|
||||
showing: false,
|
||||
text: ""
|
||||
}),
|
||||
components: {
|
||||
ConfirmModal
|
||||
},
|
||||
methods: {
|
||||
show () {
|
||||
this.showing = true
|
||||
this.$emit('show')
|
||||
},
|
||||
hide () {
|
||||
this.showing = false
|
||||
this.$emit('hide')
|
||||
},
|
||||
doWithText () {
|
||||
this.$emit('action', this.text)
|
||||
this.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
27
src/components/confirm_modal/text_confirm.vue
Normal file
27
src/components/confirm_modal/text_confirm.vue
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<ConfirmModal
|
||||
v-if="showing"
|
||||
:title="title"
|
||||
:cancel-text="cancelText"
|
||||
:confirm-text="confirmText"
|
||||
@accepted="doWithText"
|
||||
@cancelled="hide"
|
||||
>
|
||||
<template #default>
|
||||
<span v-text="message" />
|
||||
<input
|
||||
v-model="text"
|
||||
class="input string-input filter-input"
|
||||
>
|
||||
</template>
|
||||
</ConfirmModal>
|
||||
</template>
|
||||
|
||||
<script src="./text_confirm.js" />
|
||||
|
||||
<style lang="scss">
|
||||
.expiry-amount {
|
||||
width: 4em;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue