Browse Source

1.0.25包版本-功能全部生效版

zq-nodeTest
zq 1 month ago
parent
commit
fff7c94c72
  1. 4
      .eslintrc.js
  2. 32
      babel.config.js
  3. 12205
      package-lock.json
  4. BIN
      src/assets/table_empty.png
  5. 2
      src/components/SliderMenu.vue
  6. 15
      src/main.js
  7. 4
      src/views/agent/home.vue
  8. 1
      src/views/agent/siteBaseSetting.vue
  9. 31
      src/views/elementGroups.vue
  10. 48
      vue.config.js

4
.eslintrc.js

@ -8,7 +8,9 @@ module.exports = {
'eslint:recommended'
],
parserOptions: {
parser: '@babel/eslint-parser'
parser: '@babel/eslint-parser',
ecmaVersion: 2020, // 支持 ES2020(可选链)
sourceType: 'module'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',

32
babel.config.js

@ -1,26 +1,20 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
[
'@babel/preset-env',
{
useBuiltIns: 'usage', // 按需引入polyfill
corejs: 3, // 指定core-js版本
targets: {
// 指定需要兼容的浏览器版本
ie: '10',
chrome: '58',
firefox: '60',
safari: '11',
edge: '16',
},
},
],
['@vue/cli-plugin-babel/preset', {
useBuiltIns: 'usage',
corejs: 3,
targets: {
ie: '10',
chrome: '58',
firefox: '60',
safari: '11',
edge: '16'
}
}]
],
plugins: [
// 可以添加其他Babel插件
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-runtime'
],
};
]
}

12205
package-lock.json

File diff suppressed because it is too large

BIN
src/assets/table_empty.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 14 KiB

2
src/components/SliderMenu.vue

@ -14,7 +14,7 @@
<img v-else class="point" src="../assets/menu-open.svg" @click="changeMenuStatus(false)" alt="">
</GuipToolTip>
</div>
<template v-for="item in menuData" >
<template v-for="(item,index) in menuData" >
<el-submenu v-if="item.children" :key="item.index" :index="item.index">
<template slot="title">
<SvgIcon1 :iconPath="require(`@/assets/menu/${item.icon}.svg`)" defaultColor="#8A9099"

15
src/main.js

@ -4,6 +4,7 @@ import store from './store'
import App from './App.vue'
import ElementUI from 'element-ui';
import ZhichengUI from '@zhicheng1012/zhicheng-components'
// import {GuipMessage} from '@zhicheng1012/zhicheng-components'
import request from "./utils/request";
// import 'element-ui/lib/theme-chalk/index.css';
// import './style/theme/index.css'
@ -14,21 +15,23 @@ import 'regenerator-runtime/runtime';
import '@/assets/css/fonts.css';
import LoadingService from './services/loading'
import { directive as clickaway } from 'vue-clickaway';
import GuipMessage from '@/components/GuipMessage/index';
// import GuipMessage from '@/components/GuipMessage/index';
import HeaderIcon from './utils/headerIcon'
// 复制到粘贴板
import clipboard from '@/utils/dirClipBoard';
import { modernCopyToClipboard } from '@/utils/clipboard';
// import clipboard from '@/utils/dirClipBoard';
// import { modernCopyToClipboard } from '@/utils/clipboard';
// 复制
Vue.prototype.$copy = modernCopyToClipboard;
// Vue.prototype.$copy = modernCopyToClipboard;
Vue.prototype.$loadingFn = LoadingService;
Vue.config.productionTip = false;
// 请求
Vue.prototype.$http = request;
Vue.use(ElementUI);
Vue.use(ZhichengUI)
Vue.use(GuipMessage)
Vue.use(clipboard);
// Vue.use(GuipMessage)
// Vue.use(clipboard);
Vue.directive('clickaway', clickaway);
Vue.mixin(HeaderIcon)

4
src/views/agent/home.vue

@ -82,9 +82,9 @@
</div>
<div class="home-main-right">
<div class="accountBalance common-area">
<div class="mb-16 red" v-if="walletList?.pub?.forzen_money>0">含冻结金额 {{ walletList?.pub?.forzen_money }} </div>
<div class="mb-16 red" v-if="walletList.pub && walletList.pub.forzen_money>0">含冻结金额 {{ walletList.pub && walletList.pub.forzen_money }} </div>
<div class="flex-between">
<span>账户余额&nbsp; <b>{{ walletList?.pub?.remain }}</b>&nbsp;</span>
<span>账户余额&nbsp; <b>{{ walletList.pub && walletList.pub.remain }}</b>&nbsp;</span>
<span class="hoverCommon" @click="isShowSpec = !isShowSpec">{{ isShowSpec ? '收起' : '展开' }}</span>
</div>
<div v-show="isShowSpec" class="mt-24" style="border-top: 1px solid #ebebeb;" v-if="walletList && walletList.spec && walletList.spec.length > 0">

1
src/views/agent/siteBaseSetting.vue

