Modify package structure

This commit is contained in:
jiaming743 2019-07-03 18:32:59 +08:00
parent 376d723a2b
commit 6c5b5593d4
66 changed files with 310 additions and 138 deletions

View File

@ -1,78 +0,0 @@
import fullScreenContainer from './fullScreenContainer'
import loading from './loading/index.vue'
// border box
import borderBox1 from './borderBox1/index'
import borderBox2 from './borderBox2/index'
import borderBox3 from './borderBox3/index'
import borderBox4 from './borderBox4/index'
import borderBox5 from './borderBox5/index'
import borderBox6 from './borderBox6/index'
import borderBox7 from './borderBox7/index'
import borderBox8 from './borderBox8/index'
import borderBox9 from './borderBox9/index'
// decoration
import decoration1 from './decoration1/index'
import decoration2 from './decoration2/index'
import decoration3 from './decoration3/index'
import decoration4 from './decoration4/index'
import decoration5 from './decoration5/index'
import decoration6 from './decoration6/index'
import decoration7 from './decoration7/index'
import decoration8 from './decoration8/index'
import decoration9 from './decoration9/index'
import decoration10 from './decoration10/index'
// charts
import charts from './charts/index.vue'
import activeRingChart from './activeRingChart'
import waterLevelPond from './waterLevelPond/index.vue'
import percentPond from './percentPond/index.vue'
import flylineChart from './flylineChart'
import conicalColumnChart from './conicalColumnChart'
import digitalFlop from './digitalFlop'
import scrollBoard from './scrollBoard/index.vue'
import scrollRankingBoard from './scrollRankingBoard/index.vue'
export default function (Vue) {
Vue.component('dvFullScreenContainer', fullScreenContainer)
Vue.component('dvLoading', loading)
// border box
Vue.component('dvBorderBox1', borderBox1)
Vue.component('dvBorderBox2', borderBox2)
Vue.component('dvBorderBox3', borderBox3)
Vue.component('dvBorderBox4', borderBox4)
Vue.component('dvBorderBox5', borderBox5)
Vue.component('dvBorderBox6', borderBox6)
Vue.component('dvBorderBox7', borderBox7)
Vue.component('dvBorderBox8', borderBox8)
Vue.component('dvBorderBox9', borderBox9)
// decoration
Vue.component('dvDecoration1', decoration1)
Vue.component('dvDecoration2', decoration2)
Vue.component('dvDecoration3', decoration3)
Vue.component('dvDecoration4', decoration4)
Vue.component('dvDecoration5', decoration5)
Vue.component('dvDecoration6', decoration6)
Vue.component('dvDecoration7', decoration7)
Vue.component('dvDecoration8', decoration8)
Vue.component('dvDecoration9', decoration9)
Vue.component('dvDecoration10', decoration10)
// charts
Vue.component('dvCharts', charts)
Vue.component('dvActiveRingChart', activeRingChart)
Vue.component('dvWaterLevelPond', waterLevelPond)
Vue.component('dvPercentPond', percentPond)
Vue.component('dvFlylineChart', flylineChart)
Vue.component('dvConicalColumnChart', conicalColumnChart)
Vue.component('dvDigitalFlop', digitalFlop)
Vue.component('dvScrollBoard', scrollBoard)
Vue.component('dvScrollRankingBoard', scrollRankingBoard)
}

View File

@ -0,0 +1,25 @@
const { copyDir, fileForEach } = require('./plugin/fs')
const { print } = require('./plugin/print')
const PACKAGE_SRC = './src'
const COMPILE_SRC = './lib'
async function start () {
const copyPackage = await copyDir(PACKAGE_SRC, COMPILE_SRC)
if (!copyPackage) {
print.error('Exception in copyPackage!')
return false
}
fileForEach(COMPILE_SRC, src => {
print.tip(src)
})
}
module.exports = {
start
}

View File

@ -0,0 +1,5 @@
import ActiveRingChart from './src/main.vue'
export default function (Vue) {
Vue.component(ActiveRingChart.name, ActiveRingChart)
}

View File

