import cryptojs from "crypto-js";
let psd= cryptojs.
sha256
(this
.userform.password.
trim()
).tostring
(cryptojs.enc.base64)
:before-upload
="handleupload"
:show-upload-list
="false"
:on-success
="uploadsuccess"
:on-error
="uploaderror"
:format
="['xlsx','xls']"
:max-size
="10240"
:on-exceeded-size
="handlemaxsize"
:on-format-error
="handleformaterrorword"
name
='upload'
action
="/api/search/file"
>
:loading
="up_file"
>
上傳檔案button
>
upload
>
/**上傳*/
handleupload
(file)
,uploadsuccess
(res, file)
,uploaderror
(error, file));
},handlemaxsize
(file));
},handleformaterrorword
(file));
},/**上傳結束 */
@on-change=
"getyear"
format=
"yyyy"
type=
"year"
placeholder=
"年度"
>
<
/datepicker>
/*type:顯示型別;
*format顯示日期的格式
*通過on-change事件獲取值
*/getyear
(e)
a.單元格內容過多顯示省略號,滑鼠懸停顯示詳細資訊
, on:},
style:
}, params.row.projectname.
substring(0
,7)+
"...");
}else},
style:
},params.row.projectname);}
}}
b.使用table展開功能,在展開子元件中呼叫父元件方法
table.vue
import expandrow from
'path'
;//引入子元件
export
default
,//作為元件
data()
, on:)}
}})}
}]}}
子元件 expandrow.vue
//html
}<
/template>
export
default
, methods:}}
;<
/script>
vue iview專案開發實踐問題總結(一)
data watch associationnewform deep true configstepdata this.emit getsubalarmconditiondata dataobj deep true 深度監聽 複製 on 複製 ok 2000 複製 iview的github上有對應的...
vue iview遠端搜尋
利用遠端搜尋來實時從資料庫中調取資料,不必查出所有資料,在資料庫內資料龐大的情況下可以顯著提高查詢效率 html介面 js getequipmentlistsuc data 遠端搜尋 remotemethod query callajaxpost url,data,this.getequipment...
vue iview 時間元件限制
開始時間不能大於結束時間 結束時間不能小於開始時間 template中 type date placement bottom end placeholder 時間篩選 style width 100px v model starttime options startoption datepicker...