Pārlūkot izejas kodu

限制半径最大值

haojianlong 3 gadi atpakaļ
vecāks
revīzija
93fb42c006

+ 6 - 0
src/components/editview/rightPropertyBar/BaseUnitPro.vue

@@ -88,6 +88,7 @@
             size="mini"
             @change="changeCornerRaduis"
             :min="0"
+            :max="maxR"
             :step-strictly="true"
           ></el-input-number>
         </div>
@@ -136,6 +137,11 @@ export default {
       angle: 0,
     };
   },
+  computed: {
+    maxR() {
+      return Math.min(this.width, this.height) / 2;
+    }
+  },
   methods: {
     changeHeight(val) {
       bus.$emit("updateStyle", "height", val);