35 lines
729 B
Vue
35 lines
729 B
Vue
|
<template>
|
||
|
<custom-modal v-model="visible" title="Spectrum Comments" :okHandler="handleOk" :footer="isAdd ? undefined : null">
|
||
|
<a-textarea v-model="comments" :rows="8" :disabled="!isAdd"></a-textarea>
|
||
|
</custom-modal>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import ModalMixin from '@/mixins/ModalMixin'
|
||
|
export default {
|
||
|
mixins: [ModalMixin],
|
||
|
props: {
|
||
|
isAdd: {
|
||
|
type: Boolean,
|
||
|
default: true
|
||
|
}
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
comments: ''
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
// ModalMixin 中的生命周期方法
|
||
|
beforeModalOpen() {
|
||
|
this.comments = ''
|
||
|
},
|
||
|
handleOk() {
|
||
|
console.log('%c [ ]-26', 'font-size:13px; background:pink; color:#bf2c9f;', this.comments)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style></style>
|