Skip to content

mozuo/tk-layer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tk-layer

install

npm install tk-layer

Quick Start

with main.js or index.js add:

import Vue from 'vue';
import {layer} from 'tk-layer'
Vue.prototype.$layer = layer(Vue);

in component

this.$layer.alert("找不到对象!");

Attribut

{
  type: 0, //0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
  title: '信息',
  content: '',
  area: 'auto',
  offset: 'auto',
  icon: -1,
  btn: '确定',
  time: 0,
  shade: true,
  yes: '',
  cancel: '',
  tips: [0,{}],//支持上右下左四个方向,通过1-4进行方向设定,可以设定tips: [1, '#c00']
  tipsMore: false,//是否允许多个tips
  shadeClose: false,
}

Method

 layer.alert(contetn, options, yes);
 layer.confirm(content, options, yes, cancel)
 layer.msg(contetn, options, end);
layer.tips(content, follow, options);
layer.open(options);
layer.close(id);
layer.closeAll(type);

About

alert,tip,confirm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published