🐛 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: { env: {
node: true, node: true,
}, },
extends: ['plugin:vue/recommended', '@vue/prettier'], extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'],
rules: { rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-undef': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-console': 'off',
'vue/no-v-html': 'off', 'no-debugger': 'off',
'vue/multi-word-component-names': 'off', 'prettier/prettier': 'warn',
'vue/no-useless-template-attributes': 'off', '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-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': [ 'vue/attributes-order': [
'warn', '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", "name": "vue-admin-better",
"version": "2.4.0", "version": "2.5.5",
"author": "vue-admin-better", "author": "vue-admin-better",
"participants": [], "participants": [],
"homepage": "https://chu1204505056.gitee.io/vue-admin-better", "homepage": "https://chu1204505056.gitee.io/vue-admin-better",
@ -12,7 +12,7 @@
"lint": "vue-cli-service lint --fix", "lint": "vue-cli-service lint --fix",
"clear": "rimraf node_modules&&npm install --registry=--registry=https://registry.npmmirror.com", "clear": "rimraf node_modules&&npm install --registry=--registry=https://registry.npmmirror.com",
"image-webpack-loader": "cnpm i image-webpack-loader -D", "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" "push": "start ./push.sh"
}, },
"repository": { "repository": {
@ -58,13 +58,13 @@
"@vue/cli-plugin-eslint": "^4.5.15", "@vue/cli-plugin-eslint": "^4.5.15",
"@vue/cli-service": "^4.5.15", "@vue/cli-service": "^4.5.15",
"@vue/composition-api": "^1.7.1", "@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", "babel-eslint": "^10.1.0",
"body-parser": "^1.20.2", "body-parser": "^1.20.2",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-prettier": "^5.0.0", "eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-vue": "^9.1.1", "eslint-plugin-vue": "^9.1.1",
"filemanager-webpack-plugin": "^8.0.0", "filemanager-webpack-plugin": "^8.0.0",
"image-webpack-loader": "^8.1.0", "image-webpack-loader": "^8.1.0",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div class="pay-top-content"> <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> <p>支付成功</p>
</div> </div>
<el-form <el-form

View File

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

View File

@ -10,10 +10,10 @@
</el-divider> </el-divider>
<el-form ref="form" label-width="80px" :model="form" :rules="rules"> <el-form ref="form" label-width="80px" :model="form" :rules="rules">
<el-form-item label="name" prop="name"> <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>
<el-form-item label="路径" prop="path"> <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-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

View File

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

View File

@ -7,7 +7,7 @@
> >
<el-form ref="form" label-width="80px" :model="form" :rules="rules"> <el-form ref="form" label-width="80px" :model="form" :rules="rules">
<el-form-item label="权限码" prop="permission"> <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-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,10 +7,10 @@
> >
<el-form ref="form" label-width="80px" :model="form" :rules="rules"> <el-form ref="form" label-width="80px" :model="form" :rules="rules">
<el-form-item label="标题" prop="title"> <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>
<el-form-item label="作者" prop="author"> <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-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

View File

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

View File

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

View File

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

View File

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

View File

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