🐛 fix: prettier

This commit is contained in:
zhideyiman 2023-07-19 13:05:17 +08:00
parent 4ebbbafb62
commit 96e90488f0
38 changed files with 325 additions and 293 deletions

View File

@ -8,18 +8,96 @@ module.exports = {
env: {
node: true,
},
extends: ['plugin:vue/recommended', '@vue/prettier'],
extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/no-v-html': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-useless-template-attributes': 'off',
'no-undef': 'off',
'no-console': 'off',
'no-debugger': 'off',
'prettier/prettier': 'warn',
'prefer-template': 'error',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'vue/no-reserved-component-names': 'off',
'vue/no-v-html': 'off',
'no-unused-vars': 'off',
'vue/no-useless-template-attributes': 'off',
'use-isnan': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'any',
normal: 'any',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
//
'vue/multi-word-component-names': 'off',
// Vue
'vue/order-in-components': [
'warn',
{
order: [
'el',
'name',
'key',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
['provide', 'inject'],
'ROUTER_GUARDS',
'layout',
'middleware',
'validate',
'scrollToTop',
'transition',
'loading',
'inheritAttrs',
'model',
['props', 'propsData'],
'emits',
'setup',
'fetch',
'asyncData',
'data',
'head',
'computed',
'watch',
'watchQuery',
'LIFECYCLE_HOOKS',
'methods',
['template', 'render'],
'renderError',
],
},
],
// Vue
'vue/attributes-order': [
'warn',
{
alphabetical: true,
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
'UNIQUE',
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'EVENTS',
'CONTENT',
],
alphabetical: true, //
},
],
},

View File

