PrimaryButton.vue 928 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <BackgroundImageButton
  3. backgroundImage="https://xy.wenlvti.net/app_static/images/village/ButtonPrimary.png"
  4. :backgroundCutBorder="20"
  5. :backgroundCutBorderSize="20"
  6. :padding="[22, 40]"
  7. :width="width"
  8. :innerStyle="innerStyle"
  9. center
  10. @click="emit('click')"
  11. >
  12. <ActivityIndicator v-if="loading" :size="36" color="text.content" />
  13. <Text :text="text" fontFamily="SongtiSCBlack" color="text.content" />
  14. </BackgroundImageButton>
  15. </template>
  16. <script setup lang="ts">
  17. import ActivityIndicator from '@/components/basic/ActivityIndicator.vue';
  18. import BackgroundImageButton from '@/components/basic/BackgroundImageButton.vue';
  19. import Text from '@/components/basic/Text.vue';
  20. const props = withDefaults(defineProps<{
  21. text: string;
  22. width?: string|number;
  23. innerStyle?: object;
  24. loading?: boolean;
  25. }>(), {
  26. text: '去发布',
  27. });
  28. const emit = defineEmits(['click']);
  29. </script>