cell-deliver.vue 1.06 KB
<template>
    <div class="cell-deliver">
        <p class="row">
            发货<span class="num">
                <Input v-model="deliver" placeholder="数量"></Input>
            </span>
        </p>
        <p class="row">已发数:{{shipNum}}</p>
    </div>
</template>

<script>
    export default {
        name: 'cell-deliver',
        props: {
            rowIndex: {
                type: Number
            },
            shipNum: {
                type: [String, Number]
            }
        },
        data() {
            return {
                deliver: ''
            };
        },
        watch: {
            deliver(value) {
                this.$emit('deliver-change', {
                    value,
                    index: this.rowIndex
                });
            }
        }
    };
</script>

<style lang="scss" scoped>
    .cell-deliver {
        text-align: left;

        .row {
            margin: 10px 0;
        }

        .num {
            display: inline-block;
            width: 50px;
            padding-left: 5px;
        }
    }

</style>