Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jingan-wisdom
Project
Project
Details
Activity
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
郭铭瑶
jingan-wisdom
Commits
0c968d58
Commit
0c968d58
authored
Oct 26, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
展示屏选取配置展示
parent
9d8242fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
2 deletions
+47
-2
my-title.vue
src/components/MyComponent/MyTitle/my-title.vue
+0
-1
view-page.vue
src/view/view-page.vue
+47
-1
No files found.
src/components/MyComponent/MyTitle/my-title.vue
View file @
0c968d58
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
<img
:src=
"bgImg"
class=
"bg"
/>
<img
:src=
"bgImg"
class=
"bg"
/>
<div
class=
"date"
>
{{
date
}}
{{
time
}}
</div>
<div
class=
"date"
>
{{
date
}}
{{
time
}}
</div>
<img
<img
v-if=
"editable"
src=
"@/assets/images/filter.png"
src=
"@/assets/images/filter.png"
class=
"filter"
class=
"filter"
draggable=
"false"
draggable=
"false"
...
...
src/view/view-page.vue
View file @
0c968d58
<
template
>
<
template
>
<div
class=
"main"
>
<div
class=
"main"
>
<m-title
area=
"title"
>
静安智慧房管
</m-title>
<m-title
area=
"title"
@
touch=
"showModal = true"
>
静安智慧房管
</m-title>
<m-grid
<m-grid
v-if=
"layout.boxNum > 0"
v-if=
"layout.boxNum > 0"
:template=
"layout.template"
:template=
"layout.template"
...
@@ -19,15 +19,40 @@
...
@@ -19,15 +19,40 @@
/>
/>
</div>
</div>
</m-grid>
</m-grid>
<m-modal
v-model=
"showModal"
title=
"选择展示屏"
>
<div
class=
"list-content"
>
<div
v-for=
"item in list"
:key=
"item.id"
class=
"item"
>
<p>
{{
item
.
configName
}}
</p>
<p>
{{
item
.
updateTime
}}
</p>
<n-button
size=
"tiny"
type=
"info"
ghost
dashed
@
click=
"check(item)"
>
查看
</n-button>
</div>
</div>
</m-modal>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
useLayout
from
'@/hooks/useLayout'
import
useLayout
from
'@/hooks/useLayout'
import
useComponent
from
'@/hooks/useComponent'
import
useComponent
from
'@/hooks/useComponent'
import
{
ref
}
from
'vue'
import
{
ajax
,
api
}
from
'@/ajax'
import
{
NSpace
,
NButton
}
from
'naive-ui'
const
{
layout
}
=
useLayout
()
const
{
layout
}
=
useLayout
()
const
{
components
,
componentList
}
=
useComponent
()
const
{
components
,
componentList
}
=
useComponent
()
const
list
=
ref
([])
ajax
.
get
({
url
:
api
.
CONFIGS
,
params
:
{
pageSize
:
9000
}
}).
then
((
res
)
=>
{
list
.
value
=
res
?.
data
?.
content
||
[]
})
const
showModal
=
ref
(
false
)
function
check
({
configJson
})
{
const
config
=
JSON
.
parse
(
configJson
)
config
?.
layout
&&
(
layout
.
value
=
config
.
layout
)
config
?.
components
&&
(
components
.
value
=
config
.
components
)
showModal
.
value
=
false
}
</
script
>
</
script
>
<
style
lang=
"stylus"
scoped
>
<
style
lang=
"stylus"
scoped
>
...
@@ -43,4 +68,25 @@ const { components, componentList } = useComponent()
...
@@ -43,4 +68,25 @@ const { components, componentList } = useComponent()
$blur(0)
$blur(0)
position relative
position relative
overflow hidden
overflow hidden
.list-content
max-height 60vh
overflow-y auto
>.item
font-size .12rem
font-weight bold
display flex
align-items center
padding .05rem
&:nth-of-type(2n+1)
background rgba(0,0,0,.5)
&:hover
background rgba(255,255,255,.2)
>p
flex 1
overflow hidden
white-space nowrap
text-overflow ellipsis
&:nth-of-type(2)
flex 2
margin 0 .1rem
</
style
>
</
style
>
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