站点的修改

This commit is contained in:
熊丽君
2022-01-19 13:41:07 +08:00
parent a35876764c
commit 122a16e856
4 changed files with 35 additions and 12 deletions

View File

@ -1,7 +1,7 @@
<template>
<el-cascader
size="small"
style="width: 240px"
:size="size"
:style="{ width: limitWidth ? '240px' : '100%' }"
v-model="tenant_id"
clearable
separator="-"
@ -16,6 +16,14 @@ import { tenantSelect } from "@/api/subPlatform/tenant";
export default {
props: {
value: String,
size: {
type: String,
default: "small",
},
limitWidth: {
type: Boolean,
default: true,
},
},
data() {
return {
@ -24,12 +32,15 @@ export default {
};
},
watch: {
value(newVal, oldVal) {
if (newVal == "") {
this.tenant_id = undefined;
} else {
this.tenant_id = newVal;
}
value: {
handler(newVal, oldVal) {
if (newVal == "") {
this.tenant_id = undefined;
} else {
this.tenant_id = newVal;
}
},
immediate: true,
},
tenant_id(newVal, oldVal) {
this.$emit("handleChange", newVal);