@ -11,14 +11,14 @@
<script> <script>
import Charts from '@jiaminghi/charts' import Charts from '@jiaminghi/charts'
import dvDigitalFlop from '../digitalFlop' import dvDigitalFlop from '../../digitalFlop/src/main'
import { deepMerge } from '@jiaminghi/charts/lib/util/index' import { deepMerge } from '@jiaminghi/charts/lib/util/index'
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
export default { export default {
name: 'ActiveRingChart', name: 'DvActiveRingChart',
components: { components: {
dvDigitalFlop dvDigitalFlop
}, },

View File

@ -0,0 +1,5 @@
import BorderBox1 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox1.name, BorderBox1)
}

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="dv-border-box-1" :ref="ref"> <div class="dv-border-box-1">
<svg <svg
width="150px" width="150px"
height="150px" height="150px"
@ -53,11 +53,9 @@
<script> <script>
export default { export default {
name: 'BorderBox1', name: 'DvBorderBox1',
data () { data () {
return { return {
ref: 'border-box-1',
border: ['left-top', 'right-top', 'left-bottom', 'right-bottom'] border: ['left-top', 'right-top', 'left-bottom', 'right-bottom']
} }
} }

View File

@ -0,0 +1,5 @@
import BorderBox2 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox2.name, BorderBox2)
}

View File

@ -18,10 +18,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'BorderBox2', name: 'DvBorderBox2',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import BorderBox3 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox3.name, BorderBox3)
}

View File

@ -18,10 +18,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'BorderBox3', name: 'DvBorderBox3',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import BorderBox4 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox4.name, BorderBox4)
}

View File

@ -22,10 +22,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'BorderBox4', name: 'DvBorderBox4',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import BorderBox5 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox5.name, BorderBox5)
}

View File

@ -18,10 +18,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'BorderBox5', name: 'DvBorderBox5',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import BorderBox6 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox6.name, BorderBox6)
}

View File

@ -26,10 +26,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize.js'
export default { export default {
name: 'BorderBox6', name: 'DvBorderBox6',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import BorderBox7 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox7.name, BorderBox7)
}

View File

@ -19,10 +19,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'BorderBox7', name: 'DvBorderBox7',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import BorderBox8 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox8.name, BorderBox8)
}

View File

@ -62,10 +62,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'BorderBox8', name: 'DvBorderBox8',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import BorderBox9 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox9.name, BorderBox9)
}

View File

@ -83,10 +83,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'BorderBox9', name: 'DvBorderBox9',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import Charts from './src/main.vue'
export default function (Vue) {
Vue.component(Charts.name, Charts)
}

View File

