GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - WorktileTech/angular-wt-genius: Worktile/Lesschat 前端 util 封装

BranchesTags
Open more actions menu

Latest commit

 

History

47 Commits
47 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bower.json
bower.json
 
 
gulpfile.js
gulpfile.js
 
 
package.json
package.json
 
 

Repository files navigation

angular-wt-genius

Worktile 项目启动工具包,gulp打包,less编译。

bower 安装

bower install angular-wt-genius

1.wt-genius-notify

angular provider 封装第三方插件 notify.js。

// 全局配置
$wtNotifyProvider.config({
    title: 'Worktile 桌面通知',
    icon : '/img/wt-logo.png'
});
// 插件参数设置
$wtNotify.notify({
    title: '桌面通知',
    body : 'Hey, 我在这里!',
    notifyClick: function (){
        console.log('通知点击事件')
    }
});
// 检查设置通知权限
$wtNotify.checkPermission(function () {
    //success
}, function () {
    //error
}, function () {
    //then
});
Parameters

  • title: (string) - 标题 (必填)
  • body: (string) - 内容
  • icon: (string) - 图标
  • tag: (string) - 标识重复通知
  • lang: (string) - 文本格式 (default: en)
  • timeout: (integer) - 显示延时几秒关闭 (default: 2)
  • notifyShow: (function) - 通知显示回调
  • notifyClose: (function) - 通知关闭回调
  • notifyClick: (function) - 通知点击回调
  • notifyError: (function) - 通知错误回调
Static methods and properties

  • $wtNotify.notify - 初始化,并显示通知(没有设置权限时,自动请求权限)

  • $wtNotify.notSetPermission - Boolean - 未设置通知权限

  • $wtNotify.checkPermission(onPermissionGrantedCallback, onPermissionDeniedCallback, onThenCallback) - requestPermission 的封装方法,当没有设置权限时,自动请求权限。

  • $wtNotify.requestPermission(onPermissionGrantedCallback, onPermissionDeniedCallback) - 请求设置权限

  • $wtNotify.isSupported - Boolean - 浏览器支持

  • $wtNotify.needsPermission - Boolean - 没有权限 (包括浏览器支持、未设置权限和禁止权限)

  • $wtNotify.permissionLevel - (granted, denied or default) - 获取当前权限。

2.wt-retina

$wtRetina.isRetina
$wtRetina.media
Static methods and properties

  • $wtRetina.isRetina - Boolean - 是否 Retina 屏幕
  • $wtRetina.media - String - 匹配成功条件

About

Worktile/Lesschat 前端 util 封装

Resources

Readme
MIT license
Activity
Custom properties

Stars

4 stars

Watchers

15 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.