让企业管理更智慧、更快捷
Skip to content
GitLab
探索
登录
注册
源代码提交(3)
refactor: 优化badge-text组件和lwc-basic-tags组件未找到对应值组件显示 card组件增加图片props参数传入
· 41809ef2
由
丁阳
创作于
6月 25, 2023
41809ef2
Merge branch 'dy-dev'
· 7b8f1908
由
丁阳
创作于
6月 25, 2023
7b8f1908
1.0.22
· 308cef6c
由
丁阳
创作于
6月 25, 2023
308cef6c
隐藏空白变更内容
行内
左右并排
package.json
浏览文件 @
308cef6c
{
"name"
:
"@package/lwc-ui-components"
,
"version"
:
"1.0.2
1
"
,
"version"
:
"1.0.2
2
"
,
"private"
:
false
,
"description"
:
"立威云UI组件库"
,
"author"
:
""
,
...
...
src/index.js
浏览文件 @
308cef6c
...
...
@@ -209,7 +209,7 @@ if (typeof window !== 'undefined' && window.Vue) {
}
export
default
{
version
:
'
1.0.2
0
'
,
version
:
'
1.0.2
1
'
,
install
,
LwcBasicButton
,
LwcBasicButtonIcon
,
...
...
src/stories/card/cashier/Index.vue
浏览文件 @
308cef6c
...
...
@@ -15,6 +15,7 @@
style=
"width: 70px; height: 70px; border-radius: 50%;"
:lazy=
"lazy"
:src=
"image || defaultAvatar"
v-bind=
"imageProps"
></el-image>
</el-col>
</el-row>
...
...
@@ -117,6 +118,10 @@ export default {
lazy
:
{
type
:
Boolean
,
default
:
true
},
imageProps
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
...
...
src/stories/card/cashier/index.stories.js
浏览文件 @
308cef6c
...
...
@@ -25,7 +25,7 @@ Default.args = {
level
:
'
店长
'
,
status
:
"
ACTIVE
"
,
empNo
:
"
101
"
,
image
Url
:
"
http://
img.leadwaycloud.com/33231c51b869bf787bcdbe6f32dc82a2
"
,
image
:
"
http://
10.146.96.23/leadwaycloud-oss/oss/file/preview/948513499067288/965765666716561?imageView2/1/w/80/h/80
"
,
statusConfig
:
{
options
:
[{
label
:
'
启用
'
,
...
...
src/stories/card/client/Index.vue
浏览文件 @
308cef6c
...
...
@@ -8,7 +8,7 @@
<el-row
class=
"px-2"
@
click.native=
"onClick(user)"
>
<el-row
:gutter=
"24"
class=
"py-2"
>
<el-col
:span=
"6"
>
<el-avatar
class=
"w-full h-full"
:fit=
"fit"
:size=
"70"
:src=
"user.image || defaultAvatar"
></el-avatar>
<el-avatar
class=
"w-full h-full"
:fit=
"fit"
:size=
"70"
:src=
"user.image || defaultAvatar"
v-bind=
"imageProps"
></el-avatar>
</el-col>
<el-col
:span=
"18"
>
<el-col
class=
"truncate text-color-primary"
:span=
"24"
>
...
...
@@ -52,6 +52,10 @@ export default {
user
:
{
type
:
Object
,
default
()
{
return
{}
}
},
imageProps
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
methods
:
{
...
...
src/stories/card/contact/Index.vue
浏览文件 @
308cef6c
...
...
@@ -14,6 +14,7 @@
style=
"width: 70px; height: 70px; border-radius: 50%;"
:lazy=
"lazy"
:src=
"user.image || defaultAvatar"
v-bind=
"imageProps"
></el-image>
</el-col>
<el-col
:span=
"24"
class=
"truncate mt-2 text-color-primary flex justify-center items-center"
>
...
...
@@ -83,6 +84,10 @@ export default {
lazy
:
{
type
:
Boolean
,
default
:
true
},
imageProps
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
methods
:
{
...
...
src/stories/card/employee/Index.vue
浏览文件 @
308cef6c
...
...
@@ -13,6 +13,7 @@
style=
"width: 70px; height: 70px; border-radius: 50%;"
:lazy=
"lazy"
:src=
"user.image || defaultAvatar"
v-bind=
"imageProps"
></el-image>
</el-col>
<el-col
:span=
"24"
class=
"truncate mt-2"
>
...
...
@@ -53,6 +54,10 @@ export default {
lazy
:
{
type
:
Boolean
,
default
:
true
},
imageProps
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
methods
:
{
...
...
src/stories/card/goods/Index.vue
浏览文件 @
308cef6c
...
...
@@ -11,6 +11,7 @@
style=
"width: 64px; height: 64px;"
:lazy=
"lazy"
:src=
"value.image || defaultImage"
v-bind=
"imageProps"
></el-image>
</el-row>
<el-row
class=
"flex flex-col justify-center"
>
...
...
@@ -64,6 +65,10 @@ export default {
lazy
:
{
type
:
Boolean
,
default
:
false
},
imageProps
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
components
:
{
...
...
src/stories/data-display/badge-text/index.stories.js
浏览文件 @
308cef6c
...
...
@@ -23,7 +23,7 @@ Default.args = {
export
const
FullParasm
=
Template
.
bind
({});
FullParasm
.
storyName
=
"
完全参数
"
FullParasm
.
args
=
{
value
:
true
,
value
:
null
,
options
:
[{
label
:
'
启用
'
,
type
:
'
success
'
,
...
...
@@ -32,11 +32,6 @@ FullParasm.args = {
label
:
'
禁用
'
,
type
:
'
danger
'
,
value
:
false
}],
visible
:
()
=>
true
,
className
:
[],
textClassName
:
[],
badgeConfig
:
{
type
:
'
success
'
}
}]
};
src/stories/data-display/badge-text/src/index.js
浏览文件 @
308cef6c
...
...
@@ -38,8 +38,8 @@ export default {
let
badgeType
=
badgeConfig
?.
type
||
'
primary
'
;
if
(
options
&&
options
.
length
>
0
)
{
const
find
=
_
.
find
(
options
,
(
i
)
=>
i
.
value
===
value
)
renderText
=
find
.
label
;
badgeType
=
find
.
type
;
renderText
=
find
?
.
label
||
null
;
badgeType
=
find
?
.
type
||
'
primary
'
;
}
let
_badgeConfig
=
{
"
is-dot
"
:
true
}
...
...
@@ -48,13 +48,13 @@ export default {
return
h
(
'
div
'
,
{
class
:
[
'
lwc-data-display-badge-text
'
,
'
flex
'
,
'
items-center
'
,
...
className
]
},
[
h
(
'
el-badge
'
,
{
renderText
?
h
(
'
el-badge
'
,
{
class
:
badgeConfig
.
className
?
[
'
flex
'
,
'
mr-1
'
,
...
badgeConfig
.
className
]
:
[
'
flex
'
,
'
mr-1
'
],
props
:
{
...
_badgeConfig
,
type
:
badgeType
}
}),
})
:
null
,
renderItem
(
h
,
this
,
{
text
:
renderText
,
className
:
textClassName
})
]);
}
...
...
src/stories/tags/basic/src/index.js
浏览文件 @
308cef6c
...
...
@@ -34,7 +34,8 @@ export default {
break;
default:
}
return typeof(this.value) ==
'
undefined
'
? "" : h(
'
el
-
tag
'
, {
const label = item[this.optionProps.label]
return typeof(this.value) ==
'
undefined
'
|| !label ? "" : h(
'
el
-
tag
'
, {
class: extendType.class,
props: {
type: type,
...
...
@@ -43,7 +44,7 @@ export default {
disableTransitions: true,
...(item.props || {})
}
},
item[this.optionProps.
label
]
);
}, label);
}
}
src/stories/upload/image/index.stories.js
浏览文件 @
308cef6c
...
...
@@ -129,3 +129,20 @@ ServerNew.args = {
merchantId
:
"
demo
"
}
};
export
const
ServerNew2
=
Template
.
bind
({});
ServerNew2
.
storyName
=
"
服务器上传(oss)
"
ServerNew2
.
args
=
{
cropper
:
false
,
type
:
"
action
"
,
accept
:
"
image/*
"
,
limit
:
null
,
value
:
null
,
action
:
"
http://api.leadwaycloud.com/leadwaycloud-oss/oss/file/upload
"
,
path
:
"
http://api.leadwaycloud.com/leadwaycloud-oss/oss/file/preview
"
,
name
:
'
file
'
,
isZimg
:
false
,
data
:
{
merchantId
:
"
demo
"
}
};