import AIcon from '@/components/icon'; import AInput from '@/components/input'; import {defineComponent, ref} from 'vue'; export default defineComponent({ name: 'ExpandableCell', props: { text: String }, setup($props, {emit}) { const value = ref($props.text); const editable = ref(false); const handleChange = (e, v) => { if (v !== undefined) { value.value = v; } }; const check = () => { editable.value = false; console.log('check'); console.log('text: ' + $props.text); console.log('value: ' + value.value); emit('change', value); }; const edit = () => { editable.value = true; }; return { value, editable, handleChange, check, edit }; }, render() { return