|
@@ -109,6 +109,19 @@ export default {
|
|
|
return multiple ? "" : value;
|
|
|
},
|
|
|
set(val) {
|
|
|
+ // const {
|
|
|
+ // $props: { source, dataMapping, multiple },
|
|
|
+ // } = this;
|
|
|
+ // if (!multiple) {
|
|
|
+ // for (let key in dataMapping) {
|
|
|
+ // if (dataMapping[key] === "id" || dataMapping[key] === "code") {
|
|
|
+ // if (source[key] && source[key] !== "") {
|
|
|
+ // source[key] = undefined;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
this.$emit("input", val);
|
|
|
},
|
|
|
},
|
|
@@ -127,10 +140,10 @@ export default {
|
|
|
},
|
|
|
innerValue: {
|
|
|
handler: function (newValue) {
|
|
|
+ const {
|
|
|
+ $props: { source, dataMapping, multiple },
|
|
|
+ } = this;
|
|
|
if (!newValue) {
|
|
|
- const {
|
|
|
- $props: { source, dataMapping },
|
|
|
- } = this;
|
|
|
for (let key in dataMapping) {
|
|
|
source[key] = undefined;
|
|
|
}
|
|
@@ -345,6 +358,7 @@ export default {
|
|
|
@clear="handleClear"
|
|
|
@change="handleChange"
|
|
|
@keyup.enter.native="handleChange"
|
|
|
+ @keyup.delete.native="handleKeyupDel"
|
|
|
>
|
|
|
<i :size="size" class="el-icon-search" slot="suffix" @click="open"> </i>
|
|
|
</el-input>
|
|
@@ -359,7 +373,6 @@ export default {
|
|
|
:fetch-suggestions="useAutocomplete"
|
|
|
@blur="useBlur"
|
|
|
@select="useConfirm([$event])"
|
|
|
- @keyup.delete.native="handleKeyupDel"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
<i :size="size" class="el-icon-search" slot="suffix" @click="open"> </i>
|