https://github.com/meepobrother/meepo-core
meepo core 核心功能
https://github.com/meepobrother/meepo-core
alert angular5 configuration core loading meepo mobile weui
Last synced: 3 months ago
JSON representation
meepo core 核心功能
- Host: GitHub
- URL: https://github.com/meepobrother/meepo-core
- Owner: meepobrother
- License: mit
- Created: 2017-12-19T04:14:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-06T06:30:16.000Z (over 7 years ago)
- Last Synced: 2025-02-26T02:17:54.103Z (3 months ago)
- Topics: alert, angular5, configuration, core, loading, meepo, mobile, weui
- Language: TypeScript
- Homepage: https://meepo.com.cn
- Size: 611 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 用法
- 集成移动端基础核心功能, weui, toast, loading, alert, confirm, share ...
```sh
yarn add meepo-core
```1. 引入weui.css
```html```
2. 引用跟组件
```html
```
3. 实现业务逻辑
```ts
// 引入
import { MeepoCoreModule } from 'meepo-core';import { CoreService } from 'meepo-core';
export class ExampleComponent{
constructor(
public core: CoreService
){}doSometing(){
// 显示loading
this.core.showLoading({title: 'loading'});
this.core.closeLoading();// 显示toast
this.core.showToast({title: 'toast'});
this.core.closeToast();// 显示alert
this.core.showAlert({title: '标题', content: '内容'});
this.core.closeAlert();// 显示confirm
this.core.showConfirm({title: '标题', content: '内容'});
this.core.closeConfirm();// 设置标题
this.core.app$.next({
title: '页面标题',
share: {
title: '分享标题',
icon: '分享图标',
content: '分享内容',
link: '分享链接'
}
})
}
}
```