template結構
繫結v-loadmore
v-if=
"ruleforms.allocationmode == 1"
label=
"合作接收方:"
prop=
"receiveuserid"
class
="contents-is-require cooperationtype cooperationacceptor"
>
v-model=
"ruleforms.receiveusername"
v-loadmore
class
="contents-beiyong-select"
filterable
value-key=
"mchuserid"
remote
reserve-keyword
placeholder=
"請輸入合作接收方號碼/工號/姓名進行搜尋"
:remote-method=
"remotemethod"
:loading=
"selectloading"
popper-
class
="select-remote"
clearable
data-tid=
"receiveuserid"
@change=
"selectchangehandle"
@blur=
"handleblue"
>
v-for=
"(item, index) in peoplelist"
:key=
"item.mchuserid"
:label=
"item.username + '(' + item.usercenterno + ')'"
:value=
"item"
:data-tid=
"'value' + index"
>
<
/el-option>
<
/el-select>
export
default
, directives:}}
);},
},},
data()
, defaultpeoplelist:
,//搜尋人員預設列表
peoplelist:
,//合作接收人請求列表
selectloading:
false
, openedflag:
false
, optionpage:1,
//下拉框頁數
optionkey:'',
//下拉框關鍵字
optionflag:
false
,//滾動載入};
}, methods:
,// 'default',if(
!flag)
return
;this
.openedflag = flag;},
/** * @description 合作接收方搜尋選中方法
*/selectchangehandle
(val)
this
.ruleforms.mchuserid = val.mchuserid;
/*此處receiveuserid需要修改*/
this
.ruleforms.receiveusername = val.username;
this
.ruleforms.receiveuserid = val.mchuserid;},
/** * @description 遠端搜尋合作接收方
*/remotemethod
(keyword)
,//獲取合作接收方人員list
vue之自定義指令
1.如何自定義乙個指令?在export模板中加入directives選項 比如 directives bind el bind 像這樣的inserted,bind稱為鉤子函式,裡面的引數 el 代表當前指令被繫結的元件 bind 代表當前指令所繫結的元件的一些值,通常我們列印這兩個引數時,會返回整個...
Vue之自定義指令
vue中有很多內建的命令,例如v bind,v for,v show等等,這些指令的指責是將表示式改變時,將某些行為相應地對映到dom上。那麼除了我們常用的vue的內建指令外,我們還可以自定義指令,常用的自定義vue全域性指令的模板如下 這裡的focus是定義額指令的名稱,可根據指令作用換成其他名稱...
Vue之自定義指令
先了解一下,在vue中,有很多內建的指令.比如 等等.所以,關於指令,我們可以總結下面幾點 2.0 vue自定義指令場景小demo 非常尬 場景 我們需要乙個指令,寫在某個html表單元素上,然後讓它在被載入到dom中時,自動獲取焦點.和自定義過濾器一樣,我們這裡定義的是全域性指令 vue.dire...