Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
593252e6
Commit
593252e6
authored
Dec 27, 2022
by
赵伟庚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[style](block-radius): 代码格式化
按照代码规范格式化代码
parent
4c101843
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
40 deletions
+22
-40
src/components/general/block-radius.vue
src/components/general/block-radius.vue
+22
-40
No files found.
src/components/general/block-radius.vue
View file @
593252e6
<
template
>
<
template
>
<div
class=
"block_radius"
>
<div
class=
"block_radius"
>
<div
class=
"right_cont"
>
<div
class=
"right_cont"
>
<div
v-if=
"show_header"
class=
"block_header"
>
<div
v-if=
"show_header"
class=
"block_header"
>
<div
class=
"icon_box"
>
<div
class=
"icon_box"
>
<bg-icon
style=
"font-size: 14px; color: #fff
;
"
:icon=
"bgIcon"
></bg-icon>
<bg-icon
style=
"font-size: 14px; color: #fff"
:icon=
"bgIcon"
></bg-icon>
</div>
</div>
<div
class=
"top_title"
>
{{
title
}}
</div>
<div
class=
"top_title"
>
{{
title
}}
</div>
<div
v-if=
"selectArr.length > 0"
>
<div
v-if=
"selectArr.length > 0"
>
<el-select
<el-select
@
change=
"selectChange"
v-model=
"currentSelectValue"
placeholder=
"请选择"
>
@
change=
"selectChange"
<el-option
v-for=
"item in selectArr"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
v-model=
"currentSelectValue"
placeholder=
"请选择"
>
<el-option
v-for=
"item in selectArr"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-select>
</div>
</div>
<div
v-if=
"buttons_arr"
class=
"block_header_button_group"
>
<div
v-if=
"buttons_arr"
class=
"block_header_button_group"
>
...
@@ -29,8 +17,7 @@
...
@@ -29,8 +17,7 @@
:key=
"index"
:key=
"index"
class=
"block_header_button"
class=
"block_header_button"
:class=
"active_button == index ? 'active' : ''"
:class=
"active_button == index ? 'active' : ''"
@
click=
"changeButton(index)"
@
click=
"changeButton(index)"
>
>
{{
item
}}
{{
item
}}
</div>
</div>
</div>
</div>
...
@@ -42,10 +29,8 @@
...
@@ -42,10 +29,8 @@
</div>
</div>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
reactive
,
toRefs
,
onBeforeMount
}
from
'
vue
'
import
{
reactive
,
toRefs
,
onBeforeMount
}
from
"
vue
"
;
const
props
=
defineProps
({
const
props
=
defineProps
({
show_header
:
{
show_header
:
{
...
@@ -53,8 +38,8 @@ const props = defineProps({
...
@@ -53,8 +38,8 @@ const props = defineProps({
default
:
false
,
default
:
false
,
},
},
selectValue
:
{
selectValue
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
""
default
:
""
,
},
},
selectArr
:
{
selectArr
:
{
type
:
Array
,
type
:
Array
,
...
@@ -70,7 +55,7 @@ const props = defineProps({
...
@@ -70,7 +55,7 @@ const props = defineProps({
},
},
bgIcon
:
{
bgIcon
:
{
type
:
String
,
type
:
String
,
default
:
""
default
:
""
,
},
},
title
:
{
title
:
{
type
:
String
,
type
:
String
,
...
@@ -78,42 +63,39 @@ const props = defineProps({
...
@@ -78,42 +63,39 @@ const props = defineProps({
},
},
background_color
:
{
background_color
:
{
type
:
String
,
type
:
String
,
default
:
"
#fff
"
default
:
"
#fff
"
,
},
// header条背景色
},
// header条背景色
showLeft
:
{
showLeft
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
,
},
},
noPadding
:
{
noPadding
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
,
},
},
})
})
;
const
emit
=
defineEmits
([
'
selectChange
'
,
'
changeButton
'
])
const
emit
=
defineEmits
([
"
selectChange
"
,
"
changeButton
"
]);
const
state
=
reactive
({
const
state
=
reactive
({
currentSelectValue
:
null
,
currentSelectValue
:
null
,
active_button
:
0
active_button
:
0
,
})
})
;
const
selectChange
=
(
val
)
=>
{
const
selectChange
=
(
val
)
=>
{
state
.
currentSelectValue
=
val
;
state
.
currentSelectValue
=
val
;
emit
(
'
selectChange
'
,
val
);
emit
(
"
selectChange
"
,
val
);
}
}
;
const
changeButton
=
(
index
)
=>
{
const
changeButton
=
(
index
)
=>
{
if
(
state
.
active_button
!=
index
)
{
if
(
state
.
active_button
!=
index
)
{
state
.
active_button
=
index
;
state
.
active_button
=
index
;
emit
(
"
changeButton
"
,
index
);
emit
(
"
changeButton
"
,
index
);
}
}
}
}
;
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
state
.
currentSelectValue
=
props
.
selectValue
state
.
currentSelectValue
=
props
.
selectValue
;
})
})
;
const
{
const
{
currentSelectValue
,
active_button
}
=
toRefs
(
state
);
currentSelectValue
,
active_button
,
}
=
toRefs
(
state
)
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
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