2022-02-07 22:34:53 +08:00
|
|
|
<script lang="ts">
|
2022-03-08 21:35:42 +08:00
|
|
|
import { Table } from "@gradio/table";
|
2022-02-07 22:34:53 +08:00
|
|
|
export let headers: Array<string> = [];
|
2022-03-08 21:35:42 +08:00
|
|
|
export let value: Array<Array<string | number>> = [["", "", ""]];
|
2022-03-29 21:10:35 +08:00
|
|
|
export let default_value: Array<Array<string | number>> = [["", "", ""]];
|
2022-04-09 02:46:00 +08:00
|
|
|
|
|
|
|
export let style: string = "";
|
2022-03-08 21:35:42 +08:00
|
|
|
export let is_static: boolean;
|
2022-03-24 21:08:13 +08:00
|
|
|
|
2022-03-29 21:10:35 +08:00
|
|
|
if (default_value) value = default_value;
|
2022-02-01 21:45:55 +08:00
|
|
|
</script>
|
|
|
|
|
2022-04-09 02:46:00 +08:00
|
|
|
<Table bind:values={value} {headers} {style} on:change editable={!is_static} />
|