4 changed files with 785 additions and 773 deletions
-
24App.vue
-
44pages.json
-
50pages/index/index.vue
-
1440uni_modules/vrapile-cut-image/components/vrapile-cut-image/vrapile-cut-image.vue
@ -1,17 +1,17 @@ |
|||
<script> |
|||
export default { |
|||
onLaunch: function() { |
|||
// console.log('App Launch') |
|||
}, |
|||
onShow: function() { |
|||
// console.log('App Show') |
|||
}, |
|||
onHide: function() { |
|||
// console.log('App Hide') |
|||
} |
|||
} |
|||
export default { |
|||
onLaunch: function() { |
|||
// console.log('App Launch') |
|||
}, |
|||
onShow: function() { |
|||
// console.log('App Show') |
|||
}, |
|||
onHide: function() { |
|||
// console.log('App Hide') |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
/*每个页面公共css */ |
|||
/*每个页面公共css */ |
|||
</style> |
|||
@ -1,24 +1,24 @@ |
|||
{ |
|||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
|||
{ |
|||
"path": "pages/index/index", |
|||
"style": { |
|||
"navigationBarTitleText": "图片裁剪组件样例", |
|||
"enablePullDownRefresh": false |
|||
} |
|||
} |
|||
], |
|||
"globalStyle": { |
|||
"navigationBarTextStyle": "black", |
|||
"navigationBarTitleText": "图片裁剪组件样例", |
|||
"navigationBarBackgroundColor": "#FFFFFF", |
|||
"backgroundColor": "#FFFFFF", |
|||
"h5": { |
|||
"titleNView": false, |
|||
"maxWidth": 1190, |
|||
"navigationBarTextStyle": "black", |
|||
"navigationBarBackgroundColor": "#FFFFFF" |
|||
} |
|||
}, |
|||
"uniIdRouter": {} |
|||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
|||
{ |
|||
"path": "pages/index/index", |
|||
"style": { |
|||
"navigationBarTitleText": "图片裁剪组件样例", |
|||
"enablePullDownRefresh": false |
|||
} |
|||
} |
|||
], |
|||
"globalStyle": { |
|||
"navigationBarTextStyle": "black", |
|||
"navigationBarTitleText": "图片裁剪组件样例", |
|||
"navigationBarBackgroundColor": "#FFFFFF", |
|||
"backgroundColor": "#FFFFFF", |
|||
"h5": { |
|||
"titleNView": false, |
|||
"maxWidth": 1190, |
|||
"navigationBarTextStyle": "black", |
|||
"navigationBarBackgroundColor": "#FFFFFF" |
|||
} |
|||
}, |
|||
"uniIdRouter": {} |
|||
} |
|||
@ -1,31 +1,31 @@ |
|||
<template> |
|||
<view class="container"> |
|||
<vrapile-cut-image :avatar="imageSrc" @save="save" :key="key"></vrapile-cut-image> |
|||
</view> |
|||
<view class="container"> |
|||
<vrapile-cut-image :avatar="imageSrc" @save="save" :key="key"></vrapile-cut-image> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
// import { uploadAvatar } from "@/api/system/user" |
|||
export default { |
|||
data() { |
|||
return { |
|||
imageSrc: "", |
|||
key: 0 |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化一个图片地址 |
|||
this.imageSrc = "https://minio.ninecloud.top/prod/2024/08/05/67a593d2c2f24f188163b4712100c227.jpg"; |
|||
}, |
|||
methods: { |
|||
save(e){ |
|||
this.imageSrc = e.avatar; |
|||
this.key++; |
|||
// console.log(e.avatar) |
|||
// uploadAvatar({ |
|||
// filePath: e.avatar, |
|||
// }) |
|||
}, |
|||
} |
|||
} |
|||
export default { |
|||
data() { |
|||
return { |
|||
imageSrc: "", |
|||
key: 0 |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化一个图片地址 |
|||
this.imageSrc = "https://minio.ninecloud.top/prod/2024/08/05/67a593d2c2f24f188163b4712100c227.jpg"; |
|||
}, |
|||
methods: { |
|||
save(e){ |
|||
this.imageSrc = e.avatar; |
|||
this.key++; |
|||
// console.log(e.avatar) |
|||
// uploadAvatar({ |
|||
// filePath: e.avatar, |
|||
// }) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
1440
uni_modules/vrapile-cut-image/components/vrapile-cut-image/vrapile-cut-image.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue