ananzhusen 7 месяцев назад
Родитель
Сommit
ce0b34fa7e
1 измененных файлов с 32 добавлено и 1 удалено
  1. 32 1
      src/views/components/PenProps.vue

+ 32 - 1
src/views/components/PenProps.vue

@@ -357,9 +357,39 @@
                     </div>
                   </t-tooltip>
                 </div>
+                <div v-if="data.pen.type" class="form-item">
+                  <label style="width: 52px">{{$t('边框宽度')}} </label>
+                  <t-input-number
+                    theme="normal"
+                    placeholder="边框宽度"
+                    v-model="data.pen.borderWidth"
+                    :min="0"
+                    :decimalPlaces="0"
+                    @change="changeValue('borderWidth')"
+                    style="width: 73px"
+                  />
+                  <label style="width: 52px;" class="ml-8">{{$t('边框颜色')}} </label>
+                  <t-color-picker
+                    class="simple mt-8 ml-8"
+                    format="CSS"
+                    :enable-alpha="true"
+                    :recent-colors="null"
+                    :swatch-colors="defaultPureColor"
+                    :color-modes="['monochrome']"
+                    :show-primary-color-preview="false"
+                    :clearable="true"
+                    v-model="data.pen.borderColor"
+                    @change="changeValue('borderColor')"
+                  />
+                </div>
                 <div class="form-item">
                   <label style="width: 52px">{{$t('起点箭头')}} </label>
-                  <t-select v-model="data.pen.fromArrow" @change="changeValue('fromArrow')" style="width: 80px" :placeholder="$t('线条样式')">
+                  <t-select
+                    v-model="data.pen.fromArrow"
+                    :placeholder="$t('线条样式')"
+                    @change="changeValue('fromArrow')"
+                    style="width: 80px"
+                  >
                     <template #valueDisplay="{ value }">
                       <svg v-if="value" class="l-icon" aria-hidden="true">
                         <use :xlink:href="fromArrows.find(item=>item.value===value).icon"></use>
@@ -1500,6 +1530,7 @@ const changeID = (value: any) => {
 };
 
 const changeRectValue = (prop: string) => {
+  data.rect[prop] = data.rect[prop]||1;
   if(data.pen.parentId){
     if(['x','y','width','height'].includes(prop)){
       const scale = meta2d.store.data.scale;