Skip to content

Commit

Permalink
新增 uni-popup-dialog 新增属性focus,在input模式下是否自动聚焦
Browse files Browse the repository at this point in the history
  • Loading branch information
18148764734 committed Feb 2, 2024
1 parent 8705ac8 commit a75f9c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions uni_modules/uni-popup/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.8.7(2024-02-02)
- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
## 1.8.6(2024-01-30)
- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
## 1.8.5(2024-01-26)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} value input 模式下的默认值
* @property {String} placeholder input 模式下输入提示
* @property {Boolean} focus input模式下是否自动聚焦,默认为true
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
Expand All @@ -51,7 +52,7 @@
* @value input 可输入对话框
* @showClose {Boolean} 是否显示关闭按钮
* @property {String} content 对话框内容
* @property {Boolean} beforeClose 是否拦截取消事件
* @property {Boolean} beforeClose 是否拦截取消事件
* @property {Number} maxlength 输入
* @event {Function} confirm 点击确认按钮触发
* @event {Function} close 点击取消按钮触发
Expand Down Expand Up @@ -109,12 +110,15 @@
maxlength: {
type: Number,
default: -1,
},
focus:{
type: Boolean,
default: true,
}
},
data() {
return {
dialogType: 'error',
focus: false,
val: ""
}
},
Expand Down Expand Up @@ -160,9 +164,6 @@
this.dialogType = this.type
}
},
mounted() {
this.focus = true
},
methods: {
/**
* 点击确认按钮
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-popup/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-popup",
"displayName": "uni-popup 弹出层",
"version": "1.8.6",
"version": "1.8.7",
"description": " Popup 组件,提供常用的弹层",
"keywords": [
"uni-ui",
Expand Down

0 comments on commit a75f9c4

Please sign in to comment.