1.0.8 • Published 1 year ago

@jizirui/auto-fix-vue3 v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

安装

npm

npm install @jizirui/auto-fix-vue3

pnpm

pnpm add @jizirui/auto-fix-vue3

yarn

yarn add @jizirui/auto-fix-vue3

引入方式

ESM

import { FullScreenContainer } from '@jizirui/auto-fix-vue3'

CommonJS

const { useAutoFix, FullScreenContainer } = require('@jizirui/auto-fix-vue3/dist/cjs')

UMD

<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="./node_modules/@jizirui/auto-fix-vue3/dist/umd/index.js"></script>
<script>
  const { createApp } = Vue
  const { canvasStyle, canvasWidth, canvasHeight } = window.autoFix.useAutoFix({
  width: 1920, //设计图宽度
  height: 1080 //设计图高度
})

  // 创建 Vue 实例
  createApp().component('full-screen-container', window.autoFix.FullScreenContainer).mount('#app')
</script>

HTML 部分

<!-- 组件形式 -->
<full-screen-container :width="1920" :height="1080">
  <div>柱状图</div>
  <div>饼图</div>
  ...
</full-screen-container>

<!-- Hook -->
<div
  :style="{
    width: canvasWidth + 'px',
    height: canvasHeight + 'px',
    ...canvasStyle
  }"
>
  <div>柱状图</div>
  <div>饼图</div>
  ...
</div>
1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago