更新部分公共组件代码
This commit is contained in:
parent
d43f6da535
commit
2ea09eeaad
|
|
@ -4,7 +4,7 @@
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
</slot>
|
</slot>
|
||||||
<view class="item" @tap.stop="itemClick(index)" v-for="(item,index) in props.list" :key="index">
|
<view class="item" @tap.stop="itemClick(index)" v-for="(item,index) in props.list" :key="index">
|
||||||
<button class="bg-fff btn" hover-class="btn-hover-class">{{item}}</button>
|
<button class="bg-fff btn" hover-class="btn-hover-class" :class="{'color-main':active==index}">{{item}}</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="bock-gary"></view>
|
<view class="bock-gary"></view>
|
||||||
<view class="cancel-btn" @tap="close">
|
<view class="cancel-btn" @tap="close">
|
||||||
|
|
@ -18,6 +18,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
const props=defineProps({
|
const props=defineProps({
|
||||||
|
//那个按钮文字高亮
|
||||||
|
active:{
|
||||||
|
type:Number,
|
||||||
|
default:-1
|
||||||
|
},
|
||||||
autoClose:{
|
autoClose:{
|
||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:true
|
default:true
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@
|
||||||
function cancel() {
|
function cancel() {
|
||||||
show.value = false
|
show.value = false
|
||||||
emits('cancel')
|
emits('cancel')
|
||||||
|
emits('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirm() {
|
function confirm() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue