Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
海康威视
web-project
Commits
60f70b9c
Commit
60f70b9c
authored
Aug 07, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改home页面的展示错误
parent
140f5795
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
845 additions
and
690 deletions
+845
-690
dataSource.js
src/directive/dataSource.js
+25
-0
home.vue
src/views/home.vue
+820
-690
No files found.
src/directive/dataSource.js
0 → 100644
View file @
60f70b9c
import
{
ref
}
from
"vue"
;
import
http
from
"@/api/http"
;
let
api
=
ref
(
""
);
let
source
=
ref
([]);
let
total
=
ref
(
0
);
const
getData
=
(
params
=
{})
=>
{
http
.
get
(
api
.
value
,
params
).
then
((
res
)
=>
{
source
.
value
=
res
.
data
;
console
.
log
(
source
.
value
);
});
};
export
default
{
install
(
app
)
{
app
.
directive
(
"dataSource"
,
{
mounted
(
el
,
binding
)
{
api
.
value
=
binding
.
value
;
getData
();
},
updated
(
el
,
binding
)
{
console
.
log
(
"updated"
);
},
});
},
};
export
{
source
,
total
,
getData
};
src/views/home.vue
View file @
60f70b9c
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment