测试发现 被调用的*.vue 组件的图片地址,是相对于调用者的目录的。
This commit is contained in:
@@ -33,27 +33,27 @@ based on
|
||||
methods:{
|
||||
init:function(toast){
|
||||
if (toast.type == 'success') {
|
||||
toast.icon = toast.icon || './Common.success.png';
|
||||
toast.icon = toast.icon || '../static/cToast.success.png';
|
||||
toast.typeClass='mpopup-success';
|
||||
return toast;
|
||||
}
|
||||
if (toast.type == 'warn') {
|
||||
toast.icon = toast.icon || './Common.warn.png';
|
||||
toast.icon = toast.icon || '../static/cToast.warn.png';
|
||||
toast.typeClass='mpopup-warn';
|
||||
return toast;
|
||||
}
|
||||
if (toast.type == 'info') {
|
||||
toast.icon = toast.icon || './Common.info.png';
|
||||
toast.icon = toast.icon || '../static/cToast.info.png';
|
||||
toast.typeClass='mpopup-info';
|
||||
return toast;
|
||||
}
|
||||
if (toast.type == 'fail') {
|
||||
toast.icon = toast.icon || './Common.fail.png';
|
||||
toast.icon = toast.icon || '../static/cToast.fail.png';
|
||||
toast.typeClass='mpopup-fail';
|
||||
return toast;
|
||||
}
|
||||
if (toast.type == 'loading') {
|
||||
toast.icon = toast.icon || './Common.loading.png';
|
||||
toast.icon = toast.icon || '../static/cToast.loading.png';
|
||||
toast.typeClass='mpopup-loading';
|
||||
return toast;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user