Source code diff plugin for Vue@3 This plugin dependent on vue-diff
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);
app.use(SourceDiff, {
componentName: 'SourceDiffNewName',
});
name | type | detault | description |
---|---|---|---|
componentName | string |
SourceDiff |
Global diff component name |
<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>
name | type | detault | values | description |
---|---|---|---|---|
preLabel | string |
'' |
any | |
currLabel | string |
'' |
any | |
diffConfig | object |
Same with vue-diff | any | More Details please see vue-diff |