File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
<!--
2
2
* @Author: 秦少卫
3
3
* @Date: 2022-09-03 19:16:55
4
- * @LastEditors: 秦少卫
5
- * @LastEditTime: 2024-10-07 17:25:24
4
+ * @LastEditors: June
5
+ * @LastEditTime: 2024-11-22 15:28:43
6
6
* @Description: 尺寸设置
7
7
-->
8
8
@@ -38,18 +38,16 @@ import modalSzie from '@/components/common/modalSzie';
38
38
39
39
const { isSelect , canvasEditor } = useSelect ();
40
40
41
- const DefaultSize = {
42
- width: 900 ,
43
- height: 1200 ,
44
- };
45
-
46
41
const modalSizeRef = ref (null );
47
42
48
- let width = ref (DefaultSize . width );
49
- let height = ref (DefaultSize . height );
43
+ const width = ref (0 );
44
+ const height = ref (0 );
50
45
51
46
onMounted (() => {
52
- canvasEditor .setSize (width .value , height .value );
47
+ const size = canvasEditor .getWorkspase ();
48
+ const { width: w , height: h } = size || {};
49
+ width .value = w;
50
+ height .value = h;
53
51
canvasEditor .on (' sizeChange' , (w , h ) => {
54
52
width .value = w;
55
53
height .value = h;
You can’t perform that action at this time.
0 commit comments