mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
20 lines
364 B
Svelte
20 lines
364 B
Svelte
<script lang="ts">
|
|
import _ from 'lodash';
|
|
|
|
export let selection;
|
|
export let wrap;
|
|
</script>
|
|
|
|
<textarea
|
|
class="flex1"
|
|
{wrap}
|
|
readonly
|
|
value={selection
|
|
.map(cell => {
|
|
const { value } = cell;
|
|
if (_.isPlainObject(value) || _.isArray(value)) return JSON.stringify(value, undefined, 2);
|
|
return cell.value;
|
|
})
|
|
.join('\n')}
|
|
/>
|