@ -5,12 +5,12 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
import Charts from '@jiaminghi/charts' import Charts from '@jiaminghi/charts'
export default { export default {
name: 'Charts', name: 'DvCharts',
mixins: [autoResize], mixins: [autoResize],
props: { props: {
option: { option: {

View File

@ -0,0 +1,5 @@
import ConicalColumnChart from './src/main.vue'
export default function (Vue) {
Vue.component(ConicalColumnChart.name, ConicalColumnChart)
}

View File

@ -40,14 +40,14 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
import { deepMerge } from '@jiaminghi/charts/lib/util/index' import { deepMerge } from '@jiaminghi/charts/lib/util/index'
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
export default { export default {
name: 'ConicalColumnChart', name: 'DvConicalColumnChart',
mixins: [autoResize], mixins: [autoResize],
props: { props: {
config: { config: {

View File

@ -0,0 +1,5 @@
import Decoration1 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration1.name, Decoration1)
}

View File

@ -85,10 +85,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'Decoration1', name: 'DvDecoration1',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
const pointSideLength = 2.5 const pointSideLength = 2.5

View File

@ -0,0 +1,5 @@
import Decoration10 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration10.name, Decoration10)
}

View File

@ -146,10 +146,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'Decoration9', name: 'DvDecoration10',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import Decoration2 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration2.name, Decoration2)
}

View File

@ -31,10 +31,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'Decoration2', name: 'DvDecoration2',
mixins: [autoResize], mixins: [autoResize],
props: { props: {
reverse: { reverse: {

View File

@ -0,0 +1,5 @@
import Decoration3 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration3.name, Decoration3)
}

View File

@ -28,10 +28,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'Decoration3', name: 'DvDecoration3',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
const pointSideLength = 7 const pointSideLength = 7

View File

@ -0,0 +1,5 @@
import Decoration4 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration4.name, Decoration4)
}

View File

@ -23,10 +23,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'Decoration4', name: 'DvDecoration4',
mixins: [autoResize], mixins: [autoResize],
props: ['reverse'], props: ['reverse'],
data () { data () {

View File

@ -0,0 +1,5 @@
import Decoration5 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration5.name, Decoration5)
}

View File

@ -44,12 +44,12 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
import { getPolylineLength } from '@jiaminghi/charts/lib/util' import { getPolylineLength } from '@jiaminghi/charts/lib/util'
export default { export default {
name: 'Decoration5', name: 'DvDecoration5',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import Decoration6 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration6.name, Decoration6)
}

View File

@ -39,12 +39,12 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
import { randomExtend } from '../../util' import { randomExtend } from '../../../util'
export default { export default {
name: 'Decoration6', name: 'DvDecoration6',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
const rectWidth = 7 const rectWidth = 7

View File

@ -0,0 +1,5 @@
import Decoration7 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration7.name, Decoration7)
}

View File

@ -34,7 +34,7 @@
<script> <script>
export default { export default {
name: 'Decoration7' name: 'DvDecoration7'
} }
</script> </script>

View File

@ -0,0 +1,5 @@
import Decoration8 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration8.name, Decoration8)
}

View File

@ -26,10 +26,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'Decoration8', name: 'DvDecoration8',
mixins: [autoResize], mixins: [autoResize],
props: { props: {
reverse: { reverse: {

View File

@ -0,0 +1,5 @@
import Decoration9 from './src/main.vue'
export default function (Vue) {
Vue.component(Decoration9.name, Decoration9)
}

View File

@ -84,10 +84,10 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'Decoration9', name: 'DvDecoration9',
mixins: [autoResize], mixins: [autoResize],
data () { data () {
return { return {

View File

@ -0,0 +1,5 @@
import DigitalFlop from './src/main.vue'
export default function (Vue) {
Vue.component(DigitalFlop.name, DigitalFlop)
}

View File

@ -14,7 +14,7 @@ import { deepMerge } from '@jiaminghi/charts/lib/util/index'
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
export default { export default {
name: 'DigitalFlop', name: 'DvDigitalFlop',
props: { props: {
config: { config: {
type: Object, type: Object,

View File

@ -0,0 +1,5 @@
import FlylineChart from './src/main.vue'
export default function (Vue) {
Vue.component(FlylineChart.name, FlylineChart)
}

View File

@ -153,12 +153,12 @@ import { deepMerge } from '@jiaminghi/charts/lib/util/index'
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
import { randomExtend, getPointDistance } from '../../util/index' import { randomExtend, getPointDistance } from '../../../util/index'
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
export default { export default {
name: 'PercentPond', name: 'DvFlylineChart',
mixins: [autoResize], mixins: [autoResize],
props: { props: {
config: { config: {

View File

@ -0,0 +1,5 @@
import FullScreenContainer from './src/main.vue'
export default function (Vue) {
Vue.component(FullScreenContainer.name, FullScreenContainer)
}

View File

@ -6,7 +6,7 @@
<script> <script>
export default { export default {
name: 'FullScreenContainer', name: 'DvFullScreenContainer',
data () { data () {
return { return {
scale: 0, scale: 0,

77
src/components/index.js Normal file
View File

@ -0,0 +1,77 @@
import fullScreenContainer from './fullScreenContainer/index'
import loading from './loading/index'
// border box
import borderBox1 from './borderBox1/index'
import borderBox2 from './borderBox2/index'
import borderBox3 from './borderBox3/index'
import borderBox4 from './borderBox4/index'
import borderBox5 from './borderBox5/index'
import borderBox6 from './borderBox6/index'
import borderBox7 from './borderBox7/index'
import borderBox8 from './borderBox8/index'
import borderBox9 from './borderBox9/index'
// decoration
import decoration1 from './decoration1/index'
import decoration2 from './decoration2/index'
import decoration3 from './decoration3/index'
import decoration4 from './decoration4/index'
import decoration5 from './decoration5/index'
import decoration6 from './decoration6/index'
import decoration7 from './decoration7/index'
import decoration8 from './decoration8/index'
import decoration9 from './decoration9/index'
import decoration10 from './decoration10/index'
// charts
import charts from './charts/index'
import activeRingChart from './activeRingChart'
import waterLevelPond from './waterLevelPond/index'
import percentPond from './percentPond/index'
import flylineChart from './flylineChart'
import conicalColumnChart from './conicalColumnChart'
import digitalFlop from './digitalFlop'
import scrollBoard from './scrollBoard/index'
import scrollRankingBoard from './scrollRankingBoard/index'
export default function (Vue) {
Vue.use(fullScreenContainer)
Vue.use(loading)
// border box
Vue.use(borderBox1)
Vue.use(borderBox2)
Vue.use(borderBox3)
Vue.use(borderBox4)
Vue.use(borderBox5)
Vue.use(borderBox6)
Vue.use(borderBox7)
Vue.use(borderBox8)
Vue.use(borderBox9)
// decoration
Vue.use(decoration1)
Vue.use(decoration2)
Vue.use(decoration3)
Vue.use(decoration4)
Vue.use(decoration5)
Vue.use(decoration6)
Vue.use(decoration7)
Vue.use(decoration8)
Vue.use(decoration9)
Vue.use(decoration10)
// charts
Vue.use(charts)
Vue.use(activeRingChart)
Vue.use(waterLevelPond)
Vue.use(percentPond)
Vue.use(flylineChart)
Vue.use(conicalColumnChart)
Vue.use(digitalFlop)
Vue.use(scrollBoard)
Vue.use(scrollRankingBoard)
}

View File

@ -0,0 +1,5 @@
import Loading from './src/main.vue'
export default function (Vue) {
Vue.component(Loading.name, Loading)
}

View File

@ -59,7 +59,7 @@
<script> <script>
export default { export default {
name: 'Loading' name: 'DvLoading'
} }
</script> </script>

View File

@ -0,0 +1,5 @@
import PercentPond from './src/main.vue'
export default function (Vue) {
Vue.component(PercentPond.name, PercentPond)
}

View File

@ -49,7 +49,7 @@ import { deepMerge } from '@jiaminghi/charts/lib/util/index'
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
export default { export default {
name: 'PercentPond', name: 'DvPercentPond',
props: { props: {
config: { config: {
type: Object, type: Object,

View File

@ -0,0 +1,5 @@
import ScrollBoard from './src/main.vue'
export default function (Vue) {
Vue.component(ScrollBoard.name, ScrollBoard)
}

View File

@ -47,14 +47,14 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
import { deepMerge } from '@jiaminghi/charts/lib/util/index' import { deepMerge } from '@jiaminghi/charts/lib/util/index'
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
export default { export default {
name: 'ScrollBoard', name: 'DvScrollBoard',
mixins: [autoResize], mixins: [autoResize],
props: { props: {
config: { config: {

View File

@ -0,0 +1,5 @@
import ScrollRankingBoard from './src/main.vue'
export default function (Vue) {
Vue.component(ScrollRankingBoard.name, ScrollRankingBoard)
}

View File

@ -25,14 +25,14 @@
</template> </template>
<script> <script>
import autoResize from '../../mixins/autoResize.js' import autoResize from '../../../mixin/autoResize'
import { deepMerge } from '@jiaminghi/charts/lib/util/index' import { deepMerge } from '@jiaminghi/charts/lib/util/index'
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
export default { export default {
name: 'ScrollRankingBoard', name: 'DvScrollRankingBoard',
mixins: [autoResize], mixins: [autoResize],
props: { props: {
config: { config: {
@ -264,13 +264,13 @@ export default {
width: 50px; width: 50px;
transform: translateX(-100%); transform: translateX(-100%);
background: radial-gradient(rgb(40, 248, 255) 5%, transparent 80%); background: radial-gradient(rgb(40, 248, 255) 5%, transparent 80%);
animation: shine 3s ease-in-out infinite; animation: shine 3s ease-in-out infinite alternate;
} }
} }
} }
@keyframes shine { @keyframes shine {
85% { 80% {
left: 0%; left: 0%;
transform: translateX(-100%); transform: translateX(-100%);
} }

View File

@ -0,0 +1,5 @@
import WaterLevelPond from './src/main.vue'
export default function (Vue) {
Vue.component(WaterLevelPond.name, WaterLevelPond)
}

View File

@ -47,7 +47,7 @@ import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
import CRender from '@jiaminghi/c-render' import CRender from '@jiaminghi/c-render'
export default { export default {
name: 'waterLevelPond', name: 'DvWaterLevelPond',
props: { props: {
config: Object, config: Object,
default: () => ({}) default: () => ({})