@ -488,7 +488,6 @@ export default {
},
created() {
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_BREADRIGHTTEXT', '了卡斯蒂略了解了');
store.commit('SET_SLIDER_MENU', 'siteSettingData');
},
mounted() {

31
src/views/elementGroups.vue

@ -125,6 +125,8 @@
'0' ? '单元格局中' : '单元格局中' }}</span>
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')"
:color="'#8A9099'" :hoverColor="'#006AFF'" />
<!-- <SvgIcon1 :iconPath="require(`@/assets/register/tableEdit.svg`)" defaultColor="#8A9099" :size="16"
activeColor="#006AFF" /> -->
</div>
</GuipToolTip>
@ -213,6 +215,7 @@
<label for="">输入框</label>
<GuipInput ref="GuipInput" v-model="form.input1" width="200px" height="30px"
placeholder="这是自定义默认提示语" />
<GuipInput ref="GuipInput" width="200px" label="售价" placeholder="请输入售价" unit="元"></GuipInput>
<div style="width: 20px;height: 10px;"></div>
@ -551,8 +554,8 @@
</template>
</GuipToolTip>
<GuipToolTip placement="bottom" effect="light" content="点击进入编辑">
<svg-icon :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
<SvgIcon1 :iconPath="require(`@/assets/register/tableEdit.svg`)" defaultColor="#8A9099" :size="16"
activeColor="#006AFF" />
</GuipToolTip>
</div>
@ -595,22 +598,23 @@
import { rules } from "../assets/vabForm";
import CustomDropdown from '@/components/CustomDropdown.vue';
import GuipSwitch from '@/components/GuipSwitch.vue';
import GuipDialog from '@/components/GuipDialog.vue';
// import GuipSwitch from '@/components/GuipSwitch.vue';
// import GuipDialog from '@/components/GuipDialog.vue';
// import GuipRadio from '@/components/GuipRadio.vue';
// import GuipButton from '@/components/GuipButton.vue';
// import { GuipButton } from '@zhicheng1012/zhicheng-components'
// import GuipInput from '@/components/GuipInput.vue';
// import GuipSelect from '@/components/GuipSelect.vue';
// import GuipTable from '@/components/GuipTable.vue';
import GuipTextarea from '@/components/GuipTextarea.vue'
// import GuipTextarea from '@/components/GuipTextarea.vue'
// import GuipToolTip from '@/components/GuipToolTip.vue'
import HoverButton from '@/components/HoverButton.vue'
import GuipFormItem from '@/components/GuipFormItem.vue'
// import GuipFormItem from '@/components/GuipFormItem.vue'
// import SvgIcon from '@/components/SvgIcon.vue';
// import PromptText from "@/components/PromptText.vue";
// import DevicePreview from "@/components/PreviewTab.vue";
import domainBind from "@/components/domainBind.vue";
// import SvgIcon1 from "@/components/SvgIcon1.vue";
export default {
@ -618,10 +622,10 @@ export default {
components: {
// PromptText,
domainBind,
GuipTextarea,
// GuipTextarea,
// GuipTable,
GuipSwitch,
GuipDialog,
// GuipSwitch,
// GuipDialog,
// GuipRadio,
// GuipButton,
// GuipInput,
@ -629,7 +633,7 @@ export default {
// GuipToolTip,
HoverButton,
// SvgIcon,
GuipFormItem,
// GuipFormItem,
// DevicePreview,
CustomDropdown
},
@ -973,6 +977,13 @@ export default {
mounted() {
this.getList();
this.getStagePurchase()
// console.log(this.$Message,'=$Message----');
// this.$Message.success('')
this.$Message({
message: '这是一条普通消息',
type: 'info',
duration: 3000
})
// this.$loadingFn.show()
// setInterval(()=>{
// this.$loadingFn.hide()

48
vue.config.js

@ -1,6 +1,5 @@
const path = require('path')
const TerserPlugin = require('terser-webpack-plugin')
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
devServer: {
@ -19,13 +18,19 @@ module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
},
options: {
plugins: [
'@babel/plugin-proposal-optional-chaining', // 支持 ?.
// '@babel/plugin-proposal-nullish-coalescing-operator' // 支持 ??
]
}
}
}
],
]
},
optimization: {
minimizer: [
@ -33,6 +38,9 @@ module.exports = {
terserOptions: {
format: {
comments: /^\**!|@preserve|@license|@cc_on/i
},
compress: {
drop_console: process.env.NODE_ENV === 'production' // 生产环境移除 console
}
},
extractComments: false
@ -50,17 +58,29 @@ module.exports = {
}
},
chainWebpack: config => {
// 关键配置:让 Babel 处理 Vue 模板中的现代语法
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions = {
...(options.compilerOptions || {}),
whitespace: 'preserve',
preserveWhitespace: false
}
return options
})
whitespace: 'condense',
preserveWhitespace: false,
// 允许模板中使用现代 JS 语法(如 ?.)
transpileOptions: {
transforms: {
dangerousTaggedTemplateString: true,
modules: false
}
}
};
return options;
});
// 生产环境配置
if (process.env.NODE_ENV === 'production') {
config.optimization.minimize(true);
}
}
}
};
Loading…
Cancel
Save