Skip to content

Commit

Permalink
feat: support table mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cloydlau committed Dec 8, 2022
1 parent 37fcc3e commit fe9c731
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ English | [简体中文](./docs/README.zh-CN.md)
<a href="https://github.com/cloydlau/json-editor-vue#develop"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg"></a>
</p>

<img width="49.738%" src="./docs/light-theme.png" alt="light-theme">&nbsp;<img width="49.738%" src="./docs/dark-theme.png" alt="dark-theme">
<img width="49.738%" src="./docs/dark-theme.png" alt="dark theme">&nbsp;<img width="49.738%" src="https://raw.githubusercontent.com/josdejong/svelte-jsoneditor/main/misc/jsoneditor_table_mode_screenshot.png" alt="table mode">

<br>

Expand Down Expand Up @@ -707,7 +707,7 @@ Including the boolean properties of `svelte-jsoneditor` like `readOnly` with no
<a name="Mode"></a>

```ts
type Mode = 'tree' | 'text'
type Mode = 'tree' | 'text' | 'table'
```
<br>
Expand Down
4 changes: 2 additions & 2 deletions docs/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<a href="https://github.com/cloydlau/json-editor-vue#develop"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg"></a>
</p>

<img width="49.738%" src="./light-theme.png" alt="light-theme">&nbsp;<img width="49.738%" src="./dark-theme.png" alt="dark-theme">
<img width="49.738%" src="./dark-theme.png" alt="dark theme">&nbsp;<img width="49.738%" src="https://raw.githubusercontent.com/josdejong/svelte-jsoneditor/main/misc/jsoneditor_table_mode_screenshot.png" alt="table mode">

<br>

Expand Down Expand Up @@ -703,7 +703,7 @@ export default {
## 类型

```ts
type Mode = 'tree' | 'text'
type Mode = 'tree' | 'text' | 'table'
```
<br>
Expand Down
Binary file modified docs/dark-theme.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { debounce } from 'lodash-es'
import { pascalCasedName as name } from '../package.json'
import { globalAttrs, globalProps } from './install'

export type Mode = 'tree' | 'text'
export type Mode = 'tree' | 'text' | 'table'

const modelValueProp = isVue3 ? 'modelValue' : 'value'
const updateModelValue = isVue3 ? 'update:modelValue' : 'input'
Expand Down

0 comments on commit fe9c731

Please sign in to comment.