Commit 50f79195 authored by 周远喜's avatar 周远喜

修改好了

parent 62ea2bf5
......@@ -2,37 +2,37 @@
<template>
<div class="input-code">
<Input v-model="codeValue" clearable required>
<Button
slot="append"
@click="codeClick"
>生成编号</Button
>
<Button slot="append" @click="codeClick">生成编号</Button>
</Input>
</div>
</template>
<script>
import Api from "./api";
export default {
name:"inputCode",
data() {
return {
codeValue: "",
codeValue: this.value,
select: "",
};
},
model: {
prop: "value",
event: "on-change"
model: {
prop: "value",
event: "on-change",
},
props: {
value:[String],
code: {
type: String,
default: "",
},
props: {
code:{
type:String,
default:""
type: {
type: String,
},
type:{
type:String
}
},
mounted() { },
mounted() {
// this.codeValue=this.value;
},
methods: {
// 生成临时编号code
getSerialcode() {
......@@ -41,10 +41,7 @@ export default {
}).then((r) => {
if (r.result) {
this.codeValue = r.result[0];
this.$emit(
"on-change",
this.codeValue
);
this.$emit("on-change", this.codeValue);
}
});
},
......@@ -55,7 +52,7 @@ export default {
watch: {
value(v) {
this.codeValue = v;
}
},
},
};
</script>
......
......@@ -15,6 +15,9 @@
<p>
<Tree :data="result"></Tree>
</p>
<p>
<inputCode v-model="data"/>
</p>
</div>
</template>
......@@ -27,6 +30,7 @@ export default {
data() {
return {
model: [],
data:"ddd",
result: [
{
title: "五二九纵",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment