43 lines
1.1 KiB
Vue
43 lines
1.1 KiB
Vue
|
|
<script setup>
|
||
|
|
import XModal from "./XModal.vue";
|
||
|
|
|
||
|
|
const emits = defineEmits(['success', 'cancel']);
|
||
|
|
const show = defineModel('show');
|
||
|
|
|
||
|
|
const success = () => {
|
||
|
|
emits('success');
|
||
|
|
}
|
||
|
|
|
||
|
|
const cancel = () => {
|
||
|
|
show.value = false;
|
||
|
|
emits('cancel');
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<template>
|
||
|
|
<x-modal v-model:show="show">
|
||
|
|
<view class="py-[40rpx] px-[32rpx]">
|
||
|
|
<slot></slot>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view class="h-[3rpx] w-full bg-[#F2F3F5]"></view>
|
||
|
|
|
||
|
|
<view class="!flex gap-[24rpx] px-[32rpx] pt-[16rpx] pb-[40rpx]">
|
||
|
|
<view
|
||
|
|
@click="cancel"
|
||
|
|
class="rounded-[8rpx] text-[var(--primary-color)] bg-[var(--primary-color-info)] flex-grow py-[20rpx] !flex justify-center items-center">
|
||
|
|
取消
|
||
|
|
</view>
|
||
|
|
<view
|
||
|
|
@click="success"
|
||
|
|
class="rounded-[8rpx] bg-[var(--primary-color)] text-[#fff] flex-grow py-[20rpx] !flex justify-center items-center">
|
||
|
|
确定
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</x-modal>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<style scoped lang="scss">
|
||
|
|
|
||
|
|
</style>
|