Add more unit test

This commit is contained in:
CzBiX
2019-09-17 14:40:00 +08:00
parent a199263101
commit 6e80579379
7 changed files with 294 additions and 29 deletions

View File

@@ -44,21 +44,7 @@
<script lang="ts">
import Vue, { PropType } from 'vue';
import { mapState, mapMutations } from 'vuex';
export interface Group {
title: string;
icon: string;
children: Child[];
model: boolean;
select: string;
}
export interface Child {
title: string;
key: string | null;
icon: string;
append: string | null;
}
import { FilterGroup as types } from '../types';
interface Data {
model: boolean;
@@ -67,7 +53,7 @@ interface Data {
export default Vue.extend({
props: {
group: Object as PropType<Group>,
group: Object as PropType<types.Group>,
},
data(): Data {
return {

16
src/components/types.ts Normal file
View File

@@ -0,0 +1,16 @@
export declare module FilterGroup {
export interface Group {
title: string;
icon: string;
children: Child[];
model: boolean;
select: string;
}
export interface Child {
title: string;
key: string | null;
icon: string;
append: string | null;
}
}