33 lines
677 B
Vue
33 lines
677 B
Vue
<template>
|
|
<custom-modal v-model="visible" title="Ratio" :width="240" :okHandler="handleOk">
|
|
<a-input-number :min="1" v-model="ratio"></a-input-number>
|
|
</custom-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import ModalMixin from '@/mixins/ModalMixin'
|
|
export default {
|
|
mixins: [ModalMixin],
|
|
data() {
|
|
return {
|
|
ratio: 1
|
|
}
|
|
},
|
|
methods: {
|
|
handleOk() {
|
|
console.log('%c [ ]-14', 'font-size:13px; background:pink; color:#bf2c9f;', this.ratio)
|
|
if(!this.ratio) {
|
|
this.$message.warn('Ratio Cannot Be Null')
|
|
throw new Error('Ratio Empty')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.ant-input-number {
|
|
width: 100%;
|
|
}
|
|
</style>
|