feige996 ab669ce491 style(components): 统一按钮样式为 primary 和 warning 类型
将上传和请求组件中的按钮样式统一为 type="primary",并将重置按钮改为 type="warning" 以保持一致性
2025-06-22 11:38:04 +08:00

39 lines
778 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<route lang="json5" type="page">
{
layout: 'default',
style: {
navigationBarTitleText: '上传-状态一体化',
},
}
</route>
<script lang="ts" setup>
const { loading, data, run } = useUpload()
</script>
<template>
<view class="p-4 text-center">
<up-button type="primary" @click="run">
选择图片并上传
</up-button>
<view v-if="loading" class="h-10 text-blue">
上传...
</view>
<template v-else>
<view class="m-2">
上传后返回的接口数据
</view>
<view class="m-2">
{{ data }}
</view>
<view v-if="data" class="h-80 w-full">
<image :src="data.url" mode="scaleToFill" />
</view>
</template>
</view>
</template>
<style lang="scss" scoped>
//
</style>