@ -1,6 +1,6 @@
{
"name": "vue-admin-better",
"version": "2.4.0",
"version": "2.5.5",
"author": "vue-admin-better",
"participants": [],
"homepage": "https://chu1204505056.gitee.io/vue-admin-better",
@ -12,7 +12,7 @@
"lint": "vue-cli-service lint --fix",
"clear": "rimraf node_modules&&npm install --registry=--registry=https://registry.npmmirror.com",
"image-webpack-loader": "cnpm i image-webpack-loader -D",
"update": "ncu -u --reject prettier,layouts,sass-loader,sass,screenfull,eslint,chalk,vue,vue-template-compiler,vue-router,vuex,@vue/cli-plugin-babel,@vue/cli-plugin-eslint,@vue/cli-service,eslint-plugin-vue --registry=https://registry.npmmirror.com&&cnpm i",
"update": "ncu -u --reject eslint-plugin-prettier,@vue/eslint-config-prettier,prettier,layouts,sass-loader,sass,screenfull,eslint,chalk,vue,vue-template-compiler,vue-router,vuex,@vue/cli-plugin-babel,@vue/cli-plugin-eslint,@vue/cli-service,eslint-plugin-vue --registry=https://registry.npmmirror.com&&cnpm i",
"push": "start ./push.sh"
},
"repository": {
@ -58,13 +58,13 @@
"@vue/cli-plugin-eslint": "^4.5.15",
"@vue/cli-service": "^4.5.15",
"@vue/composition-api": "^1.7.1",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"body-parser": "^1.20.2",
"chalk": "^4.1.2",
"chokidar": "^3.5.3",
"eslint": "^7.32.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-vue": "^9.1.1",
"filemanager-webpack-plugin": "^8.0.0",
"image-webpack-loader": "^8.1.0",

View File

@ -24,7 +24,7 @@
:show-checkbox="selectType == 'multiple'"
@check="checkNode"
@node-click="nodeClick"
></el-tree>
/>
</el-option>
</el-select>
</div>
@ -96,7 +96,6 @@
}
},
mounted() {
const that = this
this.initTree()
},
methods: {
@ -132,18 +131,18 @@
allNode.forEach((element) => element.classList.remove('is-current'))
},
// select
removeTag(val) {
removeTag() {
this.$refs.treeOption.setCheckedKeys([])
},
//
nodeClick(data, node, el) {
nodeClick(data) {
if (data.rank >= this.selectLevel) {
this.selectValue = data.name
this.selectKey = data.id
}
},
//
checkNode(data, node, el) {
checkNode() {
const checkedNodes = this.$refs.treeOption.getCheckedNodes()
const keyArr = []
const valueArr = []

View File

@ -7,8 +7,10 @@
<div class="border-left"></div>
</div>
<div class="card-content">
<el-image class="avatar" :src="avatar"></el-image>
<div class="username">{{ username }}</div>
<el-image class="avatar" :src="avatar" />
<div class="username">
{{ username }}
</div>
<div class="social-icons">
<a
v-for="(item, index) in iconArray"

View File

@ -11,7 +11,7 @@
:closable="false"
:title="`支持jpg、jpeg、png格式单次可最多选择${limit}张图片,每张不可大于${size}M如果大于${size}M会自动为您过滤`"
type="info"
></el-alert>
/>
<br />
<el-upload
ref="upload"
@ -128,7 +128,7 @@
submitUpload() {
this.$refs.upload.submit()
},
handleProgress(event, file, fileList) {
handleProgress() {
this.loading = true
this.show = true
},
@ -161,7 +161,7 @@
this.show = false
}, 1000)
},
handleError(err, file, fileList) {
handleError() {
this.imgNum = this.imgNum + 1
this.imgErrorNum = this.imgErrorNum + 1
this.$baseMessage(
@ -176,7 +176,7 @@
this.show = false
}, 1000)
},
handleRemove(file, fileList) {
handleRemove() {
this.imgNum = this.imgNum - 1
this.allNum = this.allNum - 1
},

View File

@ -37,7 +37,7 @@ export function parseTime(time, cFormat) {
return ['日', '一', '二', '三', '四', '五', '六'][value]
}
if (result.length > 0 && value < 10) {
value = '0' + value
value = `0${value}`
}
return value || 0
})
@ -52,7 +52,7 @@ export function parseTime(time, cFormat) {
* @returns {string}
*/
export function formatTime(time, option) {
if (('' + time).length === 10) {
if (`${time}`.length === 10) {
time = parseInt(time) * 1000
} else {
time = +time
@ -66,26 +66,18 @@ export function formatTime(time, option) {
return '刚刚'
} else if (diff < 3600) {
// less 1 hour
return Math.ceil(diff / 60) + '分钟前'
return `${Math.ceil(diff / 60)}分钟前`
} else if (diff < 3600 * 24) {
return Math.ceil(diff / 3600) + '小时前'
return `${Math.ceil(diff / 3600)}小时前`
} else if (diff < 3600 * 24 * 2) {
return '1天前'
}
if (option) {
return parseTime(time, option)
} else {
return (
d.getMonth() +
1 +
'月' +
d.getDate() +
'日' +
d.getHours() +
'时' +
d.getMinutes() +
'分'
)
return `${
d.getMonth() + 1
}月${d.getDate()}日${d.getHours()}时${d.getMinutes()}`
}
}
@ -101,13 +93,11 @@ export function paramObj(url) {
return {}
}
return JSON.parse(
'{"' +
decodeURIComponent(search)
.replace(/"/g, '\\"')
.replace(/&/g, '","')
.replace(/=/g, '":"')
.replace(/\+/g, ' ') +
'"}'
`{"${decodeURIComponent(search)
.replace(/"/g, '\\"')
.replace(/&/g, '","')
.replace(/=/g, '":"')
.replace(/\+/g, ' ')}"}`
)
}
@ -179,16 +169,16 @@ export function tenBitTimestamp(time) {
const date = new Date(time * 1000)
const y = date.getFullYear()
let m = date.getMonth() + 1
m = m < 10 ? '' + m : m
m = m < 10 ? `${m}` : m
let d = date.getDate()
d = d < 10 ? '' + d : d
d = d < 10 ? `${d}` : d
let h = date.getHours()
h = h < 10 ? '0' + h : h
h = h < 10 ? `0${h}` : h
let minute = date.getMinutes()
let second = date.getSeconds()
minute = minute < 10 ? '0' + minute : minute
second = second < 10 ? '0' + second : second
return y + '年' + m + '月' + d + '日 ' + h + ':' + minute + ':' + second //
minute = minute < 10 ? `0${minute}` : minute
second = second < 10 ? `0${second}` : second
return `${y}${m}${d}${h}:${minute}:${second}` //
}
/**
@ -201,16 +191,16 @@ export function thirteenBitTimestamp(time) {
const date = new Date(time / 1)
const y = date.getFullYear()
let m = date.getMonth() + 1
m = m < 10 ? '' + m : m
m = m < 10 ? `${m}` : m
let d = date.getDate()
d = d < 10 ? '' + d : d
d = d < 10 ? `${d}` : d
let h = date.getHours()
h = h < 10 ? '0' + h : h
h = h < 10 ? `0${h}` : h
let minute = date.getMinutes()
let second = date.getSeconds()
minute = minute < 10 ? '0' + minute : minute
second = second < 10 ? '0' + second : second
return y + '年' + m + '月' + d + '日 ' + h + ':' + minute + ':' + second //
minute = minute < 10 ? `0${minute}` : minute
second = second < 10 ? `0${second}` : second
return `${y}${m}${d}${h}:${minute}:${second}` //
}
/**

View File

@ -92,8 +92,11 @@ instance.interceptors.response.use(
} else {
handleCode(code, msg)
return Promise.reject(
'vue-admin-beautiful请求异常拦截:' +
JSON.stringify({ url: config.url, code, msg }) || 'Error'
`vue-admin-beautiful请求异常拦截:${JSON.stringify({
url: config.url,
code,
msg,
})}` || 'Error'
)
}
},
@ -114,7 +117,7 @@ instance.interceptors.response.use(
}
if (message.includes('Request failed with status code')) {
const code = message.substr(message.length - 3)
message = '后端接口' + code + '异常'
message = `后端接口${code}异常`
}
Vue.prototype.$baseMessage(message || `后端接口未知异常`, 'error')
return Promise.reject(error)

View File

@ -7,7 +7,7 @@ import { getAccessToken } from '@/utils/accessToken'
const accessToken = store.getters['user/accessToken']
const layout = store.getters['settings/layout']
const install = (Vue, opts = {}) => {
const install = (Vue) => {
/* 全局accessToken */
Vue.prototype.$baseAccessToken = () => {
return accessToken || getAccessToken()
@ -29,7 +29,7 @@ const install = (Vue, opts = {}) => {
loading = Loading.service({
lock: true,
text: text || loadingText,
spinner: 'vab-loading-type' + index,
spinner: `vab-loading-type${index}`,
background: 'hsla(0,0%,100%,.8)',
})
}
@ -63,7 +63,7 @@ const install = (Vue, opts = {}) => {
loading = Loading.service({
lock: true,
text: text || loadingText,
spinner: index + '-loader',
spinner: `${index}-loader`,
background: 'hsla(0,0%,100%,.8)',
})
}
@ -86,7 +86,7 @@ const install = (Vue, opts = {}) => {
MessageBox.alert(content, title || '温馨提示', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
callback: (action) => {
callback: () => {
if (callback) {
callback()
}

View File

@ -29,9 +29,15 @@
<el-col :lg="12" :md="12" :sm="24" :xl="12" :xs="24">
<div class="bullshit">
<div class="bullshit-oops">{{ oops }}</div>
<div class="bullshit-headline">{{ headline }}</div>
<div class="bullshit-info">{{ info }}</div>
<div class="bullshit-oops">
{{ oops }}
</div>
<div class="bullshit-headline">
{{ headline }}
</div>
<div class="bullshit-info">
{{ info }}
</div>
<a class="bullshit-return-home" href="#/index">
{{ jumpTime }}s&nbsp;{{ btn }}
</a>

View File

@ -29,9 +29,15 @@
<el-col :lg="12" :md="12" :sm="24" :xl="12" :xs="24">
<div class="bullshit">
<div class="bullshit-oops">{{ oops }}</div>
<div class="bullshit-headline">{{ headline }}</div>
<div class="bullshit-info">{{ info }}</div>
<div class="bullshit-oops">
{{ oops }}
</div>
<div class="bullshit-headline">
{{ headline }}
</div>
<div class="bullshit-info">
{{ info }}
</div>
<a class="bullshit-return-home" href="#/index">
{{ jumpTime }}s&nbsp;{{ btn }}
</a>

View File

@ -10,10 +10,7 @@
<el-table :data="tableData" height="283px" row-key="title">
<el-table-column align="center" label="拖拽" width="50px">
<template #default="{}">
<vab-icon
:icon="['fas', 'arrows-alt']"
style="cursor: pointer"
></vab-icon>
<vab-icon :icon="['fas', 'arrows-alt']" style="cursor: pointer" />
</template>
</el-table-column>
<el-table-column width="20px" />

View File

@ -63,7 +63,7 @@
<vab-icon
:icon="['fas', item.icon]"
:style="{ color: item.color }"
></vab-icon>
/>
<p>{{ item.title }}</p>
</el-card>
</router-link>
@ -81,7 +81,7 @@
请我们喝杯咖啡付款后联系qq
783963206我们将邀请您加入我们的讨论群谢谢您愿意支持开源加群获取文档及基础模板群内大佬众多希望能帮到大家如情况不允许请勿勉强
</p>
<el-image :src="require('@/assets/zfb_kf.jpg')"></el-image>
<el-image :src="require('@/assets/zfb_kf.jpg')" />
<a slot="reference" target="_blank">
<el-button type="primary">QQ讨论群基础版文档</el-button>
</a>
@ -156,10 +156,10 @@
:closable="item.closable"
:title="item.title"
:type="item.type"
></el-alert>
/>
<br />
</div>
<el-alert :closable="false" :title="userAgent" type="info"></el-alert>
<el-alert :closable="false" :title="userAgent" type="info" />
<br />
</el-card>
</el-col>
@ -180,8 +180,8 @@
</el-timeline-item>
</el-timeline>
</el-card>
<plan></plan>
<version-information></version-information>
<plan />
<version-information />
</el-col>
</el-row>
</div>
@ -560,7 +560,7 @@
handleClick(e) {
this.$baseMessage(`点击了${e.name},这里可以写跳转`)
},
handleZrClick(e) {},
handleZrClick() {},
handleChangeTheme() {
this.$baseEventBus.$emit('theme')
},

View File

@ -5,7 +5,7 @@
style="position: fixed"
title="beautiful boys and girls欢迎加入vue-admin-beautifulQQ群972435319"
type="success"
></el-alert>
/>
<el-row>
<el-col :lg="16" :md="12" :sm="24" :xl="16" :xs="24">
<div style="color: transparent">占位符</div>
@ -50,10 +50,10 @@
class="show-password"
@click="handlePassword"
>
<vab-icon :icon="['fas', 'eye-slash']"></vab-icon>
<vab-icon :icon="['fas', 'eye-slash']" />
</span>
<span v-else class="show-password" @click="handlePassword">
<vab-icon :icon="['fas', 'eye']"></vab-icon>
<vab-icon :icon="['fas', 'eye']" />
</span>
</el-form-item>
<el-button

View File

@ -43,8 +43,12 @@
<div class="goods-list-image-group">
<img class="goods-list-image" :src="item.image" />
</div>
<div class="goods-list-title">{{ item.title }}</div>
<div class="goods-list-description">{{ item.description }}</div>
<div class="goods-list-title">
{{ item.title }}
</div>
<div class="goods-list-description">
{{ item.description }}
</div>
<div class="goods-list-price">
<span>¥ {{ item.price }} </span>
</div>
@ -60,7 +64,7 @@
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
></el-pagination>
/>
</div>
</template>

View File

@ -5,16 +5,16 @@
<el-alert show-icon>请务必仔细填写并核对</el-alert>
</el-form-item>
<el-form-item label="付款账户" prop="payAccount">
<el-input v-model="form.payAccount"></el-input>
<el-input v-model="form.payAccount" />
</el-form-item>
<el-form-item label="收款账户" prop="gatheringAccount">
<el-input v-model="form.gatheringAccount"></el-input>
<el-input v-model="form.gatheringAccount" />
</el-form-item>
<el-form-item label="收款人姓名" prop="gatheringName">
<el-input v-model="form.gatheringName"></el-input>
<el-input v-model="form.gatheringName" />
</el-form-item>
<el-form-item label="转账金额" prop="price">
<el-input v-model="form.price"></el-input>
<el-input v-model="form.price" />
</el-form-item>
</el-form>
<div class="pay-button-group">

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="pay-top-content">
<vab-icon class="pay-success" :icon="['fas', 'check-circle']"></vab-icon>
<vab-icon class="pay-success" :icon="['fas', 'check-circle']" />
<p>支付成功</p>
</div>
<el-form

View File

@ -9,21 +9,21 @@
:xs="24"
>
<el-steps :active="active" align-center class="steps" :space="200">
<el-step title="填写转账信息"></el-step>
<el-step title="确认转账信息"></el-step>
<el-step title="完成"></el-step>
<el-step title="填写转账信息" />
<el-step title="确认转账信息" />
<el-step title="完成" />
</el-steps>
<step1 v-if="active === 1" @change-step="handleSetStep"></step1>
<step1 v-if="active === 1" @change-step="handleSetStep" />
<step2
v-if="active === 2"
:info-data="form"
@change-step="handleSetStep"
></step2>
/>
<step3
v-if="active === 3"
:info-data="form"
@change-step="handleSetStep"
></step3>
/>
</el-col>
</el-row>
</div>

View File

@ -10,10 +10,10 @@
</el-divider>
<el-form ref="form" label-width="80px" :model="form" :rules="rules">
<el-form-item label="name" prop="name">
<el-input v-model="form.name" autocomplete="off"></el-input>
<el-input v-model="form.name" autocomplete="off" />
</el-form-item>
<el-form-item label="路径" prop="path">
<el-input v-model="form.path" autocomplete="off"></el-input>
<el-input v-model="form.path" autocomplete="off" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@ -11,7 +11,7 @@
node-key="id"
:props="defaultProps"
@node-click="handleNodeClick"
></el-tree>
/>
</el-col>
<el-col :lg="20" :md="16" :sm="24" :xl="20" :xs="24">
<vab-query-form>
@ -30,16 +30,8 @@
row-key="path"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column
label="name"
prop="name"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="路径"
prop="path"
show-overflow-tooltip
></el-table-column>
<el-table-column label="name" prop="name" show-overflow-tooltip />
<el-table-column label="路径" prop="path" show-overflow-tooltip />
<el-table-column label="是否隐藏" show-overflow-tooltip>
<template #default="{ row }">
<span>
@ -58,24 +50,21 @@
label="vue文件路径"
prop="component"
show-overflow-tooltip
></el-table-column>
/>
<el-table-column
label="重定向"
prop="redirect"
show-overflow-tooltip
></el-table-column>
/>
<el-table-column
label="标题"
prop="meta.title"
show-overflow-tooltip
></el-table-column>
/>
<el-table-column label="图标" show-overflow-tooltip>
<template #default="{ row }">
<span v-if="row.meta">
<vab-icon
v-if="row.meta.icon"
:icon="['fas', row.meta.icon]"
></vab-icon>
<vab-icon v-if="row.meta.icon" :icon="['fas', row.meta.icon]" />
</span>
</template>
</el-table-column>
@ -110,7 +99,7 @@
</el-col>
</el-row>
<edit ref="edit" @fetch-data="fetchData"></edit>
<edit ref="edit" @fetch-data="fetchData" />
</div>
</template>
@ -165,7 +154,7 @@
this.listLoading = false
}, 300)
},
handleNodeClick(data) {
handleNodeClick() {
this.fetchData()
},
},

View File

@ -7,7 +7,7 @@
>
<el-form ref="form" label-width="80px" :model="form" :rules="rules">
<el-form-item label="权限码" prop="permission">
<el-input v-model="form.permission" autocomplete="off"></el-input>
<el-input v-model="form.permission" autocomplete="off" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@ -36,17 +36,9 @@
:element-loading-text="elementLoadingText"
@selection-change="setSelectRows"
>
<el-table-column show-overflow-tooltip type="selection"></el-table-column>
<el-table-column
label="id"
prop="id"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="权限码"
prop="permission"
show-overflow-tooltip
></el-table-column>
<el-table-column show-overflow-tooltip type="selection" />
<el-table-column label="id" prop="id" show-overflow-tooltip />
<el-table-column label="权限码" prop="permission" show-overflow-tooltip />
<el-table-column label="操作" show-overflow-tooltip width="200">
<template #default="{ row }">
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
@ -62,8 +54,8 @@
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
></el-pagination>
<edit ref="edit" @fetch-data="fetchData"></edit>
/>
<edit ref="edit" @fetch-data="fetchData" />
</div>
</template>

View File

@ -7,22 +7,22 @@
>
<el-form ref="form" label-width="80px" :model="form" :rules="rules">
<el-form-item label="用户名" prop="username">
<el-input v-model.trim="form.username" autocomplete="off"></el-input>
<el-input v-model.trim="form.username" autocomplete="off" />
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input
v-model.trim="form.password"
autocomplete="off"
type="password"
></el-input>
/>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model.trim="form.email" autocomplete="off"></el-input>
<el-input v-model.trim="form.email" autocomplete="off" />
</el-form-item>
<el-form-item label="权限" prop="permissions">
<el-checkbox-group v-model="form.permissions">
<el-checkbox label="admin"></el-checkbox>
<el-checkbox label="editor"></el-checkbox>
<el-checkbox label="admin" />
<el-checkbox label="editor" />
</el-checkbox-group>
</el-form-item>
</el-form>

View File

@ -33,22 +33,10 @@
:element-loading-text="elementLoadingText"
@selection-change="setSelectRows"
>
<el-table-column show-overflow-tooltip type="selection"></el-table-column>
<el-table-column
label="id"
prop="id"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="用户名"
prop="username"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="邮箱"
prop="email"
show-overflow-tooltip
></el-table-column>
<el-table-column show-overflow-tooltip type="selection" />
<el-table-column label="id" prop="id" show-overflow-tooltip />
<el-table-column label="用户名" prop="username" show-overflow-tooltip />
<el-table-column label="邮箱" prop="email" show-overflow-tooltip />
<el-table-column label="权限" show-overflow-tooltip>
<template #default="{ row }">
@ -58,11 +46,7 @@
</template>
</el-table-column>
<el-table-column
label="修改时间"
prop="datatime"
show-overflow-tooltip
></el-table-column>
<el-table-column label="修改时间" prop="datatime" show-overflow-tooltip />
<el-table-column label="操作" show-overflow-tooltip width="200">
<template #default="{ row }">
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
@ -78,8 +62,8 @@
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
></el-pagination>
<edit ref="edit" @fetch-data="fetchData"></edit>
/>
<edit ref="edit" @fetch-data="fetchData" />
</div>
</template>

View File

@ -6,7 +6,7 @@
style="position: fixed"
title="beautiful boys and girls欢迎加入vue-admin-beautifulQQ群972435319"
type="success"
></el-alert>
/>
<el-row>
<el-col :lg="16" :md="12" :sm="24" :xl="16" :xs="24">
<div style="color: transparent">占位符</div>
@ -28,7 +28,7 @@
style="margin-top: 20px"
type="text"
>
<vab-icon slot="prefix" :icon="['fas', 'user-alt']"></vab-icon>
<vab-icon slot="prefix" :icon="['fas', 'user-alt']" />
</el-input>
</el-form-item>
<el-form-item prop="phone">
@ -40,7 +40,7 @@
show-word-limit
type="text"
>
<vab-icon slot="prefix" :icon="['fas', 'mobile-alt']"></vab-icon>
<vab-icon slot="prefix" :icon="['fas', 'mobile-alt']" />
</el-input>
</el-form-item>
<el-form-item prop="phoneCode" style="position: relative">
@ -49,10 +49,7 @@
placeholder="手机验证码"
type="text"
>
<vab-icon
slot="prefix"
:icon="['fas', 'envelope-open']"
></vab-icon>
<vab-icon slot="prefix" :icon="['fas', 'envelope-open']" />
</el-input>
<el-button
class="show-pwd phone-code"
@ -70,7 +67,7 @@
placeholder="设置密码"
type="password"
>
<vab-icon slot="prefix" :icon="['fas', 'unlock']"></vab-icon>
<vab-icon slot="prefix" :icon="['fas', 'unlock']" />
</el-input>
</el-form-item>
<el-form-item>
@ -175,7 +172,7 @@
this.getPhoneIntval = setInterval(() => {
if (n > 0) {
n--
this.phoneCode = '重新获取(' + n + 's)'
this.phoneCode = `重新获取(${n}s)`
} else {
clearInterval(this.getPhoneIntval)
this.getPhoneIntval = null

View File

@ -45,50 +45,34 @@
文档
</a>
</el-divider>
<el-progress :percentage="50"></el-progress>
<el-progress :percentage="100" status="success"></el-progress>
<el-progress :percentage="100" status="warning"></el-progress>
<el-progress :percentage="50" status="exception"></el-progress>
<el-progress
:percentage="70"
:stroke-width="26"
:text-inside="true"
></el-progress>
<el-progress :percentage="50" />
<el-progress :percentage="100" status="success" />
<el-progress :percentage="100" status="warning" />
<el-progress :percentage="50" status="exception" />
<el-progress :percentage="70" :stroke-width="26" :text-inside="true" />
<el-progress
:percentage="100"
status="success"
:stroke-width="24"
:text-inside="true"
></el-progress>
/>
<el-progress
:percentage="80"
status="warning"
:stroke-width="22"
:text-inside="true"
></el-progress>
/>
<el-progress
:percentage="50"
status="exception"
:stroke-width="20"
:text-inside="true"
></el-progress>
<el-progress :percentage="0" type="circle"></el-progress>
<el-progress :percentage="25" type="circle"></el-progress>
<el-progress
:percentage="100"
status="success"
type="circle"
></el-progress>
<el-progress
:percentage="70"
status="warning"
type="circle"
></el-progress>
<el-progress
:percentage="50"
status="exception"
type="circle"
></el-progress>
/>
<el-progress :percentage="0" type="circle" />
<el-progress :percentage="25" type="circle" />
<el-progress :percentage="100" status="success" type="circle" />
<el-progress :percentage="70" status="warning" type="circle" />
<el-progress :percentage="50" status="exception" type="circle" />
<el-divider content-position="left">
按钮
@ -117,21 +101,21 @@
<el-button round type="info">信息按钮</el-button>
<el-button round type="warning">警告按钮</el-button>
<el-button round type="danger">危险按钮</el-button>
<el-button circle icon="el-icon-search"></el-button>
<el-button circle icon="el-icon-edit" type="primary"></el-button>
<el-button circle icon="el-icon-check" type="success"></el-button>
<el-button circle icon="el-icon-message" type="info"></el-button>
<el-button circle icon="el-icon-star-off" type="warning"></el-button>
<el-button circle icon="el-icon-delete" type="danger"></el-button>
<el-button circle icon="el-icon-search" />
<el-button circle icon="el-icon-edit" type="primary" />
<el-button circle icon="el-icon-check" type="success" />
<el-button circle icon="el-icon-message" type="info" />
<el-button circle icon="el-icon-star-off" type="warning" />
<el-button circle icon="el-icon-delete" type="danger" />
<el-button disabled>默认按钮</el-button>
<el-button disabled type="primary">主要按钮</el-button>
<el-button disabled type="success">成功按钮</el-button>
<el-button disabled type="info">信息按钮</el-button>
<el-button disabled type="warning">警告按钮</el-button>
<el-button disabled type="danger">危险按钮</el-button>
<el-button icon="el-icon-edit" type="primary"></el-button>
<el-button icon="el-icon-share" type="primary"></el-button>
<el-button icon="el-icon-delete" type="primary"></el-button>
<el-button icon="el-icon-edit" type="primary" />
<el-button icon="el-icon-share" type="primary" />
<el-button icon="el-icon-delete" type="primary" />
<el-button icon="el-icon-search" type="primary">搜索</el-button>
<el-button type="primary">
上传
@ -173,7 +157,7 @@
文档
</a>
</el-divider>
<el-avatar icon="el-icon-user-solid"></el-avatar>
<el-avatar icon="el-icon-user-solid" />
<el-divider content-position="left">
页头
<a
@ -183,7 +167,7 @@
文档
</a>
</el-divider>
<el-page-header content="详情页面"></el-page-header>
<el-page-header content="详情页面" />
<el-divider content-position="left">
面包屑
<a

View File

@ -10,33 +10,33 @@
:rules="rules"
>
<el-form-item label="活动名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
<el-input v-model="ruleForm.name" />
</el-form-item>
<el-form-item label="活动区域" prop="region">
<el-select v-model="ruleForm.region" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
<el-option label="区域一" value="shanghai" />
<el-option label="区域二" value="beijing" />
</el-select>
</el-form-item>
<el-form-item label="即时配送" prop="delivery">
<el-switch v-model="ruleForm.delivery"></el-switch>
<el-switch v-model="ruleForm.delivery" />
</el-form-item>
<el-form-item label="活动性质" prop="type">
<el-checkbox-group v-model="ruleForm.type">
<el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
<el-checkbox label="地推活动" name="type"></el-checkbox>
<el-checkbox label="线下主题活动" name="type"></el-checkbox>
<el-checkbox label="单纯品牌曝光" name="type"></el-checkbox>
<el-checkbox label="美食/餐厅线上活动" name="type" />
<el-checkbox label="地推活动" name="type" />
<el-checkbox label="线下主题活动" name="type" />
<el-checkbox label="单纯品牌曝光" name="type" />
</el-checkbox-group>
</el-form-item>
<el-form-item label="特殊资源" prop="resource">
<el-radio-group v-model="ruleForm.resource">
<el-radio label="线上品牌商赞助"></el-radio>
<el-radio label="线下场地免费"></el-radio>
<el-radio label="线上品牌商赞助" />
<el-radio label="线下场地免费" />
</el-radio-group>
</el-form-item>
<el-form-item label="活动形式" prop="desc">
<el-input v-model="ruleForm.desc" type="textarea"></el-input>
<el-input v-model="ruleForm.desc" type="textarea" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">

View File

@ -9,7 +9,7 @@
<el-col :span="24">
<el-form :inline="true" label-width="80px" @submit.native.prevent>
<el-form-item label="图标名称">
<el-input v-model="queryForm.title"></el-input>
<el-input v-model="queryForm.title" />
</el-form-item>
<el-form-item label-width="0">
<el-button native-type="submit" type="primary" @click="queryData">
@ -41,7 +41,9 @@
:icon-class="`https://fastly.jsdelivr.net/gh/chuzhixin/zx-colorful-icon@master/${item}.svg`"
/>
</el-card>
<div class="icon-text">{{ item }}</div>
<div class="icon-text">
{{ item }}
</div>
</el-col>
<el-col :span="24">
<el-pagination
@ -53,7 +55,7 @@
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
></el-pagination>
/>
</el-col>
</el-row>
</div>

View File

@ -7,7 +7,7 @@
<el-col :span="24">
<el-form :inline="true" label-width="80px" @submit.native.prevent>
<el-form-item label="图标名称">
<el-input v-model="queryForm.title"></el-input>
<el-input v-model="queryForm.title" />
</el-form-item>
<el-form-item label-width="0">
<el-button native-type="submit" type="primary" @click="queryData">
@ -33,7 +33,9 @@
>
<vab-icon :icon="['fas', item]" />
</el-card>
<div class="icon-text">{{ item }}</div>
<div class="icon-text">
{{ item }}
</div>
</el-col>
<el-col :span="24">
<el-pagination
@ -45,7 +47,7 @@
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
></el-pagination>
/>
</el-col>
</el-row>
</div>

View File

@ -41,7 +41,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>合并数组</span></div>
<div slot="header">
<span>合并数组</span>
</div>
<div class="lodash-content">
this.$baseLodash.concat([1],[2])
<br />
@ -52,7 +54,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>左切片</span></div>
<div slot="header">
<span>左切片</span>
</div>
<div class="lodash-content">
this.$baseLodash.drop([1, 2, 3],2切除的数量)
<br />
@ -63,7 +67,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>右切片</span></div>
<div slot="header">
<span>右切片</span>
</div>
<div class="lodash-content">
this.$baseLodash.dropRight([1, 2, 3],2切除的数量)
<br />
@ -74,7 +80,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>修改拼接</span></div>
<div slot="header">
<span>修改拼接</span>
</div>
<div class="lodash-content">
this.$baseLodash.join(['a', 'b', 'c'], '~');
<br />
@ -85,7 +93,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>获取数组最后一个元素</span></div>
<div slot="header">
<span>获取数组最后一个元素</span>
</div>
<div class="lodash-content">
this.$baseLodash.last(['a', 'b', 'c']);
<br />
@ -96,7 +106,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>数组去重</span></div>
<div slot="header">
<span>数组去重</span>
</div>
<div class="lodash-content">
this.$baseLodash.uniq(['a', 'b', 'a']);
<br />
@ -107,7 +119,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>获取数组的最大值</span></div>
<div slot="header">
<span>获取数组的最大值</span>
</div>
<div class="lodash-content">
this.$baseLodash.max([4, 2, 8, 6])
<br />
@ -118,7 +132,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>获取数组的最小值</span></div>
<div slot="header">
<span>获取数组的最小值</span>
</div>
<div class="lodash-content">
this.$baseLodash.min([4, 2, 8, 6])
<br />
@ -142,7 +158,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>数组内数据相加</span></div>
<div slot="header">
<span>数组内数据相加</span>
</div>
<div class="lodash-content">
this.$baseLodash.sum([4, 2, 8, 6])
<br />
@ -153,7 +171,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>返回随机数</span></div>
<div slot="header">
<span>返回随机数</span>
</div>
<div class="lodash-content">
this.$baseLodash.random(0, 5)
<br />
@ -164,7 +184,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>返回数组内的随机数</span></div>
<div slot="header">
<span>返回数组内的随机数</span>
</div>
<div class="lodash-content">
this.$baseLodash.sample([1, 2, 3, 4])
<br />
@ -175,7 +197,9 @@
<el-col :lg="8" :md="12" :sm="24" :xl="6" :xs="24">
<el-card shadow="hover">
<div slot="header"><span>事件防抖动</span></div>
<div slot="header">
<span>事件防抖动</span>
</div>
<div class="lodash-content">
this.$baseLodash.debounce(@click的事件,延迟的毫秒数)
<br />

View File

@ -1,10 +1,6 @@
<template>
<div class="menu1-1-1-container">
<el-alert
:closable="false"
title="嵌套路由 1-1-1"
type="success"
></el-alert>
<el-alert :closable="false" title="嵌套路由 1-1-1" type="success" />
</div>
</template>
<style lang="scss" scoped>

View File

@ -51,38 +51,27 @@
row-key="path"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column
label="name"
prop="name"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="path"
prop="path"
show-overflow-tooltip
></el-table-column>
<el-table-column label="name" prop="name" show-overflow-tooltip />
<el-table-column label="path" prop="path" show-overflow-tooltip />
<el-table-column
label="component"
prop="component"
show-overflow-tooltip
></el-table-column>
/>
<el-table-column
label="redirect"
prop="redirect"
show-overflow-tooltip
></el-table-column>
/>
<el-table-column
label="标题"
prop="meta.title"
show-overflow-tooltip
></el-table-column>
/>
<el-table-column label="图标" show-overflow-tooltip>
<template #default="{ row }">
<span v-if="row.meta">
<vab-icon
v-if="row.meta.icon"
:icon="['fas', row.meta.icon]"
></vab-icon>
<vab-icon v-if="row.meta.icon" :icon="['fas', row.meta.icon]" />
</span>
</template>
</el-table-column>

View File

@ -9,7 +9,7 @@
<div slot="header">
<span>snow</span>
</div>
<vab-snow></vab-snow>
<vab-snow />
</el-card>
</el-col>
<el-col :lg="8" :md="12" :sm="24" :xl="8" :xs="24">
@ -28,7 +28,7 @@
v-if="profileShow"
avatar="https://picsum.photos/80/80?random=2"
user-name="chuzhixin"
></vab-profile>
/>
</el-card>
</el-col>
<el-col :lg="8" :md="12" :sm="24" :xl="8" :xs="24">
@ -36,7 +36,7 @@
<div slot="header">
<span>charge</span>
</div>
<vab-charge :end-val="endVal" :start-val="startVal"></vab-charge>
<vab-charge :end-val="endVal" :start-val="startVal" />
</el-card>
</el-col>
</el-row>

View File

@ -7,10 +7,10 @@
>
<el-form ref="form" label-width="80px" :model="form" :rules="rules">
<el-form-item label="标题" prop="title">
<el-input v-model.trim="form.title" autocomplete="off"></el-input>
<el-input v-model.trim="form.title" autocomplete="off" />
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model.trim="form.author" autocomplete="off"></el-input>
<el-input v-model.trim="form.author" autocomplete="off" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@ -46,33 +46,21 @@
@selection-change="setSelectRows"
@sort-change="tableSortChange"
>
<el-table-column
show-overflow-tooltip
type="selection"
width="55"
></el-table-column>
<el-table-column show-overflow-tooltip type="selection" width="55" />
<el-table-column label="序号" show-overflow-tooltip width="95">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column
label="标题"
prop="title"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="作者"
prop="author"
show-overflow-tooltip
></el-table-column>
<el-table-column label="标题" prop="title" show-overflow-tooltip />
<el-table-column label="作者" prop="author" show-overflow-tooltip />
<el-table-column label="头像" show-overflow-tooltip>
<template #default="{ row }">
<el-image
v-if="imgShow"
:preview-src-list="imageList"
:src="row.img"
></el-image>
/>
</template>
</el-table-column>
<el-table-column
@ -80,7 +68,7 @@
prop="pageViews"
show-overflow-tooltip
sortable
></el-table-column>
/>
<el-table-column label="状态" show-overflow-tooltip>
<template #default="{ row }">
<el-tooltip
@ -100,7 +88,7 @@
prop="datetime"
show-overflow-tooltip
width="200"
></el-table-column>
/>
<el-table-column label="操作" show-overflow-tooltip width="180px">
<template #default="{ row }">
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
@ -116,8 +104,8 @@
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
></el-pagination>
<table-edit ref="edit"></table-edit>
/>
<table-edit ref="edit" />
</div>
</template>

View File

@ -62,7 +62,7 @@
placeholder="请输入内容"
:value="keyW"
@keyup.enter.native="showTreeList"
></el-input>
/>
<div v-show="isShow" class="blur-tree">
<el-tree
ref="treeFilter"
@ -193,7 +193,7 @@
:props="selectTreeDefaultProps"
show-checkbox
@check="multipleSelectTreeCheckNode"
></el-tree>
/>
</el-option>
</el-select>
</el-col>
@ -208,7 +208,7 @@
>
<el-form ref="treeForm" :model="treeForm">
<el-form-item label="节点名称" required>
<el-input v-model="treeForm.name"></el-input>
<el-input v-model="treeForm.name" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@ -7,7 +7,7 @@
name="file"
:size="2"
url="/upload"
></vab-upload>
/>
<el-button type="primary" @click="handleShow({ key: 'value' })">
模拟上传
</el-button>

View File

@ -8,10 +8,10 @@
<br />
<el-form ref="form" label-width="100px" :model="form" :rules="rules">
<el-form-item label="地址">
<el-input v-model="url" disabled></el-input>
<el-input v-model="url" disabled />
</el-form-item>
<el-form-item label="消息" prop="message">
<el-input v-model="form.message"></el-input>
<el-input v-model="form.message" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit">发送消息</el-button>

View File

@ -187,7 +187,7 @@ module.exports = {
if (
relativePath.replace(/\\/g, '/') !== 'src/styles/variables.scss'
) {
return '@import "~@/styles/variables.scss";' + content
return `@import "~@/styles/variables.scss";${content}`
}
return content
},