wupengfei
13 小时以前 2500843dbffc841eeab2e0a91d735c56cb6ea357
packages/components/src/components/Result/ResultWithoutBG.vue
@@ -1,19 +1,16 @@
<template>
  <div class="result-without-bg-wrapper" v-bind="$attrs">
    <div class="result-without-bg-content">
      <img class="result-content-icon" :src="icon" />
      <div class="result-content-title">{{ title }}</div>
      <div class="result-content-remark">
        <slot name="remark"> </slot>
      <img class="result-without-bg-content-icon" :src="OssAssets.result.Successv2" />
      <div class="result-without-bg-content-title">{{ title }}</div>
      <div class="result-without-bg-content-remark">
        <slot name="remark">{{ remark }} </slot>
      </div>
    </div>
    <div class="result-wrapper-tips">
      <slot name="tips"> </slot>
    </div>
    <div class="result-wrapper-actions">
    <div class="result-without-bg-wrapper-actions">
      <slot name="actions">
        <div class="chunk-form-actions">
          <nut-button class="recharge-button" type="primary" @click="emit('goBackHome')">
          <nut-button class="recharge-button" type="primary" @click="emit('generate')">
            <div class="recharge-button-inner">
              <div class="recharge-button-text">生成我的推广码</div>
            </div>
@@ -21,12 +18,15 @@
        </div>
      </slot>
    </div>
    <div class="result-without-bg-wrapper-tips">
      <slot name="tips">{{ tips }} </slot>
    </div>
  </div>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { OssAssets } from '../../constants/img';
import { Button as NutButton } from '@nutui/nutui-taro';
defineOptions({
  name: 'ResultWithoutBG',
@@ -35,27 +35,13 @@
type Props = {
  title?: string;
  type?: 'success' | 'fail';
  orderNo?: string;
  servicePhone?: string;
  dangerTips?: string;
  warningTips?: string;
  customerServiceTips?: string;
  tips?: string;
  remark?: string;
};
const props = withDefaults(defineProps<Props>(), {});
const emit = defineEmits<{
  (e: 'goBackHome'): void;
  (e: 'generate'): void;
}>();
const icon = computed(() => {
  switch (props.type) {
    case 'success':
      return OssAssets.result.Success;
    case 'fail':
      return OssAssets.result.Fail;
    default:
      return OssAssets.result.Success;
  }
});
</script>