fix: polling doesnot resumed after router.push
This commit is contained in:
@@ -51,12 +51,9 @@ watch(show, (newValue) => {
|
||||
|
||||
const searchPattern = ref('');
|
||||
const searchFilter: (pattern: string, node: TreeOption) => boolean = (pattern, node) => {
|
||||
if (node.children) {
|
||||
return node.children.some((child) => searchFilter(pattern, child));
|
||||
}
|
||||
const device = node['device'] as NdmDeviceVO;
|
||||
const { name, ipAddress } = device;
|
||||
return name?.includes(pattern) || ipAddress?.includes(pattern);
|
||||
return (name ?? '').includes(pattern) || (ipAddress ?? '').includes(pattern);
|
||||
};
|
||||
|
||||
const offlineDeviceCount = computed(() => {
|
||||
@@ -89,6 +86,8 @@ const nodeProps = ({ option }: { option: TreeOption }) => {
|
||||
return {
|
||||
ondblclick: () => {
|
||||
if (option.isLeaf) {
|
||||
const queryControlStore = useQueryControlStore();
|
||||
queryControlStore.enablePolling();
|
||||
const device = option['device'] as NdmDeviceVO;
|
||||
router.push({
|
||||
path: '/device',
|
||||
|
||||
Reference in New Issue
Block a user