elementUi中的级联选择器中显示暂无数据里加上loading

现在的情况是懒加载的位置在输入框那里而不是下拉框里,怎么把位置移到下拉框里,如下图

<el-cascader v-loading="this.treeLoading"  v-model="value" ref="cascaderAddr" :options="this.treedata" :props="optionProps" clearable
        @visible-change="getDirectory()" @change="setDirectory()" slot="empty"></el-cascader>
return{                treeLoading: false,}
getDirectory() {
                if(this.treedata==''){
                    this.treeLoading = true
                }else{}
              this.api({
                url: this.url,
                method: "get",
                data: "",
              }).then((res) => {
                this.treedata = res;
                this.treeLoading = false;
              })
            },

img

img


可以采用 element ui 的动态加载框啊

img


指定浮层的类名

可以采用服务的方式去调用loading,这时可以具体绑定到某一个指定的dom元素上。比如上面指定的浮层的class

img