-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- ts: 修复类型声明 - ts: vue 类型加强 拆分
- Loading branch information
Showing
11 changed files
with
64 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
import Vue from 'vue' | ||
import { Trouter } from '@types' | ||
|
||
declare module 'vue/types/options' { | ||
interface ComponentOptions<V extends Vue> { | ||
asyncData?: (this: void, context: Trouter.asyncData) => void | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
declare module '*.vue' { | ||
import Vue from 'vue' | ||
export default Vue | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
<template> | ||
<div id="app"> | ||
<transition name="fade" | ||
mode="out-in"> | ||
<router-view class="view"></router-view> | ||
</transition> | ||
</div> | ||
<div id="app"> | ||
<transition name="fade" | ||
mode="out-in"> | ||
<router-view class="view"></router-view> | ||
</transition> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
import Component from 'vue-class-component' | ||
import { State } from 'vuex-class' | ||
import { Watch, Prop } from 'vue-property-decorator' | ||
import { value, computed, watch, onMounted } from 'vue-function-api' | ||
@Component({ | ||
components: {}, | ||
}) | ||
export default class App extends Vue { | ||
mounted() { | ||
console.log('init APP') | ||
} | ||
export default { | ||
name: 'App', | ||
setup() { | ||
onMounted(() => { | ||
console.log(`mounted`) | ||
}) | ||
return {} | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters