Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
f3b2594c
提交
f3b2594c
编写于
11月 08, 2022
作者:
RedPig97
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:工具栏指令变更
上级
b64ca4a5
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
30 行增加
和
30 行删除
+30
-30
app-register.ts
src/app-register.ts
+2
-2
button-loading.ts
src/directive/button-loading/button-loading.ts
+28
-28
未找到文件。
src/app-register.ts
浏览文件 @
f3b2594c
...
...
@@ -106,7 +106,7 @@ import AppMapPosition from './components/app-map-position/app-map-position.vue';
import
AppSortBar
from
'./components/app-sort-bar/app-sort-bar.vue'
;
import
AppAfterTime
from
'./components/app-after-time/app-after-time.vue'
;
import
AppInputIp
from
'./components/app-input-ip/app-input-ip.vue'
;
import
Loadding
from
'./directive/loadding/load
ding'
;
import
ButtonLoading
from
'./directive/button-loading/button-loa
ding'
;
import
AppColorSpan
from
'./components/app-color-span/app-color-span.vue'
;
import
AppColorPicker
from
'./components/app-color-picker/app-color-picker.vue'
;
import
AppScrollContainer
from
'./components/layout-element/structure/app-scroll-container/app-scroll-container.vue'
;
...
...
@@ -258,7 +258,7 @@ export const AppComponents = {
v
.
component
(
'app-sort-bar'
,
AppSortBar
);
v
.
component
(
'app-after-time'
,
AppAfterTime
);
v
.
component
(
'app-input-ip'
,
AppInputIp
);
v
.
directive
(
'
loading'
,
Load
ding
);
v
.
directive
(
'
button-loading'
,
ButtonLoa
ding
);
v
.
component
(
'app-color-span'
,
AppColorSpan
);
v
.
component
(
'app-color-picker'
,
AppColorPicker
);
v
.
component
(
'app-scroll-container'
,
AppScrollContainer
);
...
...
src/directive/
loadding/load
ding.ts
→
src/directive/
button-loading/button-loa
ding.ts
浏览文件 @
f3b2594c
...
...
@@ -5,48 +5,48 @@ import { Subscription } from 'rxjs';
* 按钮loadding状态服务
*
* @export
* @class
Load
dingService
* @class
ButtonLoa
dingService
*/
export
class
Load
dingService
{
export
class
ButtonLoa
dingService
{
/**
* 单例变量声明
*
* @private
* @static
* @type {
Load
dingService}
* @memberof
Load
dingService
* @type {
ButtonLoa
dingService}
* @memberof
ButtonLoa
dingService
*/
private
static
loaddingService
:
Load
dingService
;
private
static
ButtonLoadingService
:
ButtonLoa
dingService
;
/**
* loadding状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof
Load
dingService
* @memberof
ButtonLoa
dingService
*/
public
load
dingStateEvent
:
Subscription
|
null
=
null
;
public
buttonLoa
dingStateEvent
:
Subscription
|
null
=
null
;
/**
* @description dom映射对象
* @type {Map<string, any>}
* @memberof
Load
dingService
* @memberof
ButtonLoa
dingService
*/
public
domMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 获取
Load
dingService 单例对象
* 获取
ButtonLoa
dingService 单例对象
*
* @static
* @returns {
Load
dingService}
* @memberof
Load
dingService
* @returns {
ButtonLoa
dingService}
* @memberof
ButtonLoa
dingService
*/
public
static
getInstance
():
Load
dingService
{
if
(
!
LoaddingService
.
load
dingService
)
{
LoaddingService
.
loaddingService
=
new
Load
dingService
();
public
static
getInstance
():
ButtonLoa
dingService
{
if
(
!
ButtonLoadingService
.
ButtonLoa
dingService
)
{
ButtonLoadingService
.
ButtonLoadingService
=
new
ButtonLoa
dingService
();
}
return
this
.
load
dingService
;
return
this
.
ButtonLoa
dingService
;
}
/**
...
...
@@ -54,7 +54,7 @@ export class LoaddingService {
*
* @param {any} el 指令所绑定的元素
* @param {any} binding 指令附加参数
* @memberof
Load
dingService
* @memberof
ButtonLoa
dingService
*/
public
initElement
(
el
:
any
,
binding
:
any
){
if
(
binding
&&
binding
.
arg
){
...
...
@@ -76,11 +76,11 @@ export class LoaddingService {
*
* @param {any} el 指令所绑定的元素
* @param {any} binding 指令附加参数
* @memberof
Load
dingService
* @memberof
ButtonLoa
dingService
*/
public
setLoadState
(
el
:
any
,
binding
:
any
){
if
(
!
this
.
load
dingStateEvent
)
{
this
.
load
dingStateEvent
=
Http
.
getInstance
().
getNotifyObject
().
subscribe
((
result
:
any
)
=>
{
if
(
!
this
.
buttonLoa
dingStateEvent
)
{
this
.
buttonLoa
dingStateEvent
=
Http
.
getInstance
().
getNotifyObject
().
subscribe
((
result
:
any
)
=>
{
if
(
result
&&
result
.
action
&&
Object
.
is
(
result
.
action
,
'setloadstate'
)){
if
(
result
&&
result
.
state
){
this
.
addLoadState
();
...
...
@@ -97,7 +97,7 @@ export class LoaddingService {
*
* @param {any} el 指令所绑定的元素
* @param {any} binding 指令附加参数
* @memberof
Load
dingService
* @memberof
ButtonLoa
dingService
*/
public
addLoadState
(){
this
.
domMap
.
forEach
((
dom
:
any
,
key
:
string
)
=>
{
...
...
@@ -110,7 +110,7 @@ export class LoaddingService {
*
* @param {any} el 指令所绑定的元素
* @param {any} binding 指令附加参数
* @memberof
Load
dingService
* @memberof
ButtonLoa
dingService
*/
public
removeLoadState
(){
this
.
domMap
.
forEach
((
dom
:
any
,
key
:
string
)
=>
{
...
...
@@ -123,12 +123,12 @@ export class LoaddingService {
*
* @param {any} el 指令所绑定的元素
* @param {any} binding 指令附加参数
* @memberof
Load
dingService
* @memberof
ButtonLoa
dingService
*/
public
clearResource
(
el
:
any
,
binding
:
any
){
if
(
this
.
load
dingStateEvent
&&
this
.
domMap
.
size
==
0
){
this
.
load
dingStateEvent
.
unsubscribe
();
this
.
load
dingStateEvent
=
null
;
if
(
this
.
buttonLoa
dingStateEvent
&&
this
.
domMap
.
size
==
0
){
this
.
buttonLoa
dingStateEvent
.
unsubscribe
();
this
.
buttonLoa
dingStateEvent
=
null
;
}
const
uuid
:
string
=
el
.
getAttribute
(
'uuid'
);
if
(
uuid
&&
this
.
domMap
.
has
(
uuid
))
{
...
...
@@ -140,12 +140,12 @@ export class LoaddingService {
}
export
default
{
bind
(
el
:
any
,
binding
:
any
)
{
Load
dingService
.
getInstance
().
initElement
(
el
,
binding
);
ButtonLoa
dingService
.
getInstance
().
initElement
(
el
,
binding
);
},
inserted
(
el
:
any
,
binding
:
any
)
{
Load
dingService
.
getInstance
().
setLoadState
(
el
,
binding
);
ButtonLoa
dingService
.
getInstance
().
setLoadState
(
el
,
binding
);
},
unbind
(
el
:
any
,
binding
:
any
)
{
Load
dingService
.
getInstance
().
clearResource
(
el
,
binding
);
ButtonLoa
dingService
.
getInstance
().
clearResource
(
el
,
binding
);
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录