提交 53faccf2 编写于 作者: M mehaotian

update : actionsheet 添加title 属性

上级 d7f1d055
此差异已折叠。
...@@ -8,8 +8,13 @@ ...@@ -8,8 +8,13 @@
</transition> </transition>
<div <div
:class="{'uni-actionsheet_toggle':visible}" :class="{'uni-actionsheet_toggle':visible}"
class="uni-actionsheet"> class="uni-actionsheet">
<div class="uni-actionsheet__menu">
<div class="uni-actionsheet__menu">
<div
v-if="title"
class="uni-actionsheet__title"
>{{ title }}</div>
<div <div
v-for="(title,index) in itemList" v-for="(title,index) in itemList"
:key="index" :key="index"
...@@ -29,7 +34,11 @@ ...@@ -29,7 +34,11 @@
<script> <script>
export default { export default {
name: 'ActionSheet', name: 'ActionSheet',
props: { props: {
title: {
type: String,
default: ''
},
itemList: { itemList: {
type: Array, type: Array,
default () { default () {
...@@ -90,13 +99,13 @@ export default { ...@@ -90,13 +99,13 @@ export default {
background-color: #fcfcfd; background-color: #fcfcfd;
} }
uni-actionsheet .uni-actionsheet__cell { uni-actionsheet .uni-actionsheet__cell ,
uni-actionsheet .uni-actionsheet__title {
position: relative; position: relative;
padding: 10px 0; padding: 10px 0;
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
} }
uni-actionsheet .uni-actionsheet__cell:before { uni-actionsheet .uni-actionsheet__cell:before {
content: " "; content: " ";
position: absolute; position: absolute;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册