Skip to content

Commit

Permalink
refactor: rename models to base
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsGoo committed Aug 20, 2023
1 parent 7d3636f commit 055c00c
Show file tree
Hide file tree
Showing 110 changed files with 175 additions and 161 deletions.
2 changes: 1 addition & 1 deletion docs/RenderComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
</template>
<script setup lang="ts">
import { NCard, NTabPane, NTabs } from 'naive-ui'
import type { CustomComponent } from 'open-data-v/base'
import { getComponentStyle, uuid } from 'open-data-v/designer/utils'
import type { CustomComponent } from 'open-data-v/models'
import type { ComponentOptions, ConcreteComponent } from 'vue'
import { computed, h, reactive } from 'vue'
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ onUnmounted( () => {

```typescript

import { useData } from 'open-data-v/models/hooks'
import { useData } from 'open-data-v/base/hooks'
let chartData:
| Array<{ label: string; value: number }>
| RequestResponse<Array<{ label: string; value: number }>>['afterData'] = []
Expand Down
2 changes: 1 addition & 1 deletion resource/Basic/Image/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</template>

<script setup lang="ts">
import type { CustomComponent } from 'open-data-v/models'
import type { CustomComponent } from 'open-data-v/base'
defineProps<{
component: CustomComponent
Expand Down
4 changes: 2 additions & 2 deletions resource/Basic/Image/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'Image'
class ImageComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Basic/Video/FlvVideo/FlvVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<script lang="ts" setup>
import flvjs from 'flv.js'
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { onMounted, ref } from 'vue'
import type FlvVideoComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Basic/Video/FlvVideo/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'FlvVideo'
class FlvVideoComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderBox1/BorderBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models/hooks'
import { useProp } from 'open-data-v/base/hooks'
import { ref } from 'vue'
import type BorderBoxComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderBox1/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderBox1'
class BorderBoxComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderBox2/BorderBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { ref } from 'vue'
import type BorderBoxComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderBox2/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderBox2'
class BorderBoxComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderBox3/BorderBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { ref } from 'vue'
import type BorderBoxComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderBox3/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderBox3'
class BorderBoxComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderBox4/BorderBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { computed, ref } from 'vue'
import { uuid } from '@/utils/utils'
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderBox4/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderBox4'
class BorderBoxComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderBox5/BorderBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { ref } from 'vue'
import { uuid } from '@/utils/utils'
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderBox5/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderBox5'
class BorderBoxComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderBox6/BorderBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</template>

<script lang="ts" setup>
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { ref } from 'vue'
import type BorderBoxComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderBox6/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderBox6'
class BorderBoxComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderBox7/BorderBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
</template>

<script lang="ts" setup>
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import TinyColor2 from 'tinycolor2'
import { computed, ref } from 'vue'
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderBox7/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderBox7'
class BorderBoxComponent extends CustomComponent {
Expand Down
4 changes: 2 additions & 2 deletions resource/Border/BorderImage/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'BorderImage'
class BorderImageComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Border/BorderImage/src/BorderImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { computed, ref } from 'vue'
import type BorderImageComponent from '../config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Container/Tabs/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
</template>
<script setup lang="ts">
import { Group, Shape, useCanvasState } from 'open-data-v'
import type { CustomComponent } from 'open-data-v/base'
import { DataMode, useProp } from 'open-data-v/base'
import {
filterStyle,
getComponentStyle,
getInnerComponentShapeStyle,
toPercent,
uuid
} from 'open-data-v/designer/utils'
import type { CustomComponent } from 'open-data-v/models'
import { DataMode, useProp } from 'open-data-v/models'
import { computed, defineAsyncComponent, ref, watch } from 'vue'
import type TabsComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Container/Tabs/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'
import { h } from 'vue'

export const componentName = 'Tabs'
Expand Down
2 changes: 1 addition & 1 deletion resource/Decoration/Decoration1/Decoration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { ref } from 'vue'
import type DecorationComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Decoration/Decoration1/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'Decoration1'
class DecorationComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Decoration/Decoration2/Decoration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { ref } from 'vue'
import type DecorationComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Decoration/Decoration2/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'
import { h } from 'vue'

export const componentName = 'Decoration2'
Expand Down
2 changes: 1 addition & 1 deletion resource/Decoration/Decoration3/Decoration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { onMounted, ref } from 'vue'
import type DecorationComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Decoration/Decoration3/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'Decoration3'
class DecorationComponent extends CustomComponent {
Expand Down
2 changes: 1 addition & 1 deletion resource/Decoration/Decoration4/Decoration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { ref } from 'vue'
import type DecorationComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Decoration/Decoration4/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'

export const componentName = 'Decoration4'
class DecorationComponent extends CustomComponent {
Expand Down
4 changes: 2 additions & 2 deletions resource/Gauge/Gauge1/Gauge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
</template>

<script setup lang="ts">
import type { CustomComponent } from 'open-data-v/models'
import { useEventBus, useProp } from 'open-data-v/models'
import type { CustomComponent } from 'open-data-v/base'
import { useEventBus, useProp } from 'open-data-v/base'
import { onMounted, ref } from 'vue'
import { http } from '@/utils/http'
Expand Down
4 changes: 2 additions & 2 deletions resource/Gauge/Gauge1/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'
import { h } from 'vue'

export const componentName = 'Gauge1'
Expand Down
4 changes: 2 additions & 2 deletions resource/Progress/Progress/Progress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
</template>

<script setup lang="ts">
import type { CustomComponent } from 'open-data-v/models'
import { useEventBus, useProp } from 'open-data-v/models'
import type { CustomComponent } from 'open-data-v/base'
import { useEventBus, useProp } from 'open-data-v/base'
import { computed, onMounted, ref } from 'vue'
import { http } from '@/utils/http'
Expand Down
4 changes: 2 additions & 2 deletions resource/Progress/Progress/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'
import { h } from 'vue'

export const componentName = 'Progress'
Expand Down
4 changes: 2 additions & 2 deletions resource/Progress/RankBoard/RankBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</div>
</template>
<script setup lang="ts">
import type { CustomComponent, ResponseData } from 'open-data-v/models'
import { useData, useProp } from 'open-data-v/models'
import type { CustomComponent, ResponseData } from 'open-data-v/base'
import { useData, useProp } from 'open-data-v/base'
import { computed, onMounted, onUnmounted, ref } from 'vue'
import type { RankBoard } from './type'
Expand Down
4 changes: 2 additions & 2 deletions resource/Progress/RankBoard/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, DataMode, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, DataMode, FormType } from 'open-data-v/base'
import { h } from 'vue'

export const componentName = 'ScrollRankingBoard'
Expand Down
4 changes: 2 additions & 2 deletions resource/Table/ScrollTable/ScrollTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
</template>

<script lang="ts" setup>
import type { CustomComponent, ResponseData } from 'open-data-v/models'
import { useData, useProp } from 'open-data-v/models'
import type { CustomComponent, ResponseData } from 'open-data-v/base'
import { useData, useProp } from 'open-data-v/base'
import { computed, ref } from 'vue'
import type { ScrollTableType } from './type'
Expand Down
4 changes: 2 additions & 2 deletions resource/Table/ScrollTable/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, DataMode, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, DataMode, FormType } from 'open-data-v/base'
import { h, shallowRef } from 'vue'

import ScrollTableForm from './Form.vue'
Expand Down
2 changes: 1 addition & 1 deletion resource/Text/DateText/DateText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script setup lang="ts">
import dayjs from 'dayjs'
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { onMounted, onUnmounted, ref } from 'vue'
import type DateTextComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Text/DateText/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'
import { h } from 'vue'

export const componentName = 'DateText'
Expand Down
2 changes: 1 addition & 1 deletion resource/Text/StaticText/StaticText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</template>

<script setup lang="ts">
import { useProp } from 'open-data-v/models'
import { useProp } from 'open-data-v/base'
import { computed, ref } from 'vue'
import type StaticTextComponent from './config'
Expand Down
4 changes: 2 additions & 2 deletions resource/Text/StaticText/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaContainerItem } from 'open-data-v/models'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/models'
import type { MetaContainerItem } from 'open-data-v/base'
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'
import { h } from 'vue'

export const componentName = 'StaticText'
Expand Down
Loading

0 comments on commit 055c00c

Please sign in to comment.