Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
9ce8e5fa
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
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看板
提交
9ce8e5fa
编写于
11月 23, 2023
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 调整部分写法兼容web端
上级
ba960883
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
74 addition
and
69 deletion
+74
-69
components/enum-data/enum-data.uts
components/enum-data/enum-data.uts
+1
-0
components/enum-data/enum-data.vue
components/enum-data/enum-data.vue
+4
-5
pages/component/button/button.uvue
pages/component/button/button.uvue
+1
-1
pages/component/list-view/list-view.uvue
pages/component/list-view/list-view.uvue
+1
-1
pages/component/progress/progress.uvue
pages/component/progress/progress.uvue
+1
-1
pages/component/textarea/textarea.uvue
pages/component/textarea/textarea.uvue
+1
-1
pages/component/view/view.uvue
pages/component/view/view.uvue
+65
-60
未找到文件。
components/enum-data/enum-data.uts
0 → 100644
浏览文件 @
9ce8e5fa
export type ItemType = { value : number; name : string }
\ No newline at end of file
components/enum-data/enum-data.vue
浏览文件 @
9ce8e5fa
<
script
lang=
"uts"
>
<
script
lang=
"uts"
>
import
{
type
PropType
}
from
'
vue
'
import
{
PropType
}
from
'
vue
'
import
{
ItemType
}
from
'
./enum-data
'
export
type
ItemType
=
{
value
:
number
;
name
:
string
}
export
default
{
export
default
{
emits
:
[
'
change
'
],
emits
:
[
'
change
'
],
...
@@ -24,9 +23,9 @@
...
@@ -24,9 +23,9 @@
// @ts-ignore
// @ts-ignore
_change
(
e
:
RadioGroupChangeEvent
)
{
_change
(
e
:
RadioGroupChangeEvent
)
{
const
selected
=
this
.
items
.
find
((
item
:
ItemType
)
:
boolean
=>
{
const
selected
=
this
.
items
.
find
((
item
:
ItemType
)
:
boolean
=>
{
return
item
.
name
==
=
e
.
detail
.
value
return
item
.
name
==
e
.
detail
.
value
})
})
if
(
selected
!=
=
null
)
{
if
(
selected
!=
null
)
{
this
.
current
=
selected
.
value
this
.
current
=
selected
.
value
this
.
$emit
(
'
change
'
,
this
.
current
)
this
.
$emit
(
'
change
'
,
this
.
current
)
uni
.
showToast
({
uni
.
showToast
({
...
...
pages/component/button/button.uvue
浏览文件 @
9ce8e5fa
<script>
<script>
import {
type ItemType } from '@/components/enum-data/enum-data.vue
'
import {
ItemType } from '@/components/enum-data/enum-data
'
export default {
export default {
data() {
data() {
return {
return {
...
...
pages/component/list-view/list-view.uvue
浏览文件 @
9ce8e5fa
<script>
<script>
import {
type ItemType } from '@/components/enum-data/enum-data.vue
'
import {
ItemType } from '@/components/enum-data/enum-data
'
export default {
export default {
data() {
data() {
return {
return {
...
...
pages/component/progress/progress.uvue
浏览文件 @
9ce8e5fa
<script>
<script>
import {
type ItemType } from '@/components/enum-data/enum-data.vue
'
import {
ItemType } from '@/components/enum-data/enum-data
'
export default {
export default {
data() {
data() {
return {
return {
...
...
pages/component/textarea/textarea.uvue
浏览文件 @
9ce8e5fa
<script>
<script>
import {
type ItemType } from '@/components/enum-data/enum-data.vue
'
import {
ItemType } from '@/components/enum-data/enum-data
'
export default {
export default {
data() {
data() {
return {
return {
...
...
pages/component/view/view.uvue
浏览文件 @
9ce8e5fa
<template>
<template>
<page-head title="view"></page-head>
<page-head title="view"></page-head>
<view class="main" :hover-class="hover_class ? 'is-parent-hover' : 'none'">
<view class="main" :hover-class="hover_class ? 'is-parent-hover' : 'none'">
<view class="test-view" :hover-class="hover_class ? 'is-hover' : 'none'" :hover-stop-propagation="stop_propagation" :hover-start-time="start_time" :hover-stay-time="stay_time">
<view class="test-view" :hover-class="hover_class ? 'is-hover' : 'none'" :hover-stop-propagation="stop_propagation"
:hover-start-time="start_time" :hover-stay-time="stay_time">
</view>
</view>
</view>
</view>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
...
@@ -9,7 +10,8 @@
...
@@ -9,7 +10,8 @@
<!-- #endif -->
<!-- #endif -->
<view class="content">
<view class="content">
<boolean-data :defaultValue="false" title="是否指定按下去的样式类" @change="change_hover_class_boolean"></boolean-data>
<boolean-data :defaultValue="false" title="是否指定按下去的样式类" @change="change_hover_class_boolean"></boolean-data>
<boolean-data :defaultValue="false" title="是否阻止本节点的祖先节点出现点击态" @change="change_stop_propagation_boolean"></boolean-data>
<boolean-data :defaultValue="false" title="是否阻止本节点的祖先节点出现点击态"
@change="change_stop_propagation_boolean"></boolean-data>
<enum-data :items="start_time_enum" title="按住后多久出现点击态" @change="radio_change_start_time_enum"></enum-data>
<enum-data :items="start_time_enum" title="按住后多久出现点击态" @change="radio_change_start_time_enum"></enum-data>
<enum-data :items="stay_time_enum" title="手指松开后点击态保留时间" @change="radio_change_stay_time_enum"></enum-data>
<enum-data :items="stay_time_enum" title="手指松开后点击态保留时间" @change="radio_change_stay_time_enum"></enum-data>
</view>
</view>
...
@@ -18,8 +20,8 @@
...
@@ -18,8 +20,8 @@
<!-- #endif -->
<!-- #endif -->
</template>
</template>
<script>
<script>
import { type
ItemType } from '@/components/enum-data/enum-data.vue'
import {
ItemType } from '@/components/enum-data/enum-data.vue'
export default {
export default {
data() {
data() {
return {
return {
hover_class: false,
hover_class: false,
...
@@ -44,29 +46,32 @@ export default {
...
@@ -44,29 +46,32 @@ export default {
this.stay_time = time
this.stay_time = time
},
},
},
},
}
}
</script>
</script>
<style>
<style>
.main {
.main {
padding: 10rpx 0;
padding: 10rpx 0;
flex-direction: row;
flex-direction: row;
justify-content: center;
justify-content: center;
}
}
.test-view {
.test-view {
height: 200px;
height: 200px;
width: 200px;
width: 200px;
background-color: white;
background-color: white;
}
}
.text {
.text {
color: #777;
color: #777;
font-size: 26rpx;
font-size: 26rpx;
}
}
.is-hover {
.is-hover {
background-color: #179b16;
background-color: #179b16;
}
}
.is-parent-hover {
.is-parent-hover {
background-color: #aa0000;
background-color: #aa0000;
}
}
</style>
</style>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录