File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 2525 </Tooltip >
2626 </Col >
2727 <Col span =" 4" >
28- <Button long v-if =" item.isLock" icon =" md-lock" type =" text" ></Button >
29- <Button long v-else icon =" md-unlock" type =" text" ></Button >
28+ <Button
29+ long
30+ v-if =" item.isLock"
31+ @click =" doLock(item)"
32+ icon =" md-lock"
33+ type =" text"
34+ ></Button >
35+ <Button long v-else @click =" doLock(item)" icon =" md-unlock" type =" text" ></Button >
3036 </Col >
3137 </Row >
3238 </div >
@@ -153,6 +159,12 @@ const getList = () => {
153159 list .value = uniqBy (unref (list), ' id' );
154160};
155161
162+ const doLock = (item ) => {
163+ select (item .id );
164+ item .isLock ? canvasEditor .unLock () : canvasEditor .lock ();
165+ canvasEditor .canvas .discardActiveObject ();
166+ };
167+
156168onMounted (() => {
157169 getList ();
158170 canvasEditor .canvas .on (' after:render' , getList);
You can’t perform that action at this time.
0 commit comments