refactor: #7090 for TreeSelect
parent
f36d6c0285
commit
bb57b0ae23
|
@ -132,7 +132,7 @@
|
|||
import { absolutePosition, addStyle, find, findSingle, focus, getFirstFocusableElement, getFocusableElements, getLastFocusableElement, getOuterWidth, isTouchDevice, relativePosition } from '@primeuix/utils/dom';
|
||||
import { isEmpty, isNotEmpty } from '@primeuix/utils/object';
|
||||
import { ZIndex } from '@primeuix/utils/zindex';
|
||||
import { ConnectedOverlayScrollHandler, UniqueComponentId } from '@primevue/core/utils';
|
||||
import { ConnectedOverlayScrollHandler } from '@primevue/core/utils';
|
||||
import ChevronDownIcon from '@primevue/icons/chevrondown';
|
||||
import TimesIcon from '@primevue/icons/times';
|
||||
import Chip from 'primevue/chip';
|
||||
|
@ -152,16 +152,12 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
id: this.$attrs.id,
|
||||
focused: false,
|
||||
overlayVisible: false,
|
||||
d_expandedKeys: this.expandedKeys || {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$attrs.id': function (newValue) {
|
||||
this.id = newValue || UniqueComponentId();
|
||||
},
|
||||
modelValue: {
|
||||
handler: function () {
|
||||
if (!this.selfChange) {
|
||||
|
@ -200,7 +196,6 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
this.updateTreeState();
|
||||
},
|
||||
methods: {
|
||||
|
@ -560,7 +555,7 @@ export default {
|
|||
return !this.options || this.options.length === 0;
|
||||
},
|
||||
listId() {
|
||||
return this.id + '_list';
|
||||
return this.$id + '_list';
|
||||
},
|
||||
hasFluid() {
|
||||
return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;
|
||||
|
|
Loading…
Reference in New Issue