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' 'eslint:recommended'
], ],
parserOptions: { parserOptions: {
parser: '@babel/eslint-parser' parser: '@babel/eslint-parser',
ecmaVersion: 2020, // 支持 ES2020(可选链)
sourceType: 'module'
}, },
rules: { rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',

32
babel.config.js

@ -1,26 +1,20 @@
module.exports = { module.exports = {
presets: [ presets: [
'@vue/cli-plugin-babel/preset', ['@vue/cli-plugin-babel/preset', {
[ useBuiltIns: 'usage',
'@babel/preset-env', corejs: 3,
{ targets: {
useBuiltIns: 'usage', // 按需引入polyfill ie: '10',
corejs: 3, // 指定core-js版本 chrome: '58',
targets: { firefox: '60',
// 指定需要兼容的浏览器版本 safari: '11',
ie: '10', edge: '16'
chrome: '58', }
firefox: '60', }]
safari: '11',
edge: '16',
},
},
],
], ],
plugins: [ plugins: [
// 可以添加其他Babel插件
'@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-runtime' '@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=""> <img v-else class="point" src="../assets/menu-open.svg" @click="changeMenuStatus(false)" alt="">
</GuipToolTip> </GuipToolTip>
</div> </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"> <el-submenu v-if="item.children" :key="item.index" :index="item.index">
<template slot="title"> <template slot="title">
<SvgIcon1 :iconPath="require(`@/assets/menu/${item.icon}.svg`)" defaultColor="#8A9099" <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 App from './App.vue'
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
import ZhichengUI from '@zhicheng1012/zhicheng-components' import ZhichengUI from '@zhicheng1012/zhicheng-components'
// import {GuipMessage} from '@zhicheng1012/zhicheng-components'
import request from "./utils/request"; import request from "./utils/request";
// import 'element-ui/lib/theme-chalk/index.css'; // import 'element-ui/lib/theme-chalk/index.css';
// import './style/theme/index.css' // import './style/theme/index.css'
@ -14,21 +15,23 @@ import 'regenerator-runtime/runtime';
import '@/assets/css/fonts.css'; import '@/assets/css/fonts.css';
import LoadingService from './services/loading' import LoadingService from './services/loading'
import { directive as clickaway } from 'vue-clickaway'; 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 HeaderIcon from './utils/headerIcon'
// 复制到粘贴板 // 复制到粘贴板
import clipboard from '@/utils/dirClipBoard'; // import clipboard from '@/utils/dirClipBoard';
import { modernCopyToClipboard } from '@/utils/clipboard'; // import { modernCopyToClipboard } from '@/utils/clipboard';
// 复制 // 复制
Vue.prototype.$copy = modernCopyToClipboard; // Vue.prototype.$copy = modernCopyToClipboard;
Vue.prototype.$loadingFn = LoadingService; Vue.prototype.$loadingFn = LoadingService;
Vue.config.productionTip = false; Vue.config.productionTip = false;
// 请求 // 请求
Vue.prototype.$http = request; Vue.prototype.$http = request;
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.use(ZhichengUI) Vue.use(ZhichengUI)
Vue.use(GuipMessage)
Vue.use(clipboard); // Vue.use(GuipMessage)
// Vue.use(clipboard);
Vue.directive('clickaway', clickaway); Vue.directive('clickaway', clickaway);
Vue.mixin(HeaderIcon) Vue.mixin(HeaderIcon)

4
src/views/agent/home.vue

@ -82,9 +82,9 @@
</div> </div>
<div class="home-main-right"> <div class="home-main-right">
<div class="accountBalance common-area"> <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"> <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> <span class="hoverCommon" @click="isShowSpec = !isShowSpec">{{ isShowSpec ? '收起' : '展开' }}</span>
</div> </div>
<div v-show="isShowSpec" class="mt-24" style="border-top: 1px solid #ebebeb;" v-if="walletList && walletList.spec && walletList.spec.length > 0"> <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() { created() {
store.commit('SET_CUSTOMIZE', true); store.commit('SET_CUSTOMIZE', true);
store.commit('SET_BREADRIGHTTEXT', '了卡斯蒂略了解了');
store.commit('SET_SLIDER_MENU', 'siteSettingData'); store.commit('SET_SLIDER_MENU', 'siteSettingData');
}, },
mounted() { mounted() {

31
src/views/elementGroups.vue

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

48
vue.config.js

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