| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :show-footers="true">
- <view class="popup-content">
- <view v-if="content" class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px" v-t="content"/>
- <view v-else class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px" v-t="content"></view>
- <rich-text class="popup-text" :nodes="introduce"></rich-text>
- </view>
- <template #footer>
- <button @click="visible = false">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="tosubmitConfirm">{{ t('Btn.Confirm') }}</button>
- </template>
- </cwg-popup>
- </template>
- <script setup>
- import { computed } from 'vue';
- import { useI18n } from 'vue-i18n';
- const props = defineProps({
- visible: {
- type: Boolean,
- default: false
- },
- // 弹窗内容
- content: {
- type: String,
- default: ''
- },
- // 弹窗富文本内容
- introduce: {
- type: String,
- default: ''
- },
- });
- const emit = defineEmits(['update:visible', 'confirm']);
- const { t } = useI18n();
- // Watch for changes in visible prop and emit update event
- const visible = computed({
- get: () => props.visible,
- set: (value) => emit('update:visible', value)
- });
- const tosubmitConfirm = () => {
- visible.value = false;
- emit('confirm');
- }
- </script>
- <style lang="scss" scoped>
- </style>
|