import { onMounted, ref, onBeforeUnmount, computed, reactive, watch } from 'vue'

export function onMountedWatch (route, path, onSearch, pagination = {}) {
	watch(
		() => route,
		(newVal) => {
			if (newVal.path == path) {
				onSearch({ current: pagination.current, pageSize: pagination.pageSize })
			}
		},
		{ immediate: true, deep: true }
	)
	return {}
}
