Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hel-guide
app
Commits
bdcb6dd1
Commit
bdcb6dd1
authored
Sep 07, 2017
by
JingChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates angular/hlsPopup.md
Auto commit by GitBook Editor
parent
e53db032
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
hlsPopup.md
angular/hlsPopup.md
+14
-14
No files found.
angular/hlsPopup.md
View file @
bdcb6dd1
...
...
@@ -15,31 +15,31 @@ APP开发经常会安功能需求弹出各种提示框,此工具类封装了
#### 二、长时间底部提示框 `showLongCenterToast`
-
一般用于提示用户字段合法性,或保存提交成功的提示等其他业务场景,代码试下如下
```javascript
function showLongCenterToast(){
hlsPopup.showLongCenterToast('请输入密码!');
}
```
```javascript
function showLongCenterToast(){
hlsPopup.showLongCenterToast('请输入密码!');
}
```
-
函数接受一个参数
`content`
及内容
-
实现的效果如下
!
[](
/img/showToast.jpg
)
!
[](
/img/showToast.jpg
)
#### 三、弹出确认提示框 `confirm`
-
弹出框进行用户确认,代码实现如下
```javascript
function open_new_win() {
hlsPopup.confirm('技术小哥经过不懈努力...', '版本更新', function (index) {
alert(index);
});
}
```
```javascript
function open_new_win() {
hlsPopup.confirm('技术小哥经过不懈努力...', '版本更新', function (index) {
alert(index);
});
}
```
-
此函数接受三个参数
`content`
提示内容,可以为空、
`title`
标题,不为空、
`onConfirm`
回调函数,函数返回
`index`
0表示取消,1表示确定,可根据返回值执行其他逻辑。
-
效果如下
!
[](
/img/showConfirm.png
)
!
[](
/img/showConfirm.png
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment