Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
5f887318
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5994
Star
90
Fork
162
代码
文件
提交
分支
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看板
提交
5f887318
编写于
2月 02, 2024
作者:
taohebin@dcloud.io
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:1.修改设备信息相关接口的示例样式 2. input示例多次点击cursor设置无效问题
上级
b9298c88
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
23 addition
and
17 deletion
+23
-17
pages/API/get-app-authorize-setting/get-app-authorize-setting.uvue
.../get-app-authorize-setting/get-app-authorize-setting.uvue
+5
-5
pages/API/get-app-base-info/get-app-base-info.uvue
pages/API/get-app-base-info/get-app-base-info.uvue
+1
-1
pages/API/get-device-info/get-device-info.uvue
pages/API/get-device-info/get-device-info.uvue
+1
-1
pages/API/get-system-info/get-system-info.uvue
pages/API/get-system-info/get-system-info.uvue
+1
-1
pages/API/get-system-setting/get-system-setting.uvue
pages/API/get-system-setting/get-system-setting.uvue
+4
-4
pages/API/get-window-info/get-window-info.uvue
pages/API/get-window-info/get-window-info.uvue
+1
-1
pages/component/input/input.uvue
pages/component/input/input.uvue
+10
-4
未找到文件。
pages/API/get-app-authorize-setting/get-app-authorize-setting.uvue
浏览文件 @
5f887318
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<view class="uni-label" style="width:180px;">是否授权使用摄像头</view>
<view class="uni-label" style="width:180px;">是否授权使用摄像头</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="cameraAuthorized" />
<input type="text" :disabled="true" placeholder="未获取" :value="cameraAuthorized" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<view class="uni-label" style="width:180px;">是否授权使用定位</view>
<view class="uni-label" style="width:180px;">是否授权使用定位</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="locationAuthorized" />
<input type="text" :disabled="true" placeholder="未获取" :value="locationAuthorized" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<view class="uni-label" style="width:180px;">定位准确度</view>
<view class="uni-label" style="width:180px;">定位准确度</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="locationAccuracy" />
<input type="text" :disabled="true" placeholder="未获取" :value="locationAccuracy" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<view class="uni-label" style="width:180px;">是否授权使用麦克风</view>
<view class="uni-label" style="width:180px;">是否授权使用麦克风</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="microphoneAuthorized" />
<input type="text" :disabled="true" placeholder="未获取" :value="microphoneAuthorized" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<view class="uni-label" style="width:180px;">是否授权通知</view>
<view class="uni-label" style="width:180px;">是否授权通知</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="notificationAuthorized" />
<input type="text" :disabled="true" placeholder="未获取" :value="notificationAuthorized" />
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/API/get-app-base-info/get-app-base-info.uvue
浏览文件 @
5f887318
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<view class="uni-label" style="width:180px;">{{item.label}}</view>
<view class="uni-label" style="width:180px;">{{item.label}}</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text
area style="width: 100%;" :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value
" />
<text
style="width: 100%;" :value="item.value == '' ? '未获取' : item.value
" />
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/API/get-device-info/get-device-info.uvue
浏览文件 @
5f887318
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
}}</view>
}}</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text
area style="width: 100%;" :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value
" />
<text
style="width: 100%;" :value="item.value == '' ? '未获取' : item.value
" />
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/API/get-system-info/get-system-info.uvue
浏览文件 @
5f887318
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
}}</view>
}}</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text
area style="width: 100%;" :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value
" />
<text
style="width: 100%;" :value="item.value == '' ? '未获取' : item.value
" />
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/API/get-system-setting/get-system-setting.uvue
浏览文件 @
5f887318
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<view class="uni-label" style="width:180px;">蓝牙的系统开关</view>
<view class="uni-label" style="width:180px;">蓝牙的系统开关</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="bluetoothEnabled" />
<input type="text" :disabled="true" placeholder="未获取" :value="bluetoothEnabled" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<view class="uni-label" style="width:180px;">地理位置的系统开关</view>
<view class="uni-label" style="width:180px;">地理位置的系统开关</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="locationEnabled" />
<input type="text" :disabled="true" placeholder="未获取" :value="locationEnabled" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<view class="uni-label" style="width:180px;">Wi-Fi 的系统开关</view>
<view class="uni-label" style="width:180px;">Wi-Fi 的系统开关</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="wifiEnabled" />
<input type="text" :disabled="true" placeholder="未获取" :value="wifiEnabled" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<view class="uni-label" style="width:180px;">设备方向</view>
<view class="uni-label" style="width:180px;">设备方向</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<input
class="uni-input"
type="text" :disabled="true" placeholder="未获取" :value="deviceOrientation" />
<input type="text" :disabled="true" placeholder="未获取" :value="deviceOrientation" />
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/API/get-window-info/get-window-info.uvue
浏览文件 @
5f887318
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<view class="uni-label" style="width: 180px">{{ item.label }}</view>
<view class="uni-label" style="width: 180px">{{ item.label }}</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text
area style="width: 100%;" :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value
" />
<text
style="width: 100%;" :value="item.value == '' ? '未获取' : item.value
" />
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/component/input/input.uvue
浏览文件 @
5f887318
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
<text class="uni-title-text">设置输入框聚焦时光标的位置(点击生效)</text>
<text class="uni-title-text">设置输入框聚焦时光标的位置(点击生效)</text>
</view>
</view>
<view class="input-wrapper">
<view class="input-wrapper">
<input ref="input" class="uni-input" value="0123456789" :cursor="cursor" />
<input ref="input" class="uni-input" value="0123456789" :cursor="cursor"
@blur="onCursorBlurChange"
/>
</view>
</view>
</view>
</view>
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
</view>
</view>
<view class="input-wrapper">
<view class="input-wrapper">
<input ref="input2" class="uni-input" value="0123456789" :selection-start="selectionStart"
<input ref="input2" class="uni-input" value="0123456789" :selection-start="selectionStart"
:selection-end="selectionEnd" />
:selection-end="selectionEnd"
@blur="onSelectionBlurChange"
/>
</view>
</view>
</view>
</view>
...
@@ -277,12 +277,18 @@
...
@@ -277,12 +277,18 @@
},
},
setCursor: function (cursor : number) {
setCursor: function (cursor : number) {
(this.$refs['input'] as UniInputElement).focus();
(this.$refs['input'] as UniInputElement).focus();
this.cursor = cursor;
this.cursor = cursor;
},
onCursorBlurChange(){
this.cursor = 0
},
},
setSelection: function (selectionStart : number, selectionEnd : number) {
setSelection: function (selectionStart : number, selectionEnd : number) {
(this.$refs['input2'] as UniInputElement).focus();
(this.$refs['input2'] as UniInputElement).focus();
this.selectionStart = selectionStart;
this.selectionStart = selectionStart;
this.selectionEnd = selectionEnd;
this.selectionEnd = selectionEnd;
},
onSelectionBlurChange(){
this.selectionEnd = 0;
},
},
clearInput: function (event : UniInputEvent) {
clearInput: function (event : UniInputEvent) {
this.inputClearValue = event.detail.value
this.inputClearValue = event.detail.value
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录