Skip to content

Commit

Permalink
fix:build
Browse files Browse the repository at this point in the history
  • Loading branch information
chuyun committed Dec 1, 2019
1 parent 6f885fe commit f9548f0
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
1 change: 0 additions & 1 deletion dist/@types/component/taro-plugin-canvas/utils/draw.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { CanvasContext } from "@tarojs/taro";

import { IText, IIMage, ILine, IBlock } from '../types';
export interface IDrawRadiusRectData {
x: number;
Expand Down
16 changes: 16 additions & 0 deletions dist/weapp/component/taro-plugin-canvas/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.canvas {
width: 750rpx;
height: 750rpx;
}
.canvas.pro {
position: absolute;
bottom: 0;
left: 0;
transform: translate3d(-9999rpx, 0, 0);
}
.canvas.debug {
position: absolute;
bottom: 0;
left: 0;
border: 1rpx solid #ccc;
}
2 changes: 1 addition & 1 deletion dist/weapp/component/taro-plugin-canvas/utils/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function downImage(imageUrl) {
!new RegExp(wx.env.USER_DATA_PATH).test(imageUrl) &&
!/^http:\/\/tmp/.test(imageUrl)) {
Taro.downloadFile({
url: mapHttpToHttps(imageUrl),
url: (imageUrl),
success: (res) => {
if (res.statusCode === 200) {
resolve(res.tempFilePath);
Expand Down
1 change: 0 additions & 1 deletion dist/weapp/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import CanvasDrawer from './component/taro-plugin-canvas/index';

export { default as CanvasDrawer } from './component/taro-plugin-canvas/index';
export default CanvasDrawer;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro-plugin-canvas",
"version": "1.0.5",
"version": "1.0.8-beta.2",
"description": "基于 Taro 框架的微信小程序 canvas 绘图组件,封装了常用的操作,通过配置的方式生成分享图片",
"keywords": [
"taro",
Expand Down
4 changes: 2 additions & 2 deletions src/component/taro-plugin-canvas/utils/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ export function downImage(imageUrl: string) {
!/^http:\/\/tmp/.test(imageUrl)
) {
Taro.downloadFile({
// url: (imageUrl),
url: (imageUrl),
// TODO
url: mapHttpToHttps(imageUrl),
// url: mapHttpToHttps(imageUrl),
success: (res) => {
if (res.statusCode === 200) {
resolve(res.tempFilePath);
Expand Down
3 changes: 2 additions & 1 deletion tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"include": [
"src/components/*",
"src/index.ts",
"src/component/taro-plugin-canvas/types.ts"
"src/component/taro-plugin-canvas/types.ts",
"src/component/**/*"
],
"compileOnSave": false
}

0 comments on commit f9548f0

Please sign in to comment.