@ -0,0 +1,13 @@
|
||||
# just a flag
|
||||
ENV = 'development'
|
||||
|
||||
// api接口请求地址
|
||||
#VUE_APP_BASE_API = 'https://mini-admin.mall4j.com/apis'
|
||||
VUE_APP_BASE_API = 'http://192.168.1.17:8085'
|
||||
// 客服api接口请求地址
|
||||
VUE_APP_IM_API = 'https://mini-im.mall4j.com'
|
||||
// 客服webstock接口请求地址
|
||||
VUE_APP_WS_IM_API = 'wss://mini-im.mall4j.com'
|
||||
|
||||
# 静态资源文件url
|
||||
VUE_APP_RESOURCES_URL = 'https://img.mall4j.com/'
|
||||
@ -0,0 +1,14 @@
|
||||
# just a flag
|
||||
ENV = 'production'
|
||||
|
||||
// api接口请求地址
|
||||
VUE_APP_BASE_API = 'https://mini-admin.mall4j.com/apis'
|
||||
// 客服api接口请求地址
|
||||
VUE_APP_IM_API = 'https://mini-im.mall4j.com'
|
||||
// 客服webstock接口请求地址
|
||||
VUE_APP_WS_IM_API = 'wss://mini-im.mall4j.com'
|
||||
|
||||
# 静态资源文件url
|
||||
VUE_APP_RESOURCES_URL = 'https://img.mall4j.com/'
|
||||
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
/build/
|
||||
/config/
|
||||
/dist/
|
||||
/*.js
|
||||
/test/unit/coverage/
|
||||
/src/icons/iconfont.js
|
||||
@ -0,0 +1,25 @@
|
||||
// https://eslint.org/docs/user-guide/configuring
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: 'babel-eslint',
|
||||
parserOptions: {
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
|
||||
extends: 'standard',
|
||||
// required to lint *.vue files
|
||||
plugins: [
|
||||
'html'
|
||||
],
|
||||
// add your custom rules here
|
||||
rules: {
|
||||
// allow async-await
|
||||
'generator-star-spacing': 'off',
|
||||
// allow debugger during development
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
module.exports = {
|
||||
'plugins': {
|
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
'autoprefixer': {}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,13 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
],
|
||||
'env': {
|
||||
'development': {
|
||||
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
||||
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
||||
// https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
|
||||
'plugins': ['dynamic-import-node']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
module.exports = {
|
||||
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
|
||||
transform: {
|
||||
'^.+\\.vue$': 'vue-jest',
|
||||
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
|
||||
'jest-transform-stub',
|
||||
'^.+\\.jsx?$': 'babel-jest'
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1'
|
||||
},
|
||||
snapshotSerializers: ['jest-serializer-vue'],
|
||||
testMatch: [
|
||||
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
|
||||
],
|
||||
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
|
||||
coverageDirectory: '<rootDir>/tests/unit/coverage',
|
||||
// 'collectCoverage': true,
|
||||
'coverageReporters': [
|
||||
'lcov',
|
||||
'text-summary'
|
||||
],
|
||||
testURL: 'http://localhost/'
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 228 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 829 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
@ -0,0 +1,362 @@
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.15;
|
||||
color: #303133;
|
||||
background-color: #fff;
|
||||
}
|
||||
a {
|
||||
color: mix(#fff, $--color-primary, 20%);
|
||||
text-decoration: none;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/* Utils
|
||||
------------------------------ */
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
/* Animation
|
||||
------------------------------ */
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Reset element-ui
|
||||
------------------------------ */
|
||||
.site-wrapper {
|
||||
.el-pagination {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Layout
|
||||
------------------------------ */
|
||||
.site-wrapper {
|
||||
position: relative;
|
||||
min-width: 1180px;
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar fold
|
||||
------------------------------ */
|
||||
.site-sidebar--fold {
|
||||
.site-navbar__header,
|
||||
.site-navbar__brand,
|
||||
.site-sidebar,
|
||||
.site-sidebar__inner,
|
||||
.el-menu.site-sidebar__menu {
|
||||
width: 64px;
|
||||
}
|
||||
.site-navbar__body,
|
||||
.site-content__wrapper {
|
||||
margin-left: 64px;
|
||||
}
|
||||
.site-navbar__brand {
|
||||
&-lg {
|
||||
display: none;
|
||||
}
|
||||
&-mini {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.site-sidebar,
|
||||
.site-sidebar__inner {
|
||||
overflow: initial;
|
||||
}
|
||||
.site-sidebar__menu-icon {
|
||||
margin-right: 0;
|
||||
font-size: 20px;
|
||||
}
|
||||
.site-content--tabs > .el-tabs > .el-tabs__header {
|
||||
left: 64px;
|
||||
}
|
||||
}
|
||||
// animation
|
||||
.site-navbar__header,
|
||||
.site-navbar__brand,
|
||||
.site-navbar__body,
|
||||
.site-sidebar,
|
||||
.site-sidebar__inner,
|
||||
.site-sidebar__menu.el-menu,
|
||||
.site-sidebar__menu-icon,
|
||||
.site-content__wrapper,
|
||||
.site-content--tabs > .el-tabs .el-tabs__header {
|
||||
transition: inline-block .3s, left .3s, width .3s, margin-left .3s, font-size .3s;
|
||||
}
|
||||
|
||||
|
||||
/* Navbar
|
||||
------------------------------ */
|
||||
.site-navbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1030;
|
||||
height: 50px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
|
||||
background-color: $navbar--background-color;
|
||||
|
||||
&--inverse {
|
||||
.site-navbar__body {
|
||||
background-color: transparent;
|
||||
}
|
||||
.el-menu {
|
||||
> .el-menu-item,
|
||||
> .el-submenu > .el-submenu__title {
|
||||
color: #fff;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: mix(#000, $navbar--background-color, 15%);
|
||||
}
|
||||
}
|
||||
> .el-menu-item.is-active,
|
||||
> .el-submenu.is-active > .el-submenu__title {
|
||||
border-bottom-color: mix(#fff, $navbar--background-color, 85%);
|
||||
}
|
||||
.el-menu-item i,
|
||||
.el-submenu__title i,
|
||||
.el-dropdown {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.el-menu--popup-bottom-start {
|
||||
background-color: $navbar--background-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__header {
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 230px;
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
}
|
||||
&__brand {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
width: 230px;
|
||||
height: 50px;
|
||||
margin: 0;
|
||||
line-height: 50px;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
color: #fff;
|
||||
|
||||
&-lg,
|
||||
&-mini {
|
||||
margin: 0 5px;
|
||||
color: #fff;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
&-mini {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&__switch {
|
||||
font-size: 18px;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
&__avatar {
|
||||
border-bottom: none !important;
|
||||
* {
|
||||
vertical-align: inherit;
|
||||
}
|
||||
.el-dropdown-link {
|
||||
> img {
|
||||
width: 36px;
|
||||
height: auto;
|
||||
margin-right: 5px;
|
||||
border-radius: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
&__body {
|
||||
position: relative;
|
||||
margin-left: 230px;
|
||||
padding-right: 15px;
|
||||
background-color: #fff;
|
||||
}
|
||||
&__menu {
|
||||
float: left;
|
||||
background-color: transparent;
|
||||
border-bottom: 0;
|
||||
|
||||
&--right {
|
||||
float: right;
|
||||
}
|
||||
a:focus,
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.el-menu-item,
|
||||
.el-submenu > .el-submenu__title {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.el-submenu > .el-menu {
|
||||
top: 55px;
|
||||
}
|
||||
.el-badge {
|
||||
display: inline;
|
||||
z-index: 2;
|
||||
&__content {
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar
|
||||
------------------------------ */
|
||||
.site-sidebar {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1020;
|
||||
width: 230px;
|
||||
overflow: hidden;
|
||||
|
||||
&--dark,
|
||||
&--dark-popper {
|
||||
background-color: $sidebar--background-color-dark;
|
||||
.site-sidebar__menu.el-menu,
|
||||
> .el-menu--popup {
|
||||
background-color: $sidebar--background-color-dark;
|
||||
.el-menu-item,
|
||||
.el-submenu > .el-submenu__title {
|
||||
color: $sidebar--color-text-dark;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: mix(#fff, $sidebar--color-text-dark, 50%);
|
||||
background-color: mix(#fff, $sidebar--background-color-dark, 2.5%);
|
||||
}
|
||||
}
|
||||
.el-menu,
|
||||
.el-submenu.is-opened {
|
||||
background-color: mix(#000, $sidebar--background-color-dark, 15%);
|
||||
}
|
||||
.el-menu-item.is-active,
|
||||
.el-submenu.is-active > .el-submenu__title {
|
||||
color: mix(#fff, $sidebar--color-text-dark, 80%);
|
||||
}
|
||||
}
|
||||
}
|
||||
&__inner {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 250px;
|
||||
height: 100%;
|
||||
padding-bottom: 15px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
&__menu.el-menu {
|
||||
width: 230px;
|
||||
border-right: 0;
|
||||
}
|
||||
&__menu-icon {
|
||||
width: 24px;
|
||||
margin-right: 5px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: inherit !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Content
|
||||
------------------------------ */
|
||||
.site-content {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
|
||||
&__wrapper {
|
||||
position: relative;
|
||||
padding-top: 50px;
|
||||
margin-left: 230px;
|
||||
min-height: 100%;
|
||||
background: $content--background-color;
|
||||
}
|
||||
&--tabs {
|
||||
padding: 55px 0 0;
|
||||
}
|
||||
> .el-tabs {
|
||||
> .el-tabs__header {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
left: 230px;
|
||||
right: 0;
|
||||
z-index: 930;
|
||||
padding: 0 55px 0 15px;
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04);
|
||||
background-color: #fff;
|
||||
> .el-tabs__nav-wrap {
|
||||
margin-bottom: 0;
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
> .el-tabs__content {
|
||||
padding: 0 15px 15px;
|
||||
> .site-tabs__tools {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
z-index: 931;
|
||||
height: 40px;
|
||||
padding: 0 12px;
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
background-color: $content--background-color;
|
||||
cursor: pointer;
|
||||
.el-icon--right {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.element-error-message-zindex{
|
||||
z-index:3000 !important;
|
||||
}
|
||||
@ -0,0 +1,447 @@
|
||||
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in
|
||||
* IE on Windows Phone and in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in IE.
|
||||
*/
|
||||
|
||||
figcaption,
|
||||
figure,
|
||||
main { /* 1 */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct margin in IE 8.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove the gray background on active links in IE 10.
|
||||
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent; /* 1 */
|
||||
-webkit-text-decoration-skip: objects; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font style in Android 4.3-.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct background and color in IE 9-.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in iOS 4-7.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the overflow in IE.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers (opinionated).
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
* controls in Android 4.
|
||||
* 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html [type="button"], /* 1 */
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct display in IE 9-.
|
||||
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10-.
|
||||
* 2. Remove the padding in IE 10-.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in Edge, IE, and Firefox.
|
||||
*/
|
||||
|
||||
details, /* 1 */
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Scripting
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hidden
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10-.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
// 站点主色
|
||||
// tips: 要达到整站主题修改效果, 请确保[$--color-primary]站点主色与[/src/element-ui-theme/index.js]文件中[import './element-[#17B3A3]/index.css']当前主题色一致
|
||||
$--color-primary: #02A1E9;
|
||||
|
||||
// Navbar
|
||||
$navbar--background-color: $--color-primary;
|
||||
|
||||
// Sidebar
|
||||
$sidebar--background-color-dark: #263238;
|
||||
$sidebar--color-text-dark: #8a979e;
|
||||
|
||||
// Content
|
||||
$content--background-color: #f1f4f5;
|
||||
@ -0,0 +1,3 @@
|
||||
@import "normalize"; // api: https://github.com/necolas/normalize.css/
|
||||
@import "variables"; // 站点变量
|
||||
@import "base";
|
||||
@ -1,58 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<svg
|
||||
:class="getClassName"
|
||||
:width="width"
|
||||
:height="height"
|
||||
aria-hidden="true">
|
||||
<use :xlink:href="getName"></use>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'icon-svg',
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
className: {
|
||||
type: String
|
||||
},
|
||||
width: {
|
||||
type: String
|
||||
},
|
||||
height: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getName () {
|
||||
return `#icon-${this.name}`
|
||||
},
|
||||
getClassName () {
|
||||
return [
|
||||
'icon-svg',
|
||||
`icon-svg__${this.name}`,
|
||||
this.className && /\S/.test(this.className) ? `${this.className}` : ''
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.icon-svg {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
:action="$http.adornUrl('/admin/file/upload/element')"
|
||||
:headers="{Authorization: $cookie.get('Authorization')}"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleUploadSuccess"
|
||||
:file-list="imageList"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
resourcesUrl: process.env.VUE_APP_RESOURCES_URL
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
default: '',
|
||||
type: String
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageList () {
|
||||
let res = []
|
||||
if (this.value) {
|
||||
let imageArray = this.value.split(',')
|
||||
for (let i = 0; i < imageArray.length; i++) {
|
||||
res.push({url: this.resourcesUrl + imageArray[i], response: imageArray[i]})
|
||||
}
|
||||
}
|
||||
this.$emit('input', this.value)
|
||||
return res
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 图片上传
|
||||
handleUploadSuccess (response, file, fileList) {
|
||||
let pics = fileList.map(file => {
|
||||
return file.response
|
||||
}).join(',')
|
||||
this.$emit('input', pics)
|
||||
},
|
||||
// 限制图片上传大小
|
||||
beforeAvatarUpload (file) {
|
||||
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/jpg'
|
||||
if (!isJPG) {
|
||||
this.$message.error('上传图片只能是jpeg/jpg/png/gif 格式!')
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传图片大小不能超过 2MB!')
|
||||
}
|
||||
return isLt2M && isJPG
|
||||
},
|
||||
handleRemove (file, fileList) {
|
||||
let pics = fileList.map(file => {
|
||||
return file.response
|
||||
}).join(',')
|
||||
this.$emit('input', pics)
|
||||
},
|
||||
handlePictureCardPreview (file) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
class="pic-uploader-component"
|
||||
:action="$http.adornUrl('/admin/file/upload/element')"
|
||||
:headers="{Authorization: $cookie.get('Authorization')}"
|
||||
:show-file-list="false"
|
||||
:on-success="handleUploadSuccess"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<img v-if="value" :src="resourcesUrl + value" class="pic">
|
||||
<i v-else class="el-icon-plus pic-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
resourcesUrl: process.env.VUE_APP_RESOURCES_URL
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
default: '',
|
||||
type: String
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 图片上传
|
||||
handleUploadSuccess (response, file, fileList) {
|
||||
this.$emit('input', file.response)
|
||||
},
|
||||
// 限制图片上传大小
|
||||
beforeAvatarUpload (file) {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/jpg'
|
||||
if (!isJPG) {
|
||||
this.$message.error('上传图片只能是jpeg/jpg/png/gif 格式!')
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传图片大小不能超过 2MB!')
|
||||
}
|
||||
return isLt2M && isJPG
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pic-uploader-component .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.pic-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
.pic {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.pic-uploader-component .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
class="pic-uploader-component"
|
||||
:action="$http.adornUrl('/admin/file/upload/element')"
|
||||
:headers="{Authorization: $cookie.get('Authorization')}"
|
||||
:show-file-list="false"
|
||||
:on-success="handleUploadSuccess"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<img v-if="value" :src="resourcesUrl + value" class="pic">
|
||||
<i v-else class="el-icon-plus pic-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
resourcesUrl: process.env.VUE_APP_RESOURCES_URL
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
default: '',
|
||||
type: String
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 图片上传
|
||||
handleUploadSuccess (response, file, fileList) {
|
||||
this.$emit('input', file.response)
|
||||
},
|
||||
// 限制图片上传大小
|
||||
beforeAvatarUpload (file) {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传头像图片大小不能超过 2MB!')
|
||||
}
|
||||
return isLt2M
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pic-uploader-component .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.pic-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
.pic {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.pic-uploader-component .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<el-dialog title="选择商品"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-table ref="prodTable"
|
||||
:data="dataList"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
@selection-change="selectChangeHandle"
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column v-if="isSingle" width="50"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-radio :label="scope.row.prodId"
|
||||
v-model="singleSelectProdId"
|
||||
@change.native="getSelectProdRow(scope.row)"> </el-radio>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="!isSingle"
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column prop="prodName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="产品名称">
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
width="140"
|
||||
label="产品图片">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.pic"
|
||||
width="100"
|
||||
height="100" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<span slot="footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary"
|
||||
@click="submitProds()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
product: ''
|
||||
},
|
||||
singleSelectProdId: 0,
|
||||
allData: [],
|
||||
selectProds: [],
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
isSingle: {
|
||||
default: false,
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
activated () {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
init (selectProds) {
|
||||
this.selectProds = selectProds
|
||||
this.visible = true
|
||||
this.dataListLoading = true
|
||||
if (this.selectProds) {
|
||||
this.selectProds.forEach(row => {
|
||||
this.dataListSelections.push(row)
|
||||
})
|
||||
}
|
||||
this.getDataList()
|
||||
},
|
||||
getDataList () {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/prod/prod/page'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams(
|
||||
Object.assign(
|
||||
{
|
||||
current: this.pageIndex,
|
||||
size: this.pageSize
|
||||
},
|
||||
{
|
||||
prodName: this.dataForm.prodName
|
||||
}
|
||||
)
|
||||
)
|
||||
}).then(({ data }) => {
|
||||
this.dataList = data.records
|
||||
this.totalPage = data.total
|
||||
this.dataListLoading = false
|
||||
if (this.selectProds) {
|
||||
this.$nextTick(() => {
|
||||
this.selectProds.forEach(row => {
|
||||
let index = this.dataList.findIndex((prodItem) => prodItem.prodId === row.prodId)
|
||||
this.$refs.prodTable.toggleRowSelection(this.dataList[index])
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle (val) {
|
||||
this.pageSize = val
|
||||
this.pageIndex = 1
|
||||
this.getDataList()
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle (val) {
|
||||
this.pageIndex = val
|
||||
this.getDataList()
|
||||
},
|
||||
// 单选商品事件
|
||||
getSelectProdRow (row) {
|
||||
this.dataListSelections = [row]
|
||||
},
|
||||
// 多选点击事件
|
||||
selectChangeHandle (selection) {
|
||||
this.dataList.forEach((tableItem) => {
|
||||
let selectedProdIndex = selection.findIndex((selectedProd) => {
|
||||
if (!selectedProd) {
|
||||
return false
|
||||
}
|
||||
return selectedProd.prodId === tableItem.prodId
|
||||
})
|
||||
let dataSelectedProdIndex = this.dataListSelections.findIndex((dataSelectedProd) => dataSelectedProd.prodId === tableItem.prodId)
|
||||
if (selectedProdIndex > -1 && dataSelectedProdIndex === -1) {
|
||||
this.dataListSelections.push(tableItem)
|
||||
} else if (selectedProdIndex === -1 && dataSelectedProdIndex > -1) {
|
||||
this.dataListSelections.splice(dataSelectedProdIndex, 1)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 确定事件
|
||||
submitProds () {
|
||||
if (!this.dataListSelections.length) {
|
||||
this.$message({
|
||||
message: '请选择商品',
|
||||
type: 'error',
|
||||
duration: 1000,
|
||||
onClose: () => {}
|
||||
})
|
||||
return
|
||||
}
|
||||
let prods = []
|
||||
this.dataListSelections.forEach(item => {
|
||||
let prodIndex = prods.findIndex((prod) => prod.prodId === item.prodId)
|
||||
if (prodIndex === -1) {
|
||||
prods.push({ prodId: item.prodId, prodName: item.prodName, pic: item.pic })
|
||||
}
|
||||
})
|
||||
this.$emit('refreshSelectProds', prods)
|
||||
this.dataListSelections = []
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div class="upload-container">
|
||||
<el-tooltip v-if="tinymceUploadType === 'prod'" :content="this.$i18n.t('product.uploadDetailPicTips')" placement="top">
|
||||
<el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click="clickUpload()">
|
||||
{{ $t('components.uploadImage') }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-button v-else :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click="clickUpload()">
|
||||
{{ $t('components.uploadImage') }}
|
||||
</el-button>
|
||||
<!-- 弹窗, 新增图片 -->
|
||||
<elx-imgbox v-if="elxImgboxVisible" ref="elxImgbox" @refreshPic="refreshPic"></elx-imgbox>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ImgsUpload from '@/components/imgs-upload'
|
||||
import ElxImgbox from '@/components/elx-imgbox'
|
||||
export default {
|
||||
name: 'EditorSlideUpload',
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
default: '#1890ff'
|
||||
},
|
||||
tinymceUploadType: {
|
||||
default: '',
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
elxImgboxVisible: false,
|
||||
maxNum: 15, // 可选择的最大图片数量
|
||||
imgUrls: [],
|
||||
resourcesUrl: process.env.VUE_APP_RESOURCES_URL
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ImgsUpload,
|
||||
ElxImgbox
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 打开图片选择窗
|
||||
*/
|
||||
clickUpload () {
|
||||
this.imgUrls = ''
|
||||
this.elxImgboxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.elxImgbox.init(0, this.maxNum)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 接收回调的图片数据
|
||||
*/
|
||||
refreshPic (imagePath) {
|
||||
let imageArray = imagePath.split(',')
|
||||
var data = []
|
||||
imageArray.forEach(img => {
|
||||
data.push(this.resourcesUrl + img)
|
||||
})
|
||||
this.imgUrls = ''
|
||||
this.dialogVisible = false
|
||||
this.$emit('successCBK', data)
|
||||
}
|
||||
// handleSubmit() {
|
||||
// let imageArray = this.imgUrls.split(',')
|
||||
// var data = []
|
||||
// imageArray.forEach(img => {
|
||||
// data.push(this.resourcesUrl + img)
|
||||
// })
|
||||
// this.imgUrls = ''
|
||||
// this.dialogVisible = false
|
||||
// this.$emit('successCBK', data)
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.editor-slide-upload {
|
||||
margin-bottom: 20px;
|
||||
::v-deep .el-upload--picture-card {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,60 @@
|
||||
let callbacks = []
|
||||
|
||||
function loadedTinymce () {
|
||||
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2144
|
||||
// check is successfully downloaded script
|
||||
return window.tinymce
|
||||
}
|
||||
|
||||
const dynamicLoadScript = (src, callback) => {
|
||||
const existingScript = document.getElementById(src)
|
||||
const cb = callback || function () {}
|
||||
|
||||
if (!existingScript) {
|
||||
const script = document.createElement('script')
|
||||
script.src = src // src url for the third-party library being loaded.
|
||||
script.id = src
|
||||
document.body.appendChild(script)
|
||||
callbacks.push(cb)
|
||||
const onEnd = 'onload' in script ? stdOnEnd : ieOnEnd
|
||||
onEnd(script)
|
||||
}
|
||||
|
||||
if (existingScript && cb) {
|
||||
if (loadedTinymce()) {
|
||||
cb(null, existingScript)
|
||||
} else {
|
||||
callbacks.push(cb)
|
||||
}
|
||||
}
|
||||
|
||||
function stdOnEnd (script) {
|
||||
script.onload = function () {
|
||||
// this.onload = null here is necessary
|
||||
// because even IE9 works not like others
|
||||
this.onerror = this.onload = null
|
||||
for (const cb of callbacks) {
|
||||
cb(null, script)
|
||||
}
|
||||
callbacks = null
|
||||
}
|
||||
script.onerror = function () {
|
||||
document.body.removeChild(script)
|
||||
this.onerror = this.onload = null
|
||||
cb(new Error('Failed to load ' + src), script)
|
||||
}
|
||||
}
|
||||
|
||||
function ieOnEnd (script) {
|
||||
script.onreadystatechange = function () {
|
||||
if (this.readyState !== 'complete' && this.readyState !== 'loaded') return
|
||||
this.onreadystatechange = null
|
||||
for (const cb of callbacks) {
|
||||
cb(null, script) // there is no way to catch loading errors in IE8
|
||||
}
|
||||
callbacks = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default dynamicLoadScript
|
||||
@ -0,0 +1,7 @@
|
||||
// Any plugins you want to use has to be imported
|
||||
// Detail plugins list see https://www.tinymce.com/docs/plugins/
|
||||
// Custom builds see https://www.tinymce.com/download/custom-builds/
|
||||
|
||||
const plugins = ['advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount']
|
||||
|
||||
export default plugins
|
||||
@ -0,0 +1,6 @@
|
||||
// Here is a list of the toolbar
|
||||
// Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
|
||||
|
||||
const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
|
||||
|
||||
export default toolbar
|
||||
@ -0,0 +1,68 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '表单名称',
|
||||
prop: 'formName',
|
||||
search: true
|
||||
}, {
|
||||
label: '按钮文本',
|
||||
prop: 'buttonName',
|
||||
search: true
|
||||
}, {
|
||||
label: '提交次数',
|
||||
prop: 'submitNum',
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '不做限制',
|
||||
value: 0
|
||||
}, {
|
||||
label: '每个IP限填一次',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}, {
|
||||
label: '开启验证',
|
||||
prop: 'needValidation',
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '不需要',
|
||||
value: 0
|
||||
}, {
|
||||
label: '需要',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}, {
|
||||
label: '提交权限',
|
||||
prop: 'submitPerm',
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '所有人',
|
||||
value: 0
|
||||
}, {
|
||||
label: '仅会员可提交',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '轮播图片',
|
||||
prop: 'imgUrl',
|
||||
type: 'upload',
|
||||
slot: true,
|
||||
listType: 'picture-img'
|
||||
}, {
|
||||
label: '顺序',
|
||||
prop: 'seq'
|
||||
}, {
|
||||
width: 150,
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
search: true,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '禁用',
|
||||
value: 0
|
||||
}, {
|
||||
label: '正常',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
selection: true,
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '创建时间',
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
label: '姓名',
|
||||
prop: 'userName',
|
||||
search: true
|
||||
}, {
|
||||
label: '邮箱',
|
||||
prop: 'email'
|
||||
}, {
|
||||
label: '联系方式',
|
||||
prop: 'contact'
|
||||
}, {
|
||||
label: '审核',
|
||||
prop: 'status',
|
||||
search: true,
|
||||
slot: true,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '未审核',
|
||||
value: 0
|
||||
}, {
|
||||
label: '审核通过',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
align: 'center',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: '商品名',
|
||||
prop: 'prodName',
|
||||
search: true
|
||||
},
|
||||
{
|
||||
label: '用户昵称',
|
||||
prop: 'nickName',
|
||||
slot: true
|
||||
},
|
||||
{
|
||||
label: '记录时间',
|
||||
prop: 'recTime',
|
||||
width: '200'
|
||||
},
|
||||
{
|
||||
label: '回复时间',
|
||||
prop: 'replyTime',
|
||||
width: '200',
|
||||
dicData: [
|
||||
{
|
||||
label: '无',
|
||||
value: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '评价得分',
|
||||
prop: 'score'
|
||||
},
|
||||
{
|
||||
label: '是否匿名',
|
||||
prop: 'isAnonymous',
|
||||
dicData: [
|
||||
{
|
||||
label: '否',
|
||||
value: 0
|
||||
}, {
|
||||
label: '是',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '审核状态',
|
||||
search: true,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '待审核',
|
||||
value: 0
|
||||
}, {
|
||||
label: '审核通过',
|
||||
value: 1
|
||||
}, {
|
||||
label: '审核未通过',
|
||||
value: -1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '产品名字',
|
||||
prop: 'prodName',
|
||||
search: true
|
||||
}, {
|
||||
label: '商品原价',
|
||||
prop: 'oriPrice'
|
||||
}, {
|
||||
label: '商品现价',
|
||||
prop: 'price'
|
||||
}, {
|
||||
label: '商品库存',
|
||||
prop: 'totalStocks'
|
||||
}, {
|
||||
label: '产品图片',
|
||||
prop: 'pic',
|
||||
type: 'upload',
|
||||
width: 150,
|
||||
listType: 'picture-img'
|
||||
|
||||
}, {
|
||||
width: 150,
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
search: true,
|
||||
slot: true,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '未上架',
|
||||
value: 0
|
||||
}, {
|
||||
label: '上架',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
align: 'center',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: '标签名称',
|
||||
prop: 'title',
|
||||
search: true
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
slot: true,
|
||||
search: true,
|
||||
dicData: [
|
||||
{
|
||||
label: '禁用',
|
||||
value: 0
|
||||
}, {
|
||||
label: '正常',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '默认类型',
|
||||
prop: 'isDfault',
|
||||
slot: true
|
||||
},
|
||||
{
|
||||
label: '排序',
|
||||
prop: 'seq'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
viewBtn: false,
|
||||
delBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '属性名称',
|
||||
prop: 'propName',
|
||||
search: true
|
||||
}, {
|
||||
label: '属性值',
|
||||
prop: 'prodPropValues',
|
||||
slot: true
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: false,
|
||||
selection: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
align: 'center',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: '热搜标题',
|
||||
prop: 'title',
|
||||
search: true
|
||||
},
|
||||
{
|
||||
label: '热搜内容',
|
||||
prop: 'content',
|
||||
search: true
|
||||
},
|
||||
{
|
||||
label: '录入时间',
|
||||
prop: 'recDate',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
label: '顺序',
|
||||
prop: 'seq',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
label: '启用状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
slot: true,
|
||||
search: true,
|
||||
dicData: [
|
||||
{
|
||||
label: '未启用',
|
||||
value: 0
|
||||
}, {
|
||||
label: '启用',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
align: 'center',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: '公告内容',
|
||||
prop: 'title',
|
||||
search: true
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
search: true,
|
||||
slot: true,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '撤销',
|
||||
value: 0
|
||||
}, {
|
||||
label: '公布',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '是否置顶',
|
||||
prop: 'isTop',
|
||||
search: true,
|
||||
slot: true,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '否',
|
||||
value: 0
|
||||
}, {
|
||||
label: '是',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: false,
|
||||
selection: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
viewBtn: false,
|
||||
delBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [
|
||||
{
|
||||
label: '自提点名称',
|
||||
prop: 'addrName',
|
||||
search: true
|
||||
}, {
|
||||
label: '手机号',
|
||||
prop: 'mobile'
|
||||
}, {
|
||||
label: '省份',
|
||||
prop: 'province'
|
||||
}, {
|
||||
label: '城市',
|
||||
prop: 'city'
|
||||
}, {
|
||||
label: '区/县',
|
||||
prop: 'area'
|
||||
}, {
|
||||
label: '地址',
|
||||
prop: 'addr'
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: false,
|
||||
selection: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '模板名称',
|
||||
prop: 'transName',
|
||||
search: true
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
align: 'center',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: '',
|
||||
prop: 'areaId'
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
prop: 'areaName'
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
prop: 'parentId'
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
prop: 'level'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '参数名',
|
||||
prop: 'paramKey',
|
||||
search: true
|
||||
}, {
|
||||
label: '参数值',
|
||||
prop: 'paramValue'
|
||||
}, {
|
||||
label: '备注',
|
||||
prop: 'remark'
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
menu: false, // 移除操作栏
|
||||
selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '用户名',
|
||||
prop: 'username',
|
||||
search: true
|
||||
}, {
|
||||
label: '用户操作',
|
||||
prop: 'operation',
|
||||
search: true
|
||||
}, {
|
||||
label: '请求方法',
|
||||
prop: 'method'
|
||||
}, {
|
||||
label: '请求参数',
|
||||
prop: 'params'
|
||||
}, {
|
||||
label: '执行时长(毫秒)',
|
||||
prop: 'time'
|
||||
}, {
|
||||
label: 'IP地址',
|
||||
prop: 'ip'
|
||||
}, {
|
||||
label: '创建时间',
|
||||
prop: 'createDate'
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '角色名称',
|
||||
prop: 'roleName',
|
||||
search: true
|
||||
}, {
|
||||
label: '备注',
|
||||
prop: 'remark'
|
||||
}, {
|
||||
label: '创建时间',
|
||||
prop: 'createTime'
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '用户名',
|
||||
prop: 'username',
|
||||
search: true
|
||||
}, {
|
||||
label: '邮箱',
|
||||
prop: 'email'
|
||||
}, {
|
||||
label: '手机号',
|
||||
prop: 'mobile'
|
||||
}, {
|
||||
label: '创建时间',
|
||||
prop: 'createTime'
|
||||
}, {
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '禁用',
|
||||
value: 0
|
||||
}, {
|
||||
label: '正常',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
align: 'center',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: '收货人名称',
|
||||
prop: 'receiver'
|
||||
},
|
||||
{
|
||||
label: '省',
|
||||
prop: 'province'
|
||||
},
|
||||
{
|
||||
label: '城市',
|
||||
prop: 'city'
|
||||
},
|
||||
{
|
||||
label: '区',
|
||||
prop: 'area'
|
||||
},
|
||||
{
|
||||
label: '地址',
|
||||
prop: 'addr'
|
||||
},
|
||||
{
|
||||
label: '邮编',
|
||||
prop: 'postCode'
|
||||
},
|
||||
{
|
||||
label: '手机',
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
search: true,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '无效',
|
||||
value: 0
|
||||
}, {
|
||||
label: '正常',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '默认地址',
|
||||
prop: 'commonAddr',
|
||||
dicData: [
|
||||
{
|
||||
label: '否',
|
||||
value: 0
|
||||
}, {
|
||||
label: '是',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '建立时间',
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
label: '更新时间',
|
||||
prop: 'updateTime'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
export const tableOption = {
|
||||
border: true,
|
||||
// selection: true,
|
||||
index: false,
|
||||
indexLabel: '序号',
|
||||
stripe: true,
|
||||
menuAlign: 'center',
|
||||
menuWidth: 350,
|
||||
align: 'center',
|
||||
refreshBtn: true,
|
||||
searchSize: 'mini',
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: false,
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
},
|
||||
column: [{
|
||||
label: '用户昵称',
|
||||
prop: 'nickName',
|
||||
search: true
|
||||
}, {
|
||||
label: '用户头像',
|
||||
prop: 'pic',
|
||||
type: 'upload',
|
||||
imgWidth: 150,
|
||||
listType: 'picture-img'
|
||||
}, {
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
search: true,
|
||||
type: 'select',
|
||||
slot: true,
|
||||
dicData: [
|
||||
{
|
||||
label: '禁用',
|
||||
value: 0
|
||||
}, {
|
||||
label: '正常',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}, {
|
||||
label: '注册时间',
|
||||
prop: 'userRegtime',
|
||||
imgWidth: 150
|
||||
}]
|
||||
}
|
||||
|
After Width: | Height: | Size: 965 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 872 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 811 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 723 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |