Implementing Remote Search and Dynamic Loading with Vue and Element UI's el-select
When using Element UI's el-select, if there are too many option, loading all at once can cause page lag and white screen on dropdown click. We can implement dynamic loading with a custom directive.
First, define a global diretcive in main.js:
Vue.directive('infinite-scroll', {
bind(el, binding) {
const scrollContainer = el.querySelector(' ...
Posted on Thu, 04 Jun 2026 16:16:06 +0000 by bri0987