vue3-source-diff
v1.0.4
Published
A web module for source code comparison base on Vue3
Downloads
34
Maintainers
Readme
vue3-source-diff
Source code diff plugin for Vue@3 This plugin dependent on vue-diff
Install plugin
npm install vue3-source-diff
And install plugin in vue application
import SourceDiff from 'vue3-source-diff';
import 'vue3-source-diff/dist/index.css';
app.use(SourceDiff);
Options
app.use(SourceDiff, {
componentName: 'SourceDiffNewName',
});
| name | type | detault | description |
| ------------- | -------- |--------------| -------------------------- |
| componentName | string
| SourceDiff
| Global diff component name |
Settings
<script setup lang="ts">
const configs = {
mode: 'split',
theme: 'dark',
language: 'plaintext',
prev: '',
current: '',
folding: false,
inputDelay: 0,
virtualScroll: false,
}
</script>
<template>
<SourceDiff :prevLabel="'Prev Source:'"
:currLabel="'Current Source:'"
:diffConf="configs"
/>
</template>
Props
| name | type | detault | values | description |
|------------|----------|--------------------|--------|----------------------------------------------------------------------------|
| preLabel | string
| ''
| any |
| currLabel | string
| ''
| any | |
| diffConfig | object
| Same with vue-diff | any | More Details please see vue-diff |