Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-27 09:18:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
be567cdff89e78779a66ee079d2dd8afaab9217f
be567cdf
1 parent
7c7e66b2
新增eslint-plugin-vue页面测试
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
30 deletions
.eslintrc.js
package.json
src/views/client/chooseBook.vue
yarn.lock
.eslintrc.js
0 → 100644
View file @
be567cd
module
.
exports
=
{
extends
:
[
// add more generic rule sets here, such as:
// 'eslint:recommended',
'plugin:vue/vue3-recommended'
,
// 'plugin:vue/recommended' // Use this if you are using Vue.js 2.x.
],
rules
:
{
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
"vue/max-attributes-per-line"
:
[
"error"
,
{
"singleline"
:
{
"max"
:
10
},
"multiline"
:
{
"max"
:
5
}
}]
}
}
package.json
View file @
be567cd
...
...
@@ -8,12 +8,14 @@
"build"
:
"vite build"
,
"build-watch"
:
"vite build --watch"
,
"build-ts"
:
"vue-tsc --noEmit && vite build"
,
"serve"
:
"vite preview"
"serve"
:
"vite preview"
,
"cypress:open"
:
"cypress open"
},
"dependencies"
:
{
"@vitejs/plugin-legacy"
:
"^1.8.2"
,
"@vueuse/core"
:
"^8.5.0"
,
"animate.css"
:
"^4.1.1"
,
"global"
:
"^4.4.0"
,
"html2canvas"
:
"^1.4.1"
,
"jquery"
:
"^3.6.0"
,
"js-cookie"
:
"^3.0.1"
,
...
...
@@ -35,7 +37,11 @@
"@vitejs/plugin-vue"
:
"^2.3.3"
,
"@vue/compiler-sfc"
:
"^3.2.34"
,
"axios"
:
"^0.26.1"
,
"chai"
:
"^4.3.6"
,
"cypress"
:
"^9.7.0"
,
"eslint-plugin-vue"
:
"^9.0.1"
,
"less"
:
"^4.1.2"
,
"mocha"
:
"^10.0.0"
,
"pinia"
:
"^2.0.14"
,
"postcss-px-to-viewport"
:
"^1.1.1"
,
"qs"
:
"^6.10.3"
,
...
...
src/views/client/chooseBook.vue
View file @
be567cd
<template>
<div class="choose-book-page content-bg">
<div class="modify-top"
></div
>
<div
class="belong-school" v-if="kg_id
">
<van-row align="center" justify="center" style="position: relative; top: 50%; transform: translateY(-50%)
;
">
<div class="modify-top"
/
>
<div
v-if="kg_id" class="belong-school
">
<van-row align="center" justify="center" style="position: relative; top: 50%; transform: translateY(-50%)">
<van-col span="2">
<van-image v-if="kgInfo.logo" round width="3rem" height="3rem" lazy-load :src="kgInfo.logo"
style="vertical-align: text-bottom;">
<template v-slot:error>加载失败</template>
<van-image
v-if="kgInfo.logo" round width="3rem" height="3rem" lazy-load
:src="kgInfo.logo"
style="vertical-align: text-bottom"
>
<template #error>
加载失败
</template>
</van-image>
<van-image v-else round width="3rem" height="3rem" lazy-load :src="icon_avatar"
style="vertical-align: text-bottom;">
<template v-slot:error>加载失败</template>
<van-image
v-else round width="3rem" height="3rem" lazy-load
:src="icon_avatar"
style="vertical-align: text-bottom"
>
<template #error>
加载失败
</template>
</van-image>
</van-col>
<van-col span="22">
<p class="title">{{ kgInfo.name }}</p>
<p class="title">
{{ kgInfo.name }}
</p>
</van-col>
</van-row>
</div>
<div v-else style="height: 2.5rem
;"></div
>
<div style="position: relative
;
">
<div class="ding left"
></div
>
<div style="position: relative; z-index: 100
;
">
<div v-else style="height: 2.5rem
" /
>
<div style="position: relative">
<div class="ding left"
/
>
<div style="position: relative; z-index: 100">
<van-row>
<van-col span="4"
></van-col
>
<van-col span="4"
/
>
<van-col span="16">
<my-button type="custom" :custom-style="styleObject3">幼儿园爱心书籍</my-button>
<my-button type="custom" :custom-style="styleObject3">
幼儿园爱心书籍
</my-button>
</van-col>
<van-col span="4"
></van-col
>
<van-col span="4"
/
>
</van-row>
</div>
<div class="ding right"
></div
>
<div class="ding right"
/
>
</div>
<div class="book-list">
<template v-for="(item, key) in kgInfo.book_list" :key="key">
<book-card type="C" :item="item" @on-click="go('/client/bookDetail', { id: item.id })"
></book-card
>
<book-card type="C" :item="item" @on-click="go('/client/bookDetail', { id: item.id })"
/
>
</template>
<van-empty v-if="emptyStatus" class="custom-image" :image="no_image" description="暂无书籍信息" />
</div>
<div style="height: 1rem
;"></div
>
<shortcut-fixed type="C" :item="shortcutItem"
></shortcut-fixed
>
<div style="height: 1rem
" /
>
<shortcut-fixed type="C" :item="shortcutItem"
/
>
</div>
</template>
<script setup>
import { _ } from '@/utils/generatePackage'
import { no_image, icon_avatar } from '@/utils/generateIcons'
import { MyButton, ShortcutFixed, BookCard } from '@/utils/generateModules'
import { styleObject3 } from '@/settings/designSetting.js'
import { no_image, icon_avatar } from '@/utils/generateIcons';
import { MyButton, ShortcutFixed, BookCard } from '@/utils/generateModules';
import { styleObject3 } from '@/settings/designSetting.js';
import { useBookList, useShortcutBar } from '@/composables';
import { useGo } from '@/hooks/useGo'
import { killPages, store } from '@/hooks/useKeepAlive'
import { useGo } from '@/hooks/useGo'
;
import { killPages, store } from '@/hooks/useKeepAlive'
;
const go = useGo()
const go = useGo()
;
// 删除所有的 keep-alive 缓存
killPages();
...
...
@@ -83,7 +96,6 @@ const { shortcutItem } = useShortcutBar(); // 配置快捷跳转条
vertical-align: super;
margin-left: 2rem;
}
}
.book-list {
...
...
yarn.lock
View file @
be567cd
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment