Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
53fbcdba
提交
53fbcdba
authored
3月 10, 2023
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fui 组件问题修复和优化
上级
cb2cf54d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
68 行增加
和
37 行删除
+68
-37
fui-collapse-item.vue
...omponents/firstui/fui-collapse-item/fui-collapse-item.vue
+59
-34
f-index-list-item.vue
src/components/firstui/fui-index-list/f-index-list-item.vue
+5
-1
fui-index-list.vue
src/components/firstui/fui-index-list/fui-index-list.vue
+1
-0
fui-safe-area.vue
src/components/firstui/fui-safe-area/fui-safe-area.vue
+3
-2
没有找到文件。
src/components/firstui/fui-collapse-item/fui-collapse-item.vue
浏览文件 @
53fbcdba
...
...
@@ -103,6 +103,21 @@
watch
:
{
open
(
val
)
{
this
.
isOpen
=
val
},
isOpen
(
val
)
{
this
.
$nextTick
(
async
()
=>
{
let
parent
=
this
.
$parent
;
let
parentName
=
parent
.
$options
.
name
;
while
(
parentName
!==
'PageBody'
)
{
if
(
parentName
===
'fui-collapse-item'
)
{
await
parent
.
init
()
}
parent
=
parent
.
$parent
;
if
(
!
parent
)
return
false
;
parentName
=
parent
.
$options
.
name
;
}
})
}
},
updated
(
e
)
{
...
...
@@ -135,12 +150,14 @@
},
methods
:
{
init
()
{
const
promise
=
[]
// #ifndef APP-NVUE
this
.
getCollapseHeight
(
)
promise
.
push
(
this
.
getCollapseHeight
()
)
// #endif
// #ifdef APP-NVUE
this
.
getNvueHeight
(
)
promise
.
push
(
this
.
getNvueHeight
()
)
// #endif
return
Promise
.
all
(
promise
)
},
uninstall
()
{
if
(
this
.
collapse
)
{
...
...
@@ -164,41 +181,49 @@
}
},
getCollapseHeight
(
index
=
0
)
{
uni
.
createSelectorQuery
()
// #ifndef MP-ALIPAY
.
in
(
this
)
// #endif
.
select
(
`#
${
this
.
elId
}
`
)
.
fields
({
size
:
true
},
data
=>
{
if
(
index
>=
10
)
return
if
(
!
data
)
{
index
++
this
.
getCollapseHeight
(
index
)
return
}
// #ifdef APP-NVUE
this
.
height
=
data
.
height
+
1
// #endif
// #ifndef APP-NVUE
this
.
height
=
data
.
height
return
new
Promise
((
resolve
)
=>
{
uni
.
createSelectorQuery
()
// #ifndef MP-ALIPAY
.
in
(
this
)
// #endif
this
.
isHeight
=
true
})
.
exec
()
.
select
(
`#
${
this
.
elId
}
`
)
.
fields
({
size
:
true
},
data
=>
{
if
(
index
>=
10
)
return
if
(
!
data
)
{
index
++
this
.
getCollapseHeight
(
index
)
return
}
// #ifdef APP-NVUE
this
.
height
=
data
.
height
+
1
// #endif
// #ifndef APP-NVUE
this
.
height
=
data
.
height
// #endif
this
.
isHeight
=
true
resolve
(
this
.
height
)
})
.
exec
()
})
},
getNvueHeight
()
{
const
result
=
dom
.
getComponentRect
(
this
.
$refs
[
'fui_collapse__el'
],
option
=>
{
if
(
option
&&
option
.
result
&&
option
.
size
)
{
// #ifdef APP-NVUE
this
.
height
=
option
.
size
.
height
+
1
// #endif
// #ifndef APP-NVUE
this
.
height
=
option
.
size
.
height
// #endif
this
.
isHeight
=
true
}
return
new
Promise
((
resolve
)
=>
{
const
result
=
dom
.
getComponentRect
(
this
.
$refs
[
'fui_collapse__el'
],
option
=>
{
if
(
option
&&
option
.
result
&&
option
.
size
)
{
// #ifdef APP-NVUE
this
.
height
=
option
.
size
.
height
+
1
// #endif
// #ifndef APP-NVUE
this
.
height
=
option
.
size
.
height
// #endif
this
.
isHeight
=
true
resolve
(
this
.
height
)
}
})
})
},
getCollapse
(
name
=
'fui-collapse'
)
{
...
...
src/components/firstui/fui-index-list/f-index-list-item.vue
浏览文件 @
53fbcdba
...
...
@@ -8,7 +8,7 @@
<view
class=
"fui-il__checkmark"
v-if=
"model.checked"
></view>
</view>
<view
class=
"fui-il__img-box"
v-if=
"isSrc"
>
<image
v-if=
"model.src"
:src=
"model.src"
class=
"fui-index__list-img"
mode=
"widthFix"
></image
>
<fLazyload
v-if=
"model.src"
:src=
"model.src"
class=
"fui-index__list-img"
width=
"72"
height=
"72"
mode=
"widthFix"
></fLazyload
>
</view>
<text
class=
"fui-index__list-main"
>
{{
model
.
text
||
''
}}
</text>
</view>
...
...
@@ -18,9 +18,13 @@
</
template
>
<
script
>
import
fLazyload
from
'../fui-lazyload/fui-lazyload.vue'
//此组件为索引列表item项,若不满足要求可自行调整样式
export
default
{
name
:
'f-index-list-item'
,
components
:
{
fLazyload
},
props
:
{
model
:
{
type
:
Object
,
...
...
src/components/firstui/fui-index-list/fui-index-list.vue
浏览文件 @
53fbcdba
...
...
@@ -282,6 +282,7 @@
}
this
.
idtHeight
=
height
;
this
.
styles
=
`height:
${
height
}
rpx;`
;
this
.
lists
=
lists
;
// #ifndef APP-NVUE
uni
.
createSelectorQuery
()
...
...
src/components/firstui/fui-safe-area/fui-safe-area.vue
浏览文件 @
53fbcdba
...
...
@@ -30,8 +30,9 @@
let
iphonex
=
false
;
let
models
=
[
'iphonex'
,
'iphonexr'
,
'iphonexsmax'
,
'iphone11'
,
'iphone11pro'
,
'iphone11promax'
,
'iphone12'
,
'iphone12mini'
,
'iphone12pro'
,
'iphone12promax'
,
'iphone13'
,
'iphone13mini'
,
'iphone13pro'
,
'iphone13promax'
,
'iphone14'
,
'iphone14mini'
,
'iphone14pro'
,
'iphone14promax'
'iphone13pro'
,
'iphone13promax'
,
'iphone14'
,
'iphone14mini'
,
'iphone14plus'
,
'iphone14pro'
,
'iphone14promax'
,
'iphone15'
,
'iphone15mini'
,
'iphone15plus'
,
'iphone15pro'
,
'iphone15promax'
]
const
model
=
res
.
model
.
replace
(
/
\s
/g
,
""
).
toLowerCase
()
const
newModel
=
model
.
split
(
'<'
)[
0
]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论