This commit is contained in:
Harvey committed 2020-09-04 08:56:09 +08:00
1 parent cf119d4dc5
commit 11cf4f4455
8 files changed
+44 -37

No files matched your search

+2 -1
View File
@@ -30,7 +30,8 @@ export default class Component {
}
}
add(option) {
add(getOption) {
const option = typeof getOption === 'function' ? getOption(this.art) : getOption;
if (!this.$parent || !this.name || option.disable) return;
const name = option.name || `${this.name}${this.id}`;
errorHandle(!has(this, name), `Cannot add an existing name [${name}] to the [${this.name}]`);