Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-Mob-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-Mob-R7-Res
提交
863b1028
提交
863b1028
编写于
12月 22, 2020
作者:
zhujiamin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
人员单位
上级
81664238
变更
5
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
286 行增加
和
147 行删除
+286
-147
app-mob-group-picker.less
...components/app-mob-group-picker/app-mob-group-picker.less
+53
-0
app-mob-group-picker.vue
src/components/app-mob-group-picker/app-mob-group-picker.vue
+189
-72
app-mob-group-select.less
...components/app-mob-group-select/app-mob-group-select.less
+3
-46
app-mob-group-select.vue
src/components/app-mob-group-select/app-mob-group-select.vue
+31
-29
theme.less
src/styles/theme/theme.less
+10
-0
未找到文件。
src/components/app-mob-group-picker/app-mob-group-picker.less
0 → 100644
浏览文件 @
863b1028
.app-mob-group-picker-choose-view{
position: relative;
.ibiz-mob-group-picker{
width: 100%;
height: 100%;
.ibiz-group-container{
height: 100%;
display: flex;
flex-direction: column;
.top{
height: 100%;
display: flex;
.left-part{
.van-sidebar{
.van-sidebar-item{
font-size: 16px;
}
}
}
.right-part{
width: 100%;
overflow-y: scroll;
padding-bottom: 100px;
.group-header{
font-size: 16px;
font-weight: 600;
padding: 10px 18px 10px;
background-color: #f5f5f5;
}
.group-list{
margin-bottom: 15px;
.list-item{
font-size: 15px;
.tree-icon{
color: #3880ff;
font-size: 20px;
}
}
}
}
}
.ibiz-group-footer{
width: 100%;
position: absolute;
bottom: 0;
.van-button{
width: 100%;
}
}
}
}
}
\ No newline at end of file
src/components/app-mob-group-picker/app-mob-group-picker.vue
浏览文件 @
863b1028
此差异已折叠。
点击以展开。
src/components/app-mob-group-select/app-mob-group-select.less
浏览文件 @
863b1028
.ibiz-mob-group-select {
width: 100%;
display: flex;
border: 1px solid #DCDFE6;
height: 32px;
border-radius: 4px;
.ibiz-group-content {
flex-grow: 1;
height: 32px;
.group-item-text{
padding-left: 15px;
font-size: 13px;
}
.ibiz-group-item {
display: inline-block;
border: 1px solid #bbb;
border-radius: 5px;
font-size: 12px;
height: 24px;
line-height: 22px;
margin: 2px 0px 2px 6px;
padding: 1px 3px 0 8px;
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
.group-item-multiple{
margin: 0 8px 0 0;
}
.el-icon-close{
color: #909399;
background-color: #c0c4cc;
border-radius: 50%;
top: 0;
}
.el-icon-close:hover{
color: #fff;
background-color: #909399;
}
}
}
.ibiz-group-open {
display: flex;
text-align: center;
align-items: center;
padding: 0 5px;
}
display: flex;
justify-content: space-between;
align-items: center;
}
.ibiz-mob-group-select:hover {
border-color: #108cee;
}
\ No newline at end of file
src/components/app-mob-group-select/app-mob-group-select.vue
浏览文件 @
863b1028
<
template
>
<div
class=
"ibiz-mob-group-select"
>
<div
class=
"ibiz-group-content"
>
<span
class=
"group-item-text"
v-if=
"!multiple"
>
{{
selectName
}}
</span>
<template
v-else
v-for=
"(select, index) of selects"
>
<div
:key=
"index"
class=
"ibiz-group-item"
>
<span
class=
"group-item-multiple"
>
{{
select
.
label
}}
</span>
<i
v-if=
"!disabled"
class=
"el-icon-close"
@
click=
"remove(select)"
></i>
</div>
</
template
>
</div>
<div
v-if=
"!disabled"
class=
"ibiz-group-open"
>
<i
v-if=
"!disabled && !multiple && selects.length > 0"
class=
"el-icon-close"
@
click=
"remove(selects[0])"
></i>
<i
class=
"el-icon-search"
@
click=
"openView"
style=
"color: #c0c4cc;"
></i>
</div>
<ion-input
class=
"ibz-input"
:value=
"selectName"
readonly
></ion-input>
<ion-icon
v-show=
"selects.length>0"
class=
"delete-value "
name=
"close-circle-outline"
@
click
.
stop=
"clearSelects"
></ion-icon>
<ion-icon
v-show=
"selects.length
<1
"
class=
"open-picker"
name=
"search-outline"
@
click
.
stop=
"openView"
></ion-icon>
</div>
</
template
>
...
...
@@ -39,7 +27,7 @@ export default class AppMobGroupSelect extends Vue {
* @type {*}
* @memberof AppMobGroupSelect
*/
@
Prop
()
treeurl
?:
boolean
;
@
Prop
()
treeurl
?:
string
;
/**
* 数据接口地址
...
...
@@ -181,8 +169,15 @@ export default class AppMobGroupSelect extends Vue {
* @memberof AppMobGroupSelect
*/
get
selectName
()
{
if
(
this
.
selects
.
length
>
0
)
{
if
(
this
.
selects
.
length
==
1
)
{
return
this
.
selects
[
0
].
label
;
}
else
{
let
chosenName
=
''
;
for
(
let
i
=
0
;
i
<
this
.
selects
.
length
;
i
++
)
{
const
element
:
any
=
this
.
selects
[
i
];
chosenName
+=
element
.
label
+
','
;
}
return
chosenName
.
slice
(
0
,
chosenName
.
length
-
1
)
}
}
...
...
@@ -194,7 +189,7 @@ export default class AppMobGroupSelect extends Vue {
*/
public
async
openView
()
{
const
view
:
any
=
{
viewname
:
'app-group-picker'
,
viewname
:
'app-
mob-
group-picker'
,
title
:
(
this
.
$t
(
'components.AppMobGroupSelect.groupSelect'
)
as
string
)
};
const
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
...
...
@@ -219,13 +214,10 @@ export default class AppMobGroupSelect extends Vue {
multiple
:
this
.
multiple
,
selects
:
this
.
selects
,
});
let
container
:
Subject
<
any
>
=
await
this
.
$appmodal
.
openModal
(
view
,
context
,
param
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
const
result
:
any
=
await
this
.
$appmodal
.
openModal
(
view
,
context
,
param
);
if
(
result
||
Object
.
is
(
result
.
ret
,
'OK'
))
{
this
.
openViewClose
(
result
);
}
);
}
}
/**
...
...
@@ -237,9 +229,9 @@ export default class AppMobGroupSelect extends Vue {
public
openViewClose
(
result
:
any
)
{
this
.
selects
=
[];
if
(
result
.
datas
&&
result
.
datas
.
length
>
0
)
{
this
.
selects
=
result
.
datas
this
.
selects
=
result
.
datas
;
}
this
.
setValue
()
this
.
setValue
()
;
}
/**
...
...
@@ -250,14 +242,14 @@ export default class AppMobGroupSelect extends Vue {
*/
public
remove
(
item
:
any
)
{
this
.
selects
.
splice
(
this
.
selects
.
indexOf
(
item
),
1
);
this
.
setValue
()
this
.
setValue
()
;
}
/**
* 设置值
*
* @type {*}
* @memberof App
Mob
GroupSelect
* @memberof AppGroupSelect
*/
public
setValue
()
{
let
item
:
any
=
{};
...
...
@@ -323,7 +315,17 @@ export default class AppMobGroupSelect extends Vue {
})
}
}
/**
* 全部清除
*
* @memberof AppMobGroupSelect
*/
public
clearSelects
(){
this
.
selects
=
[];
this
.
setValue
();
}
}
</
script
>
...
...
src/styles/theme/theme.less
浏览文件 @
863b1028
...
...
@@ -284,6 +284,16 @@
}
}
// app-mob-group-picker组件
.ibiz-mob-group-picker{
.ibiz-group-footer{
.van-button{
background: @theme-color;
color: @text-color;
}
}
}
// 用户自定义主题文件
.user_theme(@theme-color, @text-color);
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录