包装40%
This commit is contained in:
45
src/views/base/packagingPrintLog2/components/InputArea.vue
Normal file
45
src/views/base/packagingPrintLog2/components/InputArea.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="tableInner">
|
||||
<el-input
|
||||
v-if="list.isEdit"
|
||||
type="number"
|
||||
v-model="list[itemProp]"
|
||||
@blur="changeInput" />
|
||||
<span v-else>{{ list[itemProp] }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'InputArea',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
itemProp: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
watch: {
|
||||
injectData() {
|
||||
this.initData();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.list = this.injectData;
|
||||
},
|
||||
changeInput() {
|
||||
this.$emit('emitData', this.list);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user