41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
if (!Math) {
|
|
QfImageCropper();
|
|
}
|
|
const QfImageCropper = () => "../../uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.js";
|
|
const _sfc_main = {
|
|
__name: "camera",
|
|
setup(__props) {
|
|
const src = common_vendor.ref("");
|
|
const type = common_vendor.ref(0);
|
|
const width = common_vendor.ref(900);
|
|
const height = common_vendor.ref(600);
|
|
const handleCrop = (e) => {
|
|
common_vendor.index.setStorageSync(`imgkey${type.value}`, e.tempFilePath);
|
|
common_vendor.index.navigateBack();
|
|
};
|
|
common_vendor.onLoad((options) => {
|
|
src.value = options.url;
|
|
type.value = options.type;
|
|
if (options.size) {
|
|
width.value = 1500;
|
|
height.value = 1e3;
|
|
}
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.o(handleCrop),
|
|
b: common_vendor.p({
|
|
src: src.value,
|
|
width: width.value,
|
|
height: height.value,
|
|
radius: 0
|
|
})
|
|
};
|
|
};
|
|
}
|
|
};
|
|
wx.createPage(_sfc_main);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/compontent/public/camera.js.map
|