zhangjie 1 year ago
parent
commit
976fc16b65
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/views/sop/components/dynamic-form-item/SIGN.vue

+ 8 - 1
src/views/sop/components/dynamic-form-item/SIGN.vue

@@ -1,7 +1,11 @@
 <template>
   <div class="sign-box">
     <img class="sign-result-img" :src="valueData" v-if="valueData" />
-    <t-popup trigger="click" :onVisibleChange="visibleChange" v-else>
+    <t-popup
+      v-if="!valueData && !disabled"
+      trigger="click"
+      :onVisibleChange="visibleChange"
+    >
       <template #triggerElement>
         <t-button>添加签名</t-button>
       </template>
@@ -29,6 +33,9 @@ const props = defineProps({
   modelValue: { type: String },
 });
 const emit = defineEmits(['update:modelValue', 'change']);
+const disabled = computed(() => {
+  return !props.config?.writable;
+});
 
 const valueData = ref('');
 const getSignResultImg = () => {