in main.js
import vuehoksimucomponent from "vuehoksimucomponent";
//import behind muse-ui
Vue.use(vuehoksimucomponent);
//use behind muse-ui, router
in router/index.js
var router = new Router({
routes: [
{
path: "/",
meta: {
title: "login"
},
component: {template:"<hoksimulogin successpath='/main' appname='your app name'/>"} //login
},
{
path: "/login",
meta: {
title: "login"
},
name: "login",
component: {template:"<hoksimulogin successpath="/main" appname='your app name'/>"} //login
},
{
path: "/logout",
meta: {
title: "logout"
},
name: "logout",
component: {template:"<hoksimulogout/>"}//logout
},
]
});
hoksimurandomavatar 根據text自動選擇顏色,自動顯示text中的第一個字元
<hoksimurandomavatar text="your text"/>
hoksidialog 放入最根的頁面即可在全域使用。
<hoksimuconfirmdialog />
<hoksimualert />
<hoksimuloading />
在vuex中的使用方法
hoksihelper.showalert({
title:"title",
description:"description",
theme:"danger" //danger or success or warning or normal
});
hoksihelper.startloading();
hoksihelper.endloading();
在vue file中的使用方法
this.$showconfirmdialog({
theme: "warning", //danger or success or warning or normal
title: "Are your sure to delete this item?",
description: "All sub files will also be deleted.",
confirm() {
},
cancel() {
}
});
this.$startloading();
this.$endloading();
this.$showalert({
title:"title",
description:"description",
theme:"danger" //danger or success or warning or normal
});