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
提交
b3aad3b0
提交
b3aad3b0
编写于
7月 15, 2020
作者:
KK
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增主题切换组件
上级
58675e9e
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
133 行增加
和
1 行删除
+133
-1
app-register.ts
src/app-register.ts
+2
-0
app-mob-picker.vue
src/components/app-mob-picker/app-mob-picker.vue
+1
-1
app-mob-select-changeTheme.less
...pp-mob-select-changeTheme/app-mob-select-changeTheme.less
+35
-0
app-mob-select-changeTheme.vue
...app-mob-select-changeTheme/app-mob-select-changeTheme.vue
+95
-0
未找到文件。
src/app-register.ts
浏览文件 @
b3aad3b0
...
...
@@ -100,5 +100,7 @@ export const AppComponents = {
v
.
component
(
'app-keep-alive'
,
AppKeepAlive
);
// 工作流审批意见控件
v
.
component
(
'app-wf-approval'
,()
=>
import
(
'@/components/app-wf-approval/app-wf-approval.vue'
));
// 主题切换组件
v
.
component
(
'app-mob-select-changeTheme'
,()
=>
import
(
'@/components/app-mob-select-changeTheme/app-mob-select-changeTheme.vue'
));
},
};
\ No newline at end of file
src/components/app-mob-picker/app-mob-picker.vue
浏览文件 @
b3aad3b0
<
template
>
<div
class=
"app-picker"
>
<ion-input
class=
"ibz-input"
:value=
"refvalue"
></ion-input>
<ion-input
class=
"ibz-input"
:value=
"refvalue"
readonly
></ion-input>
<ion-icon
v-show=
"refvalue"
class=
"delete-value "
name=
"close-circle-outline"
@
click=
"onClear"
></ion-icon>
<ion-icon
v-show=
"refvalue == '' || refvalue == null"
class=
"open-picker"
name=
"search-outline"
@
click=
"openView"
></ion-icon>
</div>
...
...
src/components/app-mob-select-changeTheme/app-mob-select-changeTheme.less
0 → 100644
浏览文件 @
b3aad3b0
.app-mobile-select{
width: 100%;
ion-icon{
position: absolute;
right: 15px;
bottom: 12px;
z-index: 2;
}
ion-select{
width: 100%;
max-width: 100%;
padding-left: 0;
}
ion-select::part(text) {
padding-right: 8px;
}
ion-select::part(icon) {
display: none;
}
.ion-select-icon{
right: 17px;
top: 50%;
margin-top: -3px;
position: absolute;
width: 0px;
height: 0px;
color: currentcolor;
pointer-events: none;
border-top: 5px solid;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
color: #615e5ec4;
}
}
\ No newline at end of file
src/components/app-mob-select-changeTheme/app-mob-select-changeTheme.vue
0 → 100644
浏览文件 @
b3aad3b0
<
template
>
<div
class=
"app-mobile-select"
>
<div
class=
"ion-select-icon"
></div>
<ion-select
:value=
"curValue"
@
ionChange=
"change"
interface=
"action-sheet"
:cancel-text=
"$t('app.button.cancel')"
>
<ion-select-option
v-for=
"option of options"
:key=
"option.value"
:value=
"option.value"
class=
"mob-select-text"
>
{{
option
.
text
}}
</ion-select-option>
</ion-select>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
}
from
"vue-property-decorator"
;
@
Component
({
components
:
{},
})
export
default
class
AppSelect
extends
Vue
{
/**
* 当前选中值
* @memberof AppSelect
*/
get
curValue
(){
return
this
.
activeTheme
;
}
set
curValue
(
value
:
any
){
this
.
themeChange
(
value
.
detail
.
value
);
}
public
getTheme
(){
if
(
this
.
$router
.
app
.
$store
.
state
.
selectTheme
)
{
return
this
.
$router
.
app
.
$store
.
state
.
selectTheme
;
}
else
if
(
localStorage
.
getItem
(
'theme-class'
))
{
return
localStorage
.
getItem
(
'theme-class'
);
}
else
{
return
'app-dark-blue-theme'
;
}
}
/**
* change事件
*
* @memberof AppSelect
*/
public
change
(
value
:
any
)
{
this
.
themeChange
(
value
.
detail
.
value
);
}
/**
* 下拉数据数组
*
* @type {any[]}
* @memberof AppSelect
*/
public
options
:
any
[]
=
[
{
value
:
"app-blue-theme"
,
text
:
"dark"
},
{
value
:
"app-dark-blue-theme"
,
text
:
"light"
},
{
value
:
"app-default-theme"
,
text
:
"default"
},
];
/**
* mounted
*/
public
mounted
()
{
this
.
activeTheme
=
this
.
getTheme
();
}
/**
* 激活主题
*
* @type {any[]}
* @memberof AppSelect
*/
public
activeTheme
=
""
;
/**
* 主题变化
*
* @param {*} val
* @memberof AppTheme
*/
public
themeChange
(
val
:
any
)
{
if
(
!
Object
.
is
(
this
.
activeTheme
,
val
))
{
this
.
activeTheme
=
val
;
localStorage
.
setItem
(
'theme-class'
,
val
);
this
.
$router
.
app
.
$store
.
commit
(
'setCurrentSelectTheme'
,
val
);
}
}
}
</
script
>
<
style
lang=
"less"
>
@import './app-mob-select-changeTheme.less';
</
style
>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录