0.1.8 • Published 2 years ago

multiple-document-vue3 v0.1.8

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

multiple document

multiple document component libaray using Vue3

link

https://github.com/kesay59/multiple-document https://www.npmjs.com/package/multiple-document-vue3

usage

code

<template>
  <div style="width:800px; height:600px;>
    <mulitple-document @readyApi="handleReady"></mulitple-document>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import MultipleDocument from 'multiple-document-vue3';

const documentApi = ref(null);
const handleReady = function (api) {
    documentApi.value = api;
};
<script>

documentApi

{
  list : [], // document list
  method : {
    open : function,
    close : function,
    closeAll : function,
  }
}

document (documentApi.list0)

{
  index,
  order,
  title,
  contentsFn : Promise,
  contents,
  data,
  size,
  iconize,
  maximize,
  increaseOrder(),
  toggleMaximize(),
  toggleIconize(),
  close(),
}

open (documentApi.method.open)

params
@param {string} title
@param {function(promise)} contentsFn
@param {object} data
@param {object} size
@param {boolean} fixedContents
@return {class(Document)}
example
documentApi.method.open(
  {
    title: '1st',
    contentsFn: import('@/page/Test.vue'),
    data: {},
    size: { current: { width: 200, height: 100 }, max: { width: 500, height: 200 }, min: {width: 100, height: 100} },
    fixedContents: true
  }
)

close (documentApi.method.close / document.close())

example
documentApi.method.close(document.index)
documentApi.list[0].close()

test

open

open

close

close

resize, drag

frame

maximize

maximize

iconize

iconize

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago