An open API service indexing awesome lists of open source software.

https://github.com/codeDebugTest/vue-diff-view

a git diff vue component
https://github.com/codeDebugTest/vue-diff-view

code-diff vue

Last synced: 5 months ago
JSON representation

a git diff vue component

Awesome Lists containing this project

README

          

# vue-diff-view
> a git diff component for Vue.js

## Usage
```vue



import CodeDiffViewer from 'VueDiffView';

export default {
name: 'app',
components: {
CodeDiffViewer
},
data() {
return {
oldStr: '[\n {\n name: title\n displayName: "标题"\n datatype: "OBJECT"\n }\n]',
newStr: '[\n {\n name: title\n displayName: "TAB"\n datatype: "ARRAY"\n }\n {\n name: title\n displayName: "TAB"\n datatype: "ARRAY"\n }\n]'
};
}
};

```

## DEMO

### overview
![code diff](https://github.com/codeDebugTest/vue-diff-view/blob/master/screenshots/code_diff.png);

![modify file](https://github.com/codeDebugTest/vue-diff-view/raw/master/screenshots/modify.png)

### run demo case
```command line
npm run serve
```

## todo
when select code, not trigger line number.