0.0.3 • Published 2 years ago

squad-editor v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SquadEditor

📦 Install

Install with npm:

npm i squad-editor

Install with yarn:

yarn add squad-editor

SquadEditor requires vue >= v3

🦄 Usage

<template>
  <squad-editor
    ref="squadEditorRef"
    v-model:value="value"
    :min-height="state.minHeight"
    :max-height="state.maxHeight"
    :tabKey="state.tabKey"
    :uploader="state.uploader"
  />
</template>

<script setup>
import { ref, reactive } from 'vue'
import SquadEditor from 'squad-editor'
import 'squad-editor/styles/index.css'

const value = ref('')
const squadEditorRef = ref(null)

const uploader = (file) => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve({ name: 'pictureName', url: 'picture.jpg' })
    }, 3000)
  })
}

const state = rective({
  minHeight: '300px',
  maxHeight: '800px',
  tabKey: '  ',
  uploader
})
</script>

📄 License

MIT License © 2019-PRESENT Humandetail