123456789101112131415161718 |
- <template>
- <div :style="item.style">
- <van-button :block="block" :type="btnType" disabled :native-type="nativeType">
- {{ label }}
- </van-button>
- </div>
- </template>
- <script setup>
- import { ref, defineProps } from 'vue';
- const props = defineProps({
- item: Object,
- });
- const item = JSON.parse(JSON.stringify(props.item || '{}'));
- const label = ref(item.text);
- const block = ref(item.attr.block);
- const nativeType = ref(item.attr.nativeType);
- const btnType = ref(item.attr.type);
- </script>
|