Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
0212bfe1
提交
0212bfe1
编写于
7月 03, 2020
作者:
neko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改报错提示友好
上级
6267c71b
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
11 行删除
+6
-11
getters.ts
src/store/modules/view-action/getters.ts
+3
-3
mutations.ts
src/store/modules/view-action/mutations.ts
+3
-8
未找到文件。
src/store/modules/view-action/getters.ts
浏览文件 @
0212bfe1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
export
const
getAppView
=
(
state
:
any
)
=>
(
viewtag
:
string
)
=>
{
export
const
getAppView
=
(
state
:
any
)
=>
(
viewtag
:
string
)
=>
{
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
if
(
!
createdview
)
{
if
(
!
createdview
)
{
console
.
log
(
`----视图
${
viewtag
}
不存在-----
`
)
console
.
warn
(
`获取应用视图实例,,视图「
${
viewtag
}
」不存在
`
)
return
null
;
return
null
;
}
}
return
createdview
;
return
createdview
;
...
@@ -20,7 +20,7 @@ export const getAppView = (state: any) => (viewtag: string) => {
...
@@ -20,7 +20,7 @@ export const getAppView = (state: any) => (viewtag: string) => {
export
const
getViewDataChangeState
=
(
state
:
any
)
=>
(
viewtag
:
string
)
=>
{
export
const
getViewDataChangeState
=
(
state
:
any
)
=>
(
viewtag
:
string
)
=>
{
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
if
(
!
createdview
)
{
if
(
!
createdview
)
{
console
.
log
(
`----视图
${
viewtag
}
不存在-----
`
)
console
.
warn
(
`获取视图数据状态,,视图「
${
viewtag
}
」不存在
`
)
return
false
;
return
false
;
}
}
return
createdview
.
viewdatachange
;
return
createdview
.
viewdatachange
;
...
@@ -34,7 +34,7 @@ export const getViewDataChangeState = (state:any) => (viewtag: string) => {
...
@@ -34,7 +34,7 @@ export const getViewDataChangeState = (state:any) => (viewtag: string) => {
export
const
getRefreshData
=
(
state
:
any
)
=>
(
viewtag
:
string
)
=>
{
export
const
getRefreshData
=
(
state
:
any
)
=>
(
viewtag
:
string
)
=>
{
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
if
(
!
createdview
)
{
if
(
!
createdview
)
{
console
.
log
(
`----视图
${
viewtag
}
不存在-----
`
)
console
.
warn
(
`获取数据刷新状态,视图「
${
viewtag
}
」不存在
`
)
return
null
;
return
null
;
}
}
return
createdview
.
refreshdata
;
return
createdview
.
refreshdata
;
...
...
src/store/modules/view-action/mutations.ts
浏览文件 @
0212bfe1
...
@@ -6,15 +6,10 @@
...
@@ -6,15 +6,10 @@
* @param param1
* @param param1
*/
*/
export
const
createdView
=
(
state
:
any
,
{
viewtag
,
secondtag
}:
{
viewtag
:
string
,
secondtag
:
string
})
=>
{
export
const
createdView
=
(
state
:
any
,
{
viewtag
,
secondtag
}:
{
viewtag
:
string
,
secondtag
:
string
})
=>
{
// 该视图是否被创建
// const index = state.createdviews.findIndex((view: any) => Object.is(view.secondtag, viewtag));
// if (index !== -1) {
// return;
// }
// 原始数据中是否存在
// 原始数据中是否存在
const
appview
=
state
.
appviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
viewtag
,
viewtag
));
const
appview
=
state
.
appviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
viewtag
,
viewtag
));
if
(
!
appview
)
{
if
(
!
appview
)
{
console
.
log
(
`----视图标识
${
viewtag
}
不存在-----`
)
console
.
warn
(
`视图「
${
viewtag
}
」原始数据不存在`
);
return
;
return
;
}
}
const
_appview
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
appview
));
const
_appview
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
appview
));
...
@@ -48,7 +43,7 @@ export const removeView = (state: any, viewtag: string) => {
...
@@ -48,7 +43,7 @@ export const removeView = (state: any, viewtag: string) => {
export
const
setViewDataChange
=
(
state
:
any
,
{
viewtag
,
viewdatachange
}:
{
viewtag
:
string
,
viewdatachange
:
boolean
})
=>
{
export
const
setViewDataChange
=
(
state
:
any
,
{
viewtag
,
viewdatachange
}:
{
viewtag
:
string
,
viewdatachange
:
boolean
})
=>
{
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
if
(
!
createdview
)
{
if
(
!
createdview
)
{
console
.
log
(
`----视图标识
${
viewtag
}
不存在-----
`
)
console
.
warn
(
`设置数据状态变更,视图「
${
viewtag
}
」不存在
`
)
return
;
return
;
}
}
createdview
.
viewdatachange
=
viewdatachange
;
createdview
.
viewdatachange
=
viewdatachange
;
...
@@ -63,7 +58,7 @@ export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { vie
...
@@ -63,7 +58,7 @@ export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { vie
export
const
refreshViewData
=
(
state
:
any
,
{
viewtag
}:
{
viewtag
:
string
})
=>
{
export
const
refreshViewData
=
(
state
:
any
,
{
viewtag
}:
{
viewtag
:
string
})
=>
{
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
const
createdview
=
state
.
createdviews
.
find
((
appview
:
any
)
=>
Object
.
is
(
appview
.
secondtag
,
viewtag
));
if
(
!
createdview
)
{
if
(
!
createdview
)
{
console
.
log
(
`----视图标识
${
viewtag
}
不存在-----
`
)
console
.
warn
(
`刷新视图数据,视图「
${
viewtag
}
」不存在
`
)
return
;
return
;
}
}
createdview
.
refreshdata
+=
1
;
createdview
.
refreshdata
+=
1
;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录