Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
08b77b14
提交
08b77b14
authored
5月 29, 2023
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 更新 firstui config
上级
6aa23dc4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
84 行增加
和
118 行删除
+84
-118
pnpm-lock.yaml
pnpm-lock.yaml
+9
-9
index.js
src/components/firstui/fui-config/index.js
+0
-105
index.ts
src/components/firstui/fui-config/index.ts
+73
-4
components.d.ts
types/components.d.ts
+2
-0
没有找到文件。
pnpm-lock.yaml
浏览文件 @
08b77b14
...
@@ -445,7 +445,7 @@ packages:
...
@@ -445,7 +445,7 @@ packages:
'
@babel/compat-data'
:
7.22.3
'
@babel/compat-data'
:
7.22.3
'
@babel/core'
:
7.22.1
'
@babel/core'
:
7.22.1
'
@babel/helper-validator-option'
:
7.21.0
'
@babel/helper-validator-option'
:
7.21.0
browserslist
:
4.21.
6
browserslist
:
4.21.
7
lru-cache
:
5.1.1
lru-cache
:
5.1.1
semver
:
6.3.0
semver
:
6.3.0
...
@@ -3955,7 +3955,7 @@ packages:
...
@@ -3955,7 +3955,7 @@ packages:
dependencies
:
dependencies
:
'
@babel/core'
:
7.22.1
'
@babel/core'
:
7.22.1
'
@babel/preset-env'
:
7.22.2(@babel/core@7.22.1)
'
@babel/preset-env'
:
7.22.2(@babel/core@7.22.1)
browserslist
:
4.21.
6
browserslist
:
4.21.
7
core-js
:
3.30.2
core-js
:
3.30.2
magic-string
:
0.30.0
magic-string
:
0.30.0
regenerator-runtime
:
0.13.11
regenerator-runtime
:
0.13.11
...
@@ -4382,7 +4382,7 @@ packages:
...
@@ -4382,7 +4382,7 @@ packages:
peerDependencies
:
peerDependencies
:
postcss
:
^8.1.0
postcss
:
^8.1.0
dependencies
:
dependencies
:
browserslist
:
4.21.
6
browserslist
:
4.21.
7
caniuse-lite
:
1.0.30001489
caniuse-lite
:
1.0.30001489
fraction.js
:
4.2.0
fraction.js
:
4.2.0
normalize-range
:
0.1.2
normalize-range
:
0.1.2
...
@@ -4625,15 +4625,15 @@ packages:
...
@@ -4625,15 +4625,15 @@ packages:
resolution
:
{
integrity
:
sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
}
resolution
:
{
integrity
:
sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
}
dev
:
true
dev
:
true
/browserslist@4.21.
6
:
/browserslist@4.21.
7
:
resolution
:
{
integrity
:
sha512-
PF07dKGXKR+/bljJzCB6rAYtHEu21TthLxmJagtQizx+rwiqdRDBO5971Xu1N7MgcMLi4+mr4Cnl76x7O3DHt
A==
}
resolution
:
{
integrity
:
sha512-
BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasN
A==
}
engines
:
{
node
:
^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7
}
engines
:
{
node
:
^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7
}
hasBin
:
true
hasBin
:
true
dependencies
:
dependencies
:
caniuse-lite
:
1.0.30001489
caniuse-lite
:
1.0.30001489
electron-to-chromium
:
1.4.411
electron-to-chromium
:
1.4.411
node-releases
:
2.0.12
node-releases
:
2.0.12
update-browserslist-db
:
1.0.11(browserslist@4.21.
6
)
update-browserslist-db
:
1.0.11(browserslist@4.21.
7
)
/bser@2.1.1
:
/bser@2.1.1
:
resolution
:
{
integrity
:
sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==
}
resolution
:
{
integrity
:
sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==
}
...
@@ -5171,7 +5171,7 @@ packages:
...
@@ -5171,7 +5171,7 @@ packages:
/core-js-compat@3.30.2
:
/core-js-compat@3.30.2
:
resolution
:
{
integrity
:
sha512-nriW1nuJjUgvkEjIot1Spwakz52V9YkYHZAQG6A1eCgC8AA1p0zngrQEP9R0+V6hji5XilWKG1Bd0YRppmGimA==
}
resolution
:
{
integrity
:
sha512-nriW1nuJjUgvkEjIot1Spwakz52V9YkYHZAQG6A1eCgC8AA1p0zngrQEP9R0+V6hji5XilWKG1Bd0YRppmGimA==
}
dependencies
:
dependencies
:
browserslist
:
4.21.
6
browserslist
:
4.21.
7
dev
:
true
dev
:
true
/core-js@3.30.2
:
/core-js@3.30.2
:
...
@@ -11148,13 +11148,13 @@ packages:
...
@@ -11148,13 +11148,13 @@ packages:
resolution
:
{
integrity
:
sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==
}
resolution
:
{
integrity
:
sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==
}
dev
:
false
dev
:
false
/update-browserslist-db@1.0.11(browserslist@4.21.
6
)
:
/update-browserslist-db@1.0.11(browserslist@4.21.
7
)
:
resolution
:
{
integrity
:
sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==
}
resolution
:
{
integrity
:
sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==
}
hasBin
:
true
hasBin
:
true
peerDependencies
:
peerDependencies
:
browserslist
:
'
>=
4.21.0'
browserslist
:
'
>=
4.21.0'
dependencies
:
dependencies
:
browserslist
:
4.21.
6
browserslist
:
4.21.
7
escalade
:
3.1.1
escalade
:
3.1.1
picocolors
:
1.0.0
picocolors
:
1.0.0
...
...
src/components/firstui/fui-config/index.js
deleted
100644 → 0
浏览文件 @
6aa23dc4
/*
组件属性全局配置文件。优先级:全局配置文件props < 直接设置组件props
目前支持配置的组件:fui-button、fui-icon、fui-text、fui-input、fui-form-item、fui-list-cell
*/
// 主色(V1.9.8+),仅Nvue端以及无法使用css变量控制颜色的组件使用【保持与fui-theme中一致】
const
color
=
{
primary
:
'#465CFF'
,
success
:
'#09BE4F'
,
warning
:
'#FFB703'
,
danger
:
'#FF2B2B'
,
purple
:
'#6831FF'
,
link
:
'#465CFF'
}
//全局方法(V1.9.8+)
const
app
=
{
toast
:
function
(
text
,
icon
=
'none'
)
{
text
&&
uni
.
showToast
({
title
:
text
,
icon
:
icon
,
duration
:
2000
})
},
modal
:
function
(
title
,
content
,
callback
,
showCancel
,
confirmColor
,
confirmText
)
{
uni
.
showModal
({
title
:
title
,
content
:
content
,
showCancel
:
showCancel
||
false
,
// #ifndef MP-TOUTIAO
cancelColor
:
"#7F7F7F"
,
confirmColor
:
confirmColor
||
color
.
primary
,
// #endif
confirmText
:
confirmText
||
"确定"
,
success
(
res
)
{
if
(
res
.
confirm
)
{
callback
&&
callback
(
true
)
}
else
{
callback
&&
callback
(
false
)
}
},
fail
(
err
)
{
console
.
log
(
err
)
}
})
},
href
(
url
,
isMain
)
{
if
(
isMain
)
{
uni
.
switchTab
({
url
:
url
})
}
else
{
uni
.
navigateTo
({
url
:
url
});
}
}
}
const
fuiConfig
=
{
//组件名称,小驼峰命名
//如fui-button写成fuiButton
fuiButton
:
{
//组件属性值
height
:
'96rpx'
,
size
:
32
,
radius
:
'16rpx'
},
fuiIcon
:
{
size
:
64
,
unit
:
'rpx'
,
//V1.9.8+
color
:
''
},
fuiText
:
{
size
:
32
,
unit
:
'rpx'
,
//仅Nvue有效,black 默认颜色,V1.9.8+
color
:
''
},
fuiInput
:
{
labelSize
:
32
,
size
:
32
},
fuiFormItem
:
{
labelSize
:
32
,
labelWidth
:
160
,
labelRight
:
30
,
labelWeight
:
400
,
labelAlign
:
'left'
,
asteriskPosition
:
'left'
},
// V1.9.8+
fuiListCell
:
{
padding
:
[
'32rpx'
,
'32rpx'
],
arrowColor
:
''
,
//仅Nvue有效
borderColor
:
''
,
bottomLeft
:
32
},
color
,
...
app
}
export
default
fuiConfig
src/components/firstui/fui-config/index.ts
浏览文件 @
08b77b14
/*
/*
组件属性全局配置文件。优先级:全局配置文件props < 直接设置组件props
组件属性全局配置文件。优先级:全局配置文件props < 直接设置组件props
目前支持配置的组件:fui-button、fui-icon、fui-text、fui-input、fui-form-item
目前支持配置的组件:fui-button、fui-icon、fui-text、fui-input、fui-form-item
、fui-list-cell
*/
*/
// 主色(V1.9.8+),仅Nvue端以及无法使用css变量控制颜色的组件使用【保持与fui-theme中一致】
const
color
=
{
primary
:
'#465CFF'
,
success
:
'#09BE4F'
,
warning
:
'#FFB703'
,
danger
:
'#FF2B2B'
,
purple
:
'#6831FF'
,
link
:
'#465CFF'
}
//全局方法(V1.9.8+)
const
app
=
{
toast
:
function
(
text
:
string
,
icon
:
'none'
|
'loading'
|
'success'
|
'error'
=
'none'
)
{
text
&&
uni
.
showToast
({
title
:
text
,
icon
:
icon
,
duration
:
2000
})
},
modal
:
function
(
title
:
string
,
content
:
string
,
callback
:
(
confirm
:
boolean
)
=>
{},
showCancel
:
boolean
,
confirmColor
:
string
,
confirmText
:
string
)
{
uni
.
showModal
({
title
:
title
,
content
:
content
,
showCancel
:
showCancel
||
false
,
// #ifndef MP-TOUTIAO
cancelColor
:
"#7F7F7F"
,
confirmColor
:
confirmColor
||
color
.
primary
,
// #endif
confirmText
:
confirmText
||
"确定"
,
success
(
res
)
{
if
(
res
.
confirm
)
{
callback
&&
callback
(
true
)
}
else
{
callback
&&
callback
(
false
)
}
},
fail
(
err
)
{
console
.
log
(
err
)
}
})
},
href
(
url
:
string
,
isMain
:
boolean
)
{
if
(
isMain
)
{
uni
.
switchTab
({
url
:
url
})
}
else
{
uni
.
navigateTo
({
url
:
url
});
}
}
}
const
fuiConfig
=
{
const
fuiConfig
=
{
//组件名称,小驼峰命名
//组件名称,小驼峰命名
//如fui-button写成fuiButton
//如fui-button写成fuiButton
...
@@ -14,11 +68,15 @@ const fuiConfig = {
...
@@ -14,11 +68,15 @@ const fuiConfig = {
},
},
fuiIcon
:
{
fuiIcon
:
{
size
:
64
,
size
:
64
,
unit
:
'rpx'
unit
:
'rpx'
,
//V1.9.8+
color
:
''
},
},
fuiText
:
{
fuiText
:
{
size
:
32
,
size
:
32
,
unit
:
'rpx'
unit
:
'rpx'
,
//仅Nvue有效,black 默认颜色,V1.9.8+
color
:
''
},
},
fuiInput
:
{
fuiInput
:
{
labelSize
:
32
,
labelSize
:
32
,
...
@@ -28,9 +86,20 @@ const fuiConfig = {
...
@@ -28,9 +86,20 @@ const fuiConfig = {
labelSize
:
32
,
labelSize
:
32
,
labelWidth
:
170
,
labelWidth
:
170
,
labelRight
:
30
,
labelRight
:
30
,
labelWeight
:
400
,
labelAlign
:
'left'
,
labelAlign
:
'left'
,
asteriskPosition
:
'left'
asteriskPosition
:
'left'
}
},
// V1.9.8+
fuiListCell
:
{
padding
:
[
'32rpx'
,
'32rpx'
],
arrowColor
:
''
,
//仅Nvue有效
borderColor
:
''
,
bottomLeft
:
32
},
color
,
...
app
}
}
export
default
fuiConfig
export
default
fuiConfig
types/components.d.ts
浏览文件 @
08b77b14
...
@@ -59,6 +59,7 @@ declare module '@vue/runtime-core' {
...
@@ -59,6 +59,7 @@ declare module '@vue/runtime-core' {
FuiGallery
:
typeof
import
(
'./../src/components/firstui/fui-gallery/fui-gallery.vue'
)[
'default'
]
FuiGallery
:
typeof
import
(
'./../src/components/firstui/fui-gallery/fui-gallery.vue'
)[
'default'
]
FuiGrid
:
typeof
import
(
'./../src/components/firstui/fui-grid/fui-grid.vue'
)[
'default'
]
FuiGrid
:
typeof
import
(
'./../src/components/firstui/fui-grid/fui-grid.vue'
)[
'default'
]
FuiGridItem
:
typeof
import
(
'./../src/components/firstui/fui-grid-item/fui-grid-item.vue'
)[
'default'
]
FuiGridItem
:
typeof
import
(
'./../src/components/firstui/fui-grid-item/fui-grid-item.vue'
)[
'default'
]
FuiHorizontalScroll
:
typeof
import
(
'./../src/components/firstui/fui-horizontal-scroll/fui-horizontal-scroll.vue'
)[
'default'
]
FuiIcon
:
typeof
import
(
'./../src/components/firstui/fui-icon/fui-icon.vue'
)[
'default'
]
FuiIcon
:
typeof
import
(
'./../src/components/firstui/fui-icon/fui-icon.vue'
)[
'default'
]
FuiImageCropper
:
typeof
import
(
'./../src/components/firstui/fui-image-cropper/fui-image-cropper.vue'
)[
'default'
]
FuiImageCropper
:
typeof
import
(
'./../src/components/firstui/fui-image-cropper/fui-image-cropper.vue'
)[
'default'
]
FuiIndexList
:
typeof
import
(
'./../src/components/firstui/fui-index-list/fui-index-list.vue'
)[
'default'
]
FuiIndexList
:
typeof
import
(
'./../src/components/firstui/fui-index-list/fui-index-list.vue'
)[
'default'
]
...
@@ -77,6 +78,7 @@ declare module '@vue/runtime-core' {
...
@@ -77,6 +78,7 @@ declare module '@vue/runtime-core' {
FuiLottie
:
typeof
import
(
'./../src/components/firstui/fui-lottie/fui-lottie.vue'
)[
'default'
]
FuiLottie
:
typeof
import
(
'./../src/components/firstui/fui-lottie/fui-lottie.vue'
)[
'default'
]
FuiMessage
:
typeof
import
(
'./../src/components/firstui/fui-message/fui-message.vue'
)[
'default'
]
FuiMessage
:
typeof
import
(
'./../src/components/firstui/fui-message/fui-message.vue'
)[
'default'
]
FuiModal
:
typeof
import
(
'./../src/components/firstui/fui-modal/fui-modal.vue'
)[
'default'
]
FuiModal
:
typeof
import
(
'./../src/components/firstui/fui-modal/fui-modal.vue'
)[
'default'
]
FuiMovableView
:
typeof
import
(
'./../src/components/firstui/fui-movable-view/fui-movable-view.vue'
)[
'default'
]
FuiNavBar
:
typeof
import
(
'./../src/components/firstui/fui-nav-bar/fui-nav-bar.vue'
)[
'default'
]
FuiNavBar
:
typeof
import
(
'./../src/components/firstui/fui-nav-bar/fui-nav-bar.vue'
)[
'default'
]
FuiNoticeBar
:
typeof
import
(
'./../src/components/firstui/fui-notice-bar/fui-notice-bar.vue'
)[
'default'
]
FuiNoticeBar
:
typeof
import
(
'./../src/components/firstui/fui-notice-bar/fui-notice-bar.vue'
)[
'default'
]
FuiOverflowHidden
:
typeof
import
(
'./../src/components/firstui/fui-overflow-hidden/fui-overflow-hidden.vue'
)[
'default'
]
FuiOverflowHidden
:
typeof
import
(
'./../src/components/firstui/fui-overflow-hidden/fui-overflow-hidden.vue'
)[
'default'
]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论