fix: type missing issue
This commit is contained in:
parent
bb000036fd
commit
275cadd596
|
|
@ -3,7 +3,6 @@ module.exports = {
|
||||||
parser: 'vue-eslint-parser',
|
parser: 'vue-eslint-parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
project: ['./tsconfig.app.json', './tsconfig.config.json', './tsconfig.cypress-ct.json'],
|
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
extraFileExtensions: ['.vue'],
|
extraFileExtensions: ['.vue'],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"serve": "vite preview --port 4137",
|
"serve": "vite preview --port 4137",
|
||||||
"lint:script": "eslint \"{src/**/*.{ts,vue},cypress/**/*.ts}\"",
|
"lint:script": "eslint \"{src/**/*.{ts,vue},cypress/**/*.ts}\"",
|
||||||
"lint:tsc": "vue-tsc --noEmit",
|
"lint:tsc": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
||||||
"lint": "concurrently \"yarn lint:tsc\" \"yarn lint:script\"",
|
"lint": "concurrently \"yarn lint:tsc\" \"yarn lint:script\"",
|
||||||
"test:unit": "cypress open --component",
|
"test:unit": "cypress open --component",
|
||||||
"test:unit:ci": "cypress run --component --quiet --reporter spec",
|
"test:unit:ci": "cypress run --component --quiet --reporter spec",
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ describe('# AppNavigation', () => {
|
||||||
|
|
||||||
it('should render xxx when user logged', () => {
|
it('should render xxx when user logged', () => {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
userStore.updateUser({ id: 1, username: 'foo', email: '', token: '', bio: undefined, image: undefined })
|
userStore.updateUser({ username: 'foo', email: '', token: '', bio: '', image: '' })
|
||||||
cy.mount(AppNavigation)
|
cy.mount(AppNavigation)
|
||||||
|
|
||||||
cy.get('.nav-item').should('have.length', 4)
|
cy.get('.nav-item').should('have.length', 4)
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,10 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
import type { Comment } from 'src/services/api'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
comment: ArticleComment
|
comment: Comment
|
||||||
username?: string
|
username?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useFavoriteArticle } from 'src/composable/useFavoriteArticle'
|
import { useFavoriteArticle } from 'src/composable/useFavoriteArticle'
|
||||||
|
import type { Article } from 'src/services/api'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class=" form-group">
|
<fieldset class=" form-group">
|
||||||
<input
|
<input
|
||||||
v-model="form.token"
|
v-model="form.password"
|
||||||
class="form-control form-control-lg"
|
class="form-control form-control-lg"
|
||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ import { storeToRefs } from 'pinia'
|
||||||
import ArticlesList from 'src/components/ArticlesList.vue'
|
import ArticlesList from 'src/components/ArticlesList.vue'
|
||||||
import { useFollow } from 'src/composable/useFollowProfile'
|
import { useFollow } from 'src/composable/useFollowProfile'
|
||||||
import { useProfile } from 'src/composable/useProfile'
|
import { useProfile } from 'src/composable/useProfile'
|
||||||
|
import type { Profile } from 'src/services/api'
|
||||||
import { isAuthorized, useUserStore } from 'src/store/user'
|
import { isAuthorized, useUserStore } from 'src/store/user'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="form-group">
|
<fieldset class="form-group">
|
||||||
<input
|
<input
|
||||||
v-model="form.password"
|
v-model="form.token"
|
||||||
type="password"
|
type="password"
|
||||||
class="form-control form-control-lg"
|
class="form-control form-control-lg"
|
||||||
placeholder="New Password"
|
placeholder="New Password"
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,5 @@ import { userStorage } from 'src/store/user'
|
||||||
|
|
||||||
export default function (): void {
|
export default function (): void {
|
||||||
const token = userStorage.get()?.token
|
const token = userStorage.get()?.token
|
||||||
if (token !== undefined) api.setAuthorizationHeader(token)
|
if (token !== undefined) api.setSecurityData(token)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue