forked from opentiny/tiny-vue
20 lines
528 B
Vue
20 lines
528 B
Vue
<template>
|
|
<div>
|
|
<tiny-button text="图片裁剪" @click="visible = !visible"></tiny-button>
|
|
<tiny-crop
|
|
:cropvisible="visible"
|
|
@update:cropvisible="visible = $event"
|
|
:src="imgUrl"
|
|
:auto-crop-area="0.5"
|
|
></tiny-crop>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="jsx">
|
|
import { ref } from 'vue'
|
|
import { Button as TinyButton, Crop as TinyCrop } from '@opentiny/vue'
|
|
|
|
const visible = ref(false)
|
|
const imgUrl = ref(`${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`)
|
|
</script>
|