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
提交
9c0be901
提交
9c0be901
编写于
9月 29, 2020
作者:
KK
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决事件冒泡问题 && 格式化组件
上级
955cebc1
变更
2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
25 行删除
+26
-25
app-mob-select-drop-down.less
...ts/app-mob-select-drop-down/app-mob-select-drop-down.less
+1
-0
app-mob-select-drop-down.vue
...nts/app-mob-select-drop-down/app-mob-select-drop-down.vue
+25
-25
未找到文件。
src/components/app-mob-select-drop-down/app-mob-select-drop-down.less
浏览文件 @
9c0be901
...
...
@@ -51,6 +51,7 @@
}
.select_text {
height: 43px;
padding-right: 25px;
line-height: 40px;
text-align: right;
color: #969696;
...
...
src/components/app-mob-select-drop-down/app-mob-select-drop-down.vue
浏览文件 @
9c0be901
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-mobile-select-drop-down"
>
<div
class=
"cancel-icon"
v-if=
"curvalue"
><ion-icon
name=
"close-circle-outline"
@
click=
"onClear"
></ion-icon></div>
<div
v-if=
"curvalue== null || curvalue==''"
class=
"ion-select-icon"
></div>
<
ion-input
class=
"select_text"
readonly=
"true"
:value=
"curvalue"
:ref=
"name+'input'"
style=
"height: 43px;"
@
ionFocus=
"openSelect"
/
>
<
div
class=
"select_text"
@
click=
"openSelect"
>
{{
curvalue
}}
</div
>
<ion-select
:selected-text=
"selectValue"
:ref=
"name+'select'"
v-show=
"false"
:disabled=
"disabled "
@
ionChange=
"change"
interface=
"action-sheet"
:cancel-text=
"$t('app.button.cancel')"
@
ionCancel=
"cancel"
>
<ion-select-option
v-for=
"option of items"
:key=
"option.value"
:value=
"option.value"
>
{{
option
.
text
}}
</ion-select-option>
</ion-select>
...
...
@@ -199,7 +199,7 @@ export default class AppSelectDropDown extends Vue {
* @type {string}
* @memberof AppSelectDropDown
*/
public
selectValue
:
any
=
""
;
public
selectValue
:
any
=
""
;
/**
...
...
@@ -219,7 +219,7 @@ export default class AppSelectDropDown extends Vue {
*/
get
curvalue
()
{
if
(
this
.
value
&&
this
.
items
.
length
>
0
)
{
// 判断是否拿到表单传来的值、列表项是否加载完成
if
(
this
.
valueitem
&&
this
.
items
.
every
((
item
:
any
)
=>
{
return
item
[
this
.
deKeyField
]
!=
this
.
value
}))
{
if
(
this
.
valueitem
&&
this
.
items
.
every
((
item
:
any
)
=>
{
return
item
[
this
.
deKeyField
]
!=
this
.
value
}))
{
return
this
.
value
;
}
}
...
...
@@ -246,8 +246,8 @@ export default class AppSelectDropDown extends Vue {
@
Watch
(
'value'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
oldVal
&&
!
newVal
)
{
this
.
$nextTick
(()
=>
{
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
this
.
$nextTick
(()
=>
{
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
if
(
select
)
{
select
.
value
=
null
;
}
...
...
@@ -265,7 +265,7 @@ export default class AppSelectDropDown extends Vue {
this
.
items
.
push
({
text
:
newVal
,
value
:
value
});
}
this
.
onSearch
(
newVal
,
false
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
}
...
...
@@ -276,7 +276,7 @@ export default class AppSelectDropDown extends Vue {
*/
public
mounted
()
{
this
.
onSearch
(
null
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
/**
...
...
@@ -287,7 +287,7 @@ export default class AppSelectDropDown extends Vue {
this
.
open
=
flag
;
if
(
this
.
open
)
{
this
.
onSearch
(
this
.
curvalue
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
}
/**
...
...
@@ -312,7 +312,7 @@ export default class AppSelectDropDown extends Vue {
this
.
inputState
=
false
;
Object
.
assign
(
_param
,
{
query
:
query
});
if
(
!
this
.
acParams
.
serviceName
||
!
this
.
acParams
.
interfaceName
)
{
this
.
$notice
.
error
(
`
${
this
.
$t
(
'associated_entity'
)}
`
);
this
.
$notice
.
error
(
`
${
this
.
$t
(
'associated_entity'
)}
`
);
return
;
}
const
appEntityServiceConstructor
=
window
.
appEntityServiceConstructor
;
...
...
@@ -323,7 +323,7 @@ export default class AppSelectDropDown extends Vue {
this
.
items
=
response
.
data
;
this
.
result
(
this
.
items
);
}
else
{
this
.
$notice
.
error
(
`
${
this
.
$t
(
'error_request'
)}
`
);
this
.
$notice
.
error
(
`
${
this
.
$t
(
'error_request'
)}
`
);
}
}
}
...
...
@@ -369,7 +369,7 @@ export default class AppSelectDropDown extends Vue {
* @memberof AppSelectDropDown
*/
public
onSelect
(
val
:
string
)
{
let
index
=
this
.
items
.
findIndex
((
item
)
=>
{
return
item
[
this
.
deKeyField
]
==
val
}
);
let
index
=
this
.
items
.
findIndex
((
item
)
=>
{
return
item
[
this
.
deKeyField
]
==
val
}
);
if
(
index
>=
0
)
{
this
.
onACSelect
(
this
.
items
[
index
]);
}
...
...
@@ -394,7 +394,7 @@ export default class AppSelectDropDown extends Vue {
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
''
});
}
this
.
selectValue
=
null
;
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
select
.
value
=
null
;
this
.
$forceUpdate
();
}
...
...
@@ -652,7 +652,7 @@ export default class AppSelectDropDown extends Vue {
return
false
;
}
// 导航参数处理
const
{
context
,
param
}
=
this
.
$viewTool
.
formatNavigateParam
(
this
.
navigateContext
,
this
.
navigateParam
,
this
.
context
,
this
.
viewparams
,
this
.
data
);
const
{
context
,
param
}
=
this
.
$viewTool
.
formatNavigateParam
(
this
.
navigateContext
,
this
.
navigateParam
,
this
.
context
,
this
.
viewparams
,
this
.
data
);
arg
.
context
=
context
;
arg
.
param
=
param
;
return
true
;
...
...
@@ -764,7 +764,7 @@ export default class AppSelectDropDown extends Vue {
* @memberof AppSelect
*/
public
change
(
value
:
any
)
{
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
curvalue
=
value
.
detail
.
value
;
}
...
...
@@ -774,8 +774,8 @@ export default class AppSelectDropDown extends Vue {
* @type {*}
* @memberof AppSelect
*/
public
cancel
(){
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
public
cancel
()
{
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
/**
...
...
@@ -793,14 +793,14 @@ export default class AppSelectDropDown extends Vue {
* @type {*}
* @memberof AppSelectDropDown
*/
public
openSelect
(){
public
openSelect
()
{
this
.
onSearch
(
null
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
if
(
select
)
{
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
if
(
select
)
{
setTimeout
(()
=>
{
select
.
open
();
this
.
$store
.
commit
(
'setSelectStatus'
,
false
);
this
.
$store
.
commit
(
'setSelectStatus'
,
false
);
},
1
);
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录