mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	Ability to edit contact information in conversation sidebar Co-authored-by: Sojan <sojan@pepalo.com>
		
			
				
	
	
		
			41 lines
		
	
	
		
			663 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			663 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <label>
 | 
						|
    <span v-if="label">{{ label }}</span>
 | 
						|
    <woot-thumbnail v-if="src" size="80px" :src="src" />
 | 
						|
    <input
 | 
						|
      id="file"
 | 
						|
      ref="file"
 | 
						|
      type="file"
 | 
						|
      accept="image/*"
 | 
						|
      @change="handleImageUpload"
 | 
						|
    />
 | 
						|
    <slot></slot>
 | 
						|
  </label>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
export default {
 | 
						|
  props: {
 | 
						|
    label: {
 | 
						|
      type: String,
 | 
						|
      default: '',
 | 
						|
    },
 | 
						|
    src: {
 | 
						|
      type: String,
 | 
						|
      default: '',
 | 
						|
    },
 | 
						|
  },
 | 
						|
  watch: {},
 | 
						|
  methods: {
 | 
						|
    handleImageUpload(event) {
 | 
						|
      const [file] = event.target.files;
 | 
						|
 | 
						|
      this.$emit('change', {
 | 
						|
        file,
 | 
						|
        url: URL.createObjectURL(file),
 | 
						|
      });
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
</script>
 |