Skip to content

zhengjynicolas/vue3-source-diff

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published