stellar-ui-plus 1.25.4 → 1.25.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -120,8 +120,19 @@ async function getImage() {
|
|
|
120
120
|
.fields({ node: true, size: true })
|
|
121
121
|
.exec(res => {
|
|
122
122
|
if (res[0]) {
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
uni.canvasToTempFilePath(
|
|
124
|
+
{
|
|
125
|
+
canvasId: canvasId.value, // 传入 canvas 实例
|
|
126
|
+
success: result => {
|
|
127
|
+
// result.tempFilePath 就是生成的图片路径
|
|
128
|
+
resolve(result.tempFilePath);
|
|
129
|
+
},
|
|
130
|
+
fail: err => {
|
|
131
|
+
reject(err);
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
thas.value
|
|
135
|
+
); // 这里的 thas.value 必须是当前组件实例
|
|
125
136
|
}
|
|
126
137
|
});
|
|
127
138
|
});
|