Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
4b10b7bf
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6006
Star
91
Fork
164
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4b10b7bf
编写于
12月 13, 2023
作者:
shutao-dc
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://gitcode.net/dcloud/hello-uni-app-x
into dev
上级
b01c9a10
c2055d94
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
49 addition
and
9 deletion
+49
-9
pages/API/get-univerify-manager/get-univerify-manager.uvue
pages/API/get-univerify-manager/get-univerify-manager.uvue
+2
-2
pages/component/input/input.test.js
pages/component/input/input.test.js
+8
-0
pages/component/input/input.uvue
pages/component/input/input.uvue
+20
-3
pages/component/textarea/textarea.test.js
pages/component/textarea/textarea.test.js
+7
-0
pages/component/textarea/textarea.uvue
pages/component/textarea/textarea.uvue
+12
-4
未找到文件。
pages/API/get-univerify-manager/get-univerify-manager.uvue
浏览文件 @
4b10b7bf
...
...
@@ -24,10 +24,10 @@
this.univerifyManager = uni.getUniverifyManager();
// 预登录
this.univerifyManager?.preLogin({
success
()
{
success
: () =>
{
console.log("pre login success");
},
fail
(err : PreLoginFail)
{
fail
: (err : PreLoginFail) =>
{
console.error("pre login fail => " + JSON.stringify(err));
uni.showModal({
title: '预登录失败',
...
...
pages/component/input/input.test.js
浏览文件 @
4b10b7bf
...
...
@@ -139,6 +139,14 @@ describe('component-native-input', () => {
// await page.waitFor(500)
// })
it
(
"
cursor-color
"
,
async
()
=>
{
await
page
.
setData
({
cursor_color
:
"
transparent
"
,
})
await
page
.
waitFor
(
500
)
expect
(
await
(
await
page
.
$
(
'
.uni-input-cursor-color
'
)).
property
(
"
cursor-color
"
)).
toBe
(
"
transparent
"
)
})
it
(
"
afterAllTestScreenshot
"
,
async
()
=>
{
const
image
=
await
program
.
screenshot
({
fullPage
:
true
...
...
pages/component/input/input.uvue
浏览文件 @
4b10b7bf
...
...
@@ -136,6 +136,15 @@
</view>
</view>
<view>
<view class="uni-title" @click="changeCursorColor">
<text class="uni-title-text">设置光标颜色为透明(点击生效,再点复位)</text>
</view>
<view class="uni-input-wrapper">
<input class="uni-input uni-input-cursor-color" :cursor-color="cursor_color" value="光标颜色" />
</view>
</view>
<view>
<view class="uni-title">
<text class="uni-title-text">键盘弹起时,自动上推页面</text>
...
...
@@ -219,6 +228,7 @@
inputClearValue: '',
showPassword: true,
cursor: -1,
cursor_color: "#3393E2",
selectionStart: -1,
selectionEnd: -1,
inputEventDetail: '',
...
...
@@ -290,6 +300,13 @@
},
test_check_input_value():number {
return this.onMaxLengthInputValue.length
},
changeCursorColor(){
if(this.cursor_color == "#3393E2"){
this.cursor_color = "transparent"
}else{
this.cursor_color = "#3393E2"
}
}
}
}
...
...
pages/component/textarea/textarea.test.js
浏览文件 @
4b10b7bf
...
...
@@ -61,6 +61,13 @@ describe('component-native-textarea', () => {
} = await textarea.size()
expect(height).toBeLessThanOrEqual(150)
}) */
it
(
"
cursor-color
"
,
async
()
=>
{
await
page
.
setData
({
cursor_color
:
"
transparent
"
,
})
await
page
.
waitFor
(
500
)
expect
(
await
textarea
.
property
(
"
cursor-color
"
)).
toBe
(
"
transparent
"
)
})
it
(
"
inputmode
"
,
async
()
=>
{
const
inputmodeEnum
=
await
page
.
data
(
"
inputmode_enum
"
)
...
...
pages/component/textarea/textarea.uvue
浏览文件 @
4b10b7bf
...
...
@@ -13,6 +13,7 @@ export default {
default_value:"",
maxlength:-1,
inputmode_enum: [{"value":0,"name":"none"},{"value":1,"name":"text"},{"value":2,"name":"decimal"},{"value":3,"name":"numeric"},{"value":4,"name":"tel"},{"value":5,"name":"search"},{"value":6,"name":"email"},{"value":7,"name":"url"}] as ItemType[],
cursor_color: "#3393E2",
inputmode_enum_current: 0
}
},
...
...
@@ -38,6 +39,7 @@ export default {
change_confirm_hold_boolean(checked : boolean) { this.confirm_hold_boolean = checked },
change_focus_boolean(checked : boolean) { this.focus_boolean = checked },
change_auto_focus_boolean(checked : boolean) { this.auto_focus_boolean = checked },
change_cursor_color_boolean(checked : boolean) { if(checked){ this.cursor_color = "transparent"} else {this.cursor_color = "#3393E2"}},
radio_change_inputmode_enum(checked : number) { this.inputmode_enum_current = checked }
}
}
...
...
@@ -55,6 +57,7 @@ export default {
:fixed="fixed_boolean"
:show-confirm-bar="show_confirm_bar_boolean"
:adjust-position="adjust_position_boolean"
:cursor-color="cursor_color"
:inputmode="inputmode_enum[inputmode_enum_current].name"
:maxlength="maxlength"
@click="textarea_click"
...
...
@@ -115,6 +118,11 @@ export default {
title="自动获取焦点"
@change="change_auto_focus_boolean"
></boolean-data>
<boolean-data
:defaultValue="false"
title="改变光标颜色为透明"
@change="change_cursor_color_boolean"
></boolean-data>
<enum-data
:items="inputmode_enum"
title="是一个枚举属性,它提供了用户在编辑元素或其内容时可能输入的数据类型的提示。在符合条件的高版本webview里,uni-app的 web 和 app-vue 平台中可使用本属性。"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录