mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2026-03-03 05:54:25 +08:00
v3.30.0 【增加】字典项增加回显样式;【优化】文件S3协议对最新minio的支持;
This commit is contained in:
@@ -17,14 +17,14 @@ module.exports = {
|
||||
ecmaVersion: 12, // 默认情况下,ESLint使用的是ECMAScript5语法,此处我们设置的选项是 es12
|
||||
sourceType: 'module', // 指定js导入的方式
|
||||
},
|
||||
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', 'plugin:vue/base'],
|
||||
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', 'plugin:vue/base', 'prettier'],
|
||||
globals: {
|
||||
defineProps: 'readonly',
|
||||
defineEmits: 'readonly',
|
||||
defineExpose: 'readonly',
|
||||
withDefaults: 'readonly',
|
||||
},
|
||||
plugins: ['vue'],
|
||||
plugins: ['vue', 'prettier'],
|
||||
rules: {
|
||||
'no-unused-vars': [
|
||||
'error',
|
||||
@@ -62,5 +62,6 @@ module.exports = {
|
||||
],
|
||||
// Enable vue/script-setup-uses-vars rule
|
||||
'vue/script-setup-uses-vars': 'error',
|
||||
'prettier/prettier': 'error',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config';
|
||||
import { useSpinStore } from '/@/store/modules/system/spin';
|
||||
import { Popover, theme } from 'ant-design-vue';
|
||||
import { themeColors } from '/@/theme/color.js';
|
||||
import { themeColors } from '/@/theme/color';
|
||||
import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
|
||||
|
||||
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
|
||||
const props = defineProps({
|
||||
value: [Array, String, Number],
|
||||
|
||||
@@ -1,16 +1,46 @@
|
||||
<template>
|
||||
<span>{{ dataLabels }}</span>
|
||||
<template v-if="props.showStyle">
|
||||
<template v-for="(item, index) in dataList" :key="item.dictDataId">
|
||||
<span v-if="item.color" :style="{ color: token[item.color] }"> {{ item.dataLabel }} </span>
|
||||
<span v-else>{{ item.dataLabel }}</span>
|
||||
{{ index < dataList.length - 1 ? ',' : '' }}
|
||||
</template>
|
||||
</template>
|
||||
<!--不显示回显的颜色演示-->
|
||||
<template v-else>
|
||||
<span>{{ dataList }}</span>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
import { theme } from 'ant-design-vue';
|
||||
import { DICT_DATA_STYLE_ENUM } from '/@/constants/support/dict-const';
|
||||
|
||||
const props = defineProps({
|
||||
dictCode: String,
|
||||
dataValue: [String, Number],
|
||||
showStyle: { type: Boolean, default: false },
|
||||
});
|
||||
const dataLabels = computed(() => {
|
||||
return useDictStore().getDataLabels(props.dictCode, props.dataValue);
|
||||
|
||||
const dataList = computed(() => {
|
||||
if (!props.showStyle) {
|
||||
return useDictStore().getDataLabels(props.dictCode, props.dataValue);
|
||||
}
|
||||
|
||||
let dictDataList = useDictStore().getDataList(props.dictCode, props.dataValue);
|
||||
let dataList = [];
|
||||
for (const item of dictDataList) {
|
||||
if (item.dataStyle) {
|
||||
dataList.push(Object.assign({}, item, { color: DICT_DATA_STYLE_ENUM[item.dataStyle.toUpperCase()].color }));
|
||||
} else {
|
||||
dataList.push(Object.assign({}, item));
|
||||
}
|
||||
}
|
||||
return dataList;
|
||||
});
|
||||
|
||||
const { useToken } = theme;
|
||||
const { token } = useToken();
|
||||
</script>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
|
||||
const props = defineProps({
|
||||
dictCode: String,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
import { message } from 'ant-design-vue';
|
||||
import { mergeColumn } from './smart-table-column-merge';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config.js';
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config';
|
||||
|
||||
const props = defineProps({
|
||||
// 表格列数组
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<script setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { positionApi } from '/@/api/system/position-api.js';
|
||||
import { positionApi } from '/@/api/system/position-api';
|
||||
|
||||
// =========== 属性定义 和 事件方法暴露 =============
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import message from './business/message/message-const';
|
||||
import codeGeneratorConst from './support/code-generator-const';
|
||||
import changeLogConst from './support/change-log-const';
|
||||
import jobConst from './support/job-const';
|
||||
import dictConst from './support/dict-const';
|
||||
|
||||
export default {
|
||||
FLAG_NUMBER_ENUM,
|
||||
@@ -39,4 +40,5 @@ export default {
|
||||
...codeGeneratorConst,
|
||||
...changeLogConst,
|
||||
...jobConst,
|
||||
...dictConst,
|
||||
};
|
||||
|
||||
@@ -16,6 +16,40 @@ export const DICT_CODE_ENUM = {
|
||||
GOODS_PLACE: 'GOODS_PLACE',
|
||||
};
|
||||
|
||||
export const DICT_DATA_STYLE_ENUM = {
|
||||
DEFAULT: {
|
||||
value: 'default',
|
||||
desc: '默认',
|
||||
color: 'colorText',
|
||||
},
|
||||
PRIMARY: {
|
||||
value: 'primary',
|
||||
desc: '主要',
|
||||
color: 'colorPrimary',
|
||||
},
|
||||
SUCCESS: {
|
||||
value: 'success',
|
||||
desc: '成功',
|
||||
color: 'colorSuccess',
|
||||
},
|
||||
INFO: {
|
||||
value: 'info',
|
||||
desc: '信息',
|
||||
color: 'colorInfo',
|
||||
},
|
||||
WARN: {
|
||||
value: 'warn',
|
||||
desc: '警告',
|
||||
color: 'colorWarning',
|
||||
},
|
||||
DANGER: {
|
||||
value: 'danger',
|
||||
desc: '危险',
|
||||
color: 'colorError',
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
DICT_CODE_ENUM,
|
||||
DICT_DATA_STYLE_ENUM,
|
||||
};
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import Password from '/@/views/system/account/components/password/index.vue';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
import { loginApi } from '/@/api/system/login-api.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { loginApi } from '/@/api/system/login-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index';
|
||||
|
||||
/**
|
||||
* 修改密码弹窗
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import HeaderResetPassword from './header-reset-password-modal/index.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ACCOUNT_MENU } from '/@/views/system/account/account-menu.js';
|
||||
import { ACCOUNT_MENU } from '/@/views/system/account/account-menu';
|
||||
|
||||
// 头像背景颜色
|
||||
const AVATAR_BACKGROUND_COLOR_ARRAY = ['#87d068', '#00B853', '#f56a00', '#1890ff'];
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { messageApi } from '/@/api/support/message-api.js';
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
|
||||
@@ -74,9 +74,9 @@
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { BellOutlined } from '@ant-design/icons-vue';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { messageApi } from '/@/api/support/message-api.js';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
import dayjs from 'dayjs';
|
||||
import { theme } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { appDefaultConfig } from '/@/config/app-config';
|
||||
import { themeColors } from '/@/theme/color.js';
|
||||
import { themeColors } from '/@/theme/color';
|
||||
|
||||
// ----------------- modal 显示与隐藏 -----------------
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
import DefaultTab from './components/default-tab.vue';
|
||||
import AntdTab from './components/antd-tab.vue';
|
||||
import ChromeTab from './components/chrome-tab.vue';
|
||||
import { PAGE_TAG_ENUM } from '/@/constants/layout-const.js';
|
||||
import { PAGE_TAG_ENUM } from '/@/constants/layout-const';
|
||||
import { theme } from 'ant-design-vue';
|
||||
|
||||
const pageTagStyle = computed(() => useAppConfigStore().$state.pageTagStyle);
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
import SideHelpDoc from './components/side-help-doc/index.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { HOME_PAGE_NAME } from '/@/constants/system/home-const';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const';
|
||||
import { theme as antDesignTheme } from 'ant-design-vue';
|
||||
const appConfigStore = useAppConfigStore();
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
import SideHelpDoc from './components/side-help-doc/index.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { HOME_PAGE_NAME } from '/@/constants/system/home-const';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const';
|
||||
import { theme as antDesignTheme } from 'ant-design-vue';
|
||||
|
||||
const appConfigStore = useAppConfigStore();
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { HOME_PAGE_NAME } from '/@/constants/system/home-const';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const';
|
||||
import MenuLocationBreadcrumb from './components/menu-location-breadcrumb/index.vue';
|
||||
import { theme as antDesignTheme } from 'ant-design-vue';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { decryptData, encryptData } from './encrypt';
|
||||
import { DATA_TYPE_ENUM } from '../constants/common-const';
|
||||
import _ from 'lodash';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
|
||||
// token的消息头
|
||||
const TOKEN_HEADER = 'Authorization';
|
||||
|
||||
@@ -28,11 +28,11 @@ import { store } from '/@/store';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import 'ant-design-vue/dist/reset.css';
|
||||
import '/@/theme/index.less';
|
||||
import { localRead } from '/@/utils/local-util.js';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
|
||||
import { localRead } from '/@/utils/local-util';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
import '/@/utils/ployfill';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { dictApi } from '/@/api/support/dict-api.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
|
||||
/*
|
||||
* -------------------- ※ 着重 解释说明下main.js的初始化逻辑 begin ※ --------------------
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
|
||||
export default {
|
||||
install: (app) => {
|
||||
|
||||
@@ -18,7 +18,7 @@ import SmartLayout from '../layout/index.vue';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { localClear, localRead } from '/@/utils/local-util';
|
||||
import _ from 'lodash';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
|
||||
import { DICT_SPLIT } from '/@/constants/support/dict-const';
|
||||
import _ from 'lodash';
|
||||
import { dictApi } from '/@/api/support/dict-api.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
export const useDictStore = defineStore({
|
||||
id: 'dict',
|
||||
@@ -26,6 +26,34 @@ export const useDictStore = defineStore({
|
||||
return dictDataList ? dictDataList : [];
|
||||
},
|
||||
|
||||
// 获取字典的值名称
|
||||
getDataList(dictCode, dataValue) {
|
||||
if (_.isNil(dataValue) || _.isNaN(dataValue)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let dict = this.getDictData(dictCode);
|
||||
if (dict.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// 是数字的话,需要特殊处理
|
||||
if (_.isNumber(dataValue)) {
|
||||
let target = _.find(dict, { dataValue: String(dataValue) });
|
||||
return target ? target.dataLabel : '';
|
||||
}
|
||||
|
||||
let valueArray = dataValue.split(DICT_SPLIT);
|
||||
let result = [];
|
||||
for (let item of valueArray) {
|
||||
let target = _.find(dict, { dataValue: item });
|
||||
if (target) {
|
||||
result.push(target);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
// 获取字典的值名称
|
||||
getDataLabels(dictCode, dataValue) {
|
||||
if (_.isNil(dataValue) || _.isNaN(dataValue)) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { defineStore } from 'pinia';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
export const useSpinStore = defineStore({
|
||||
id: 'spin',
|
||||
|
||||
@@ -12,8 +12,8 @@ import { defineStore } from 'pinia';
|
||||
import localKey from '/@/constants/local-storage-key-const';
|
||||
import { HOME_PAGE_NAME } from '/@/constants/system/home-const';
|
||||
import { MENU_TYPE_ENUM } from '/@/constants/system/menu-const';
|
||||
import { messageApi } from '/@/api/support/message-api.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { localRead, localSave, localRemove } from '/@/utils/local-util';
|
||||
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
{{ text }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'place'">
|
||||
<DictLabel :dict-code="DICT_CODE_ENUM.GOODS_PLACE" :data-value="text" />
|
||||
<DictLabel :show-style="true" :dict-code="DICT_CODE_ENUM.GOODS_PLACE" :data-value="text" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'remark'">
|
||||
<span>{{ text ? text : '' }}</span>
|
||||
@@ -200,7 +200,7 @@
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import _ from 'lodash';
|
||||
import SmartHeaderCell from '/@/components/support/table-header-cell/index.vue';
|
||||
import { DICT_CODE_ENUM } from '/@/constants/support/dict-const.js';
|
||||
import { DICT_CODE_ENUM } from '/@/constants/support/dict-const';
|
||||
import DictLabel from '/@/components/support/dict-label/index.vue';
|
||||
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
import { defaultTimeRanges } from '/@/lib/default-time-ranges.js';
|
||||
import { defaultTimeRanges } from '/@/lib/default-time-ranges';
|
||||
|
||||
const props = defineProps({
|
||||
enterpriseId: {
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
let removePrefixTableName = tableInfo.tableName;
|
||||
if (_.startsWith(tableInfo.tableName, tablePrefix.value)) {
|
||||
removePrefixTableName = _.trimStart(removePrefixTableName, tablePrefix.value);
|
||||
removePrefixTableName = removePrefixTableName.slice(tablePrefix.value.length);
|
||||
}
|
||||
formData.moduleName = basic && basic.moduleName ? basic.moduleName : removePrefixTableName;
|
||||
formData.moduleName = convertUpperCamel(formData.moduleName);
|
||||
@@ -205,7 +206,7 @@
|
||||
function onChangeTablePrefix(e) {
|
||||
let removePrefixTableName = tableInfo.tableName;
|
||||
if (_.startsWith(tableInfo.tableName, tablePrefix.value)) {
|
||||
removePrefixTableName = _.trim(removePrefixTableName, tablePrefix.value);
|
||||
removePrefixTableName = tableInfo.tableName.slice(tablePrefix.value.length);
|
||||
}
|
||||
formData.moduleName = convertUpperCamel(removePrefixTableName);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
import DictCodeSelect from '/@/components/support/dict-code-select/index.vue';
|
||||
import { convertUpperCamel, convertLowerCamel } from '/@/utils/str-util';
|
||||
import _ from 'lodash';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
|
||||
const dictRef = ref();
|
||||
function refreshDict() {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
import { JAVA_FILE_LIST, LANGUAGE_LIST, JS_FILE_LIST, TS_FILE_LIST } from '../../code-generator-util';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { lineNumbersBlock } from '/@/lib/highlight-line-number';
|
||||
import hljs from 'highlight.js';
|
||||
import hljs from 'highlight';
|
||||
import 'highlight.js/styles/github-dark.css';
|
||||
import javascript from 'highlight.js/lib/languages/javascript';
|
||||
import typescript from 'highlight.js/lib/languages/typescript';
|
||||
|
||||
@@ -17,6 +17,15 @@
|
||||
<a-form-item label="字典项值" name="dataValue">
|
||||
<a-input v-model:value="form.dataValue" placeholder="请输入 字典项值" />
|
||||
</a-form-item>
|
||||
<a-form-item label="显示样式">
|
||||
<a-select ref="dataStyleSelect" v-model:value="form.dataStyle" :allowClear="true">
|
||||
<template v-for="item in DICT_DATA_STYLE_ENUM" :key="item.value">
|
||||
<a-select-option :value="item.value">
|
||||
<div :style="{ color: token[item.color] }">{{ item.desc }}({{ item.value }})</div>
|
||||
</a-select-option>
|
||||
</template>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="排序" name="sort" help="值越大越靠前">
|
||||
<a-input-number style="width: 100%" v-model:value="form.sortOrder" :min="0" :max="1000" />
|
||||
</a-form-item>
|
||||
@@ -28,10 +37,14 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { message, theme } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { DICT_DATA_STYLE_ENUM } from '/@/constants/support/dict-const';
|
||||
|
||||
const { useToken } = theme;
|
||||
const { token } = useToken();
|
||||
|
||||
// emit
|
||||
const emit = defineEmits(['reloadList']);
|
||||
@@ -46,6 +59,7 @@
|
||||
sortOrder: 0,
|
||||
dataValue: '',
|
||||
dataLabel: '',
|
||||
dataStyle: '',
|
||||
remark: '',
|
||||
};
|
||||
let form = reactive({ ...formDefault });
|
||||
|
||||
@@ -145,11 +145,12 @@
|
||||
title: '文件夹',
|
||||
dataIndex: 'folderType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
width: 70,
|
||||
},
|
||||
{
|
||||
title: '文件名称',
|
||||
dataIndex: 'fileName',
|
||||
ellipsis: true,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
@@ -164,24 +165,18 @@
|
||||
ellipsis: true,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '上传人',
|
||||
dataIndex: 'creatorName',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '人类型',
|
||||
dataIndex: 'creatorUserType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '上传时间',
|
||||
dataIndex: 'createTime',
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '文件Key',
|
||||
dataIndex: 'fileKey',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
import { jobApi } from '/@/api/support/job-api';
|
||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const';
|
||||
import JobLogListModal from './job-log-list-modal.vue';
|
||||
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const.js";
|
||||
import TableOperator from "/@/components/support/table-operator/index.vue";
|
||||
|
||||
@@ -120,8 +120,8 @@ import { message } from 'ant-design-vue';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { jobApi } from '/@/api/support/job-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index';
|
||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const';
|
||||
|
||||
// emit
|
||||
const emit = defineEmits(['reloadList']);
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
import { defaultTimeRanges } from '/@/lib/default-time-ranges.js';
|
||||
import { defaultTimeRanges } from '/@/lib/default-time-ranges';
|
||||
|
||||
const showFlag = ref(false);
|
||||
const title = ref('');
|
||||
|
||||
@@ -160,10 +160,10 @@
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
import DeletedJobList from './components/deleted-job-list.vue';
|
||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const';
|
||||
import JobFormModal from './components/job-form-modal.vue';
|
||||
import JobLogListModal from './components/job-log-list-modal.vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index';
|
||||
const activeKey = ref('1');
|
||||
const columns = ref([
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
import { dataMaskingApi } from '/@/api/support/data-masking-api.js';
|
||||
import { dataMaskingApi } from '/@/api/support/data-masking-api';
|
||||
|
||||
//------------------------ 表格渲染 ---------------------
|
||||
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { level3ProtectApi } from '/@/api/support/level3-protect-api.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { level3ProtectApi } from '/@/api/support/level3-protect-api';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
|
||||
// 三级等保的默认值
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import MessageSendForm from './components/message-send-form.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
import { defaultTimeRanges } from '/@/lib/default-time-ranges.js';
|
||||
import { defaultTimeRanges } from '/@/lib/default-time-ranges';
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
|
||||
const columns = ref([
|
||||
|
||||
@@ -76,18 +76,18 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { regular } from '/@/constants/regular-const.js';
|
||||
import { regular } from '/@/constants/regular-const';
|
||||
import DepartmentTreeSelect from '/@/components/system/department-tree-select/index.vue';
|
||||
import PositionSelect from '/@/components/system/position-select/index.vue';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import { loginApi } from '/@/api/system/login-api.js';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
import { loginApi } from '/@/api/system/login-api';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { employeeApi } from '/@/api/system/employee-api';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { fileApi } from '/@/api/support/file-api.js';
|
||||
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index';
|
||||
import { fileApi } from '/@/api/support/file-api';
|
||||
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const';
|
||||
|
||||
// 组件ref
|
||||
const formRef = ref();
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { messageApi } from '/@/api/support/message-api.js';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select//index.vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import MessageDetail from './components/message-detail.vue';
|
||||
|
||||
const columns = reactive([
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<script setup>
|
||||
import { computed, onMounted, reactive, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { employeeApi } from '/@/api/system/employee-api.js';
|
||||
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index';
|
||||
import { employeeApi } from '/@/api/system/employee-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
const emits = defineEmits(['onSuccess']);
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
<script setup>
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import _ from 'lodash';
|
||||
import { ACCOUNT_MENU } from '/@/views/system/account/account-menu.js';
|
||||
import { ACCOUNT_MENU } from '/@/views/system/account/account-menu';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { theme as antDesignTheme } from 'ant-design-vue';
|
||||
|
||||
// 菜单展示
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
import ToBeDoneModal from './to-be-done-modal.vue';
|
||||
import localKey from '/@/constants/local-storage-key-const';
|
||||
import { localRead, localSave } from '/@/utils/local-util';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.box-item {
|
||||
width: 444px;
|
||||
width: 464px;
|
||||
height: 600px;
|
||||
&.desc {
|
||||
background: #003b94;
|
||||
@@ -108,7 +108,7 @@
|
||||
transform: translateX(0);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(-30%);
|
||||
transform: translateX(-5%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
animation: marquee 5s linear infinite;
|
||||
animation: marquee 3s linear infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@
|
||||
.code-btn{
|
||||
height: 44px;
|
||||
padding: 4px 5px;
|
||||
width: 108px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.eye-box {
|
||||
@@ -165,7 +165,7 @@
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 350px;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background: #1748FD;
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
<img :src="gzh" />
|
||||
<div class="qr-desc-marquee">
|
||||
<div class="marquee">
|
||||
<span>关注:六边形工程师,分享:赚钱、代码、生活</span>
|
||||
<span>关注:六边形工程师</span>
|
||||
<span>分享:AI、赚钱、代码、健康</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,24 +69,33 @@
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
<a-form-item name="password">
|
||||
<a-input-password
|
||||
v-model:value="loginForm.password"
|
||||
autocomplete="on"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
placeholder="请输入密码"
|
||||
/>
|
||||
<a-popover placement="top">
|
||||
<template #content>
|
||||
<a-flex :vertical="true" justify="center" align="center">
|
||||
<img :src="gzh" />
|
||||
<a-typography-text type="danger">扫码关注:【六边形工程师】</a-typography-text>
|
||||
<a-typography-text type="danger">完成问卷调查,获取登录密码</a-typography-text>
|
||||
</a-flex>
|
||||
</template>
|
||||
<a-input-password
|
||||
v-model:value="loginForm.password"
|
||||
autocomplete="on"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
placeholder="请输入密码"
|
||||
/>
|
||||
</a-popover>
|
||||
</a-form-item>
|
||||
<a-form-item name="captchaCode">
|
||||
<a-input class="captcha-input" v-model:value.trim="loginForm.captchaCode" placeholder="请输入验证码" />
|
||||
<img class="captcha-img" :src="captchaBase64Image" @click="getCaptcha" />
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-checkbox v-model:checked="rememberPwd">记住密码</a-checkbox>
|
||||
<span> ( 账号:admin, 密码:123456)</span>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<div class="btn" @click="onLogin">登录</div>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<span> 账号:admin, 关注【六边形工程师】,参与问卷,获取密码</span>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div class="more">
|
||||
<div class="title-box">
|
||||
@@ -129,10 +139,10 @@
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { encryptData } from '/@/lib/encrypt';
|
||||
import { h } from 'vue';
|
||||
import { localSave } from '/@/utils/local-util.js';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import {dictApi} from "/@/api/support/dict-api.js";
|
||||
import { localSave } from '/@/utils/local-util';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
|
||||
//--------------------- 登录表单 ---------------------------------
|
||||
|
||||
@@ -221,6 +231,7 @@
|
||||
//--------------------- 验证码 ---------------------------------
|
||||
|
||||
const captchaBase64Image = ref('');
|
||||
|
||||
async function getCaptcha() {
|
||||
try {
|
||||
let captchaResult = await loginApi.getCaptcha();
|
||||
@@ -233,6 +244,7 @@
|
||||
}
|
||||
|
||||
let refreshCaptchaInterval = null;
|
||||
|
||||
function beginRefreshCaptchaInterval(expireSeconds) {
|
||||
if (refreshCaptchaInterval === null) {
|
||||
refreshCaptchaInterval = setInterval(getCaptcha, (expireSeconds - 5) * 1000);
|
||||
@@ -258,6 +270,7 @@
|
||||
let emailCodeButtonDisabled = ref(false);
|
||||
// 定时器
|
||||
let countDownTimer = null;
|
||||
|
||||
// 开始倒计时
|
||||
function runCountDown() {
|
||||
emailCodeButtonDisabled.value = true;
|
||||
|
||||
@@ -90,10 +90,10 @@
|
||||
import { buildRoutes } from '/@/router/index';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { encryptData } from '/@/lib/encrypt';
|
||||
import { localSave } from '/@/utils/local-util.js';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { dictApi } from '/@/api/support/dict-api.js';
|
||||
import { localSave } from '/@/utils/local-util';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
|
||||
//--------------------- 登录表单 ---------------------------------
|
||||
|
||||
|
||||
@@ -92,10 +92,10 @@
|
||||
import { buildRoutes } from '/@/router/index';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { encryptData } from '/@/lib/encrypt';
|
||||
import { localSave } from '/@/utils/local-util.js';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
import { dictApi } from '/@/api/support/dict-api.js';
|
||||
import { localSave } from '/@/utils/local-util';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
import { useDictStore } from '/@/store/modules/system/dict';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
|
||||
//--------------------- 登录表单 ---------------------------------
|
||||
|
||||
|
||||
@@ -9,91 +9,96 @@
|
||||
*/
|
||||
import { resolve } from 'path';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import customVariables from '/@/theme/custom-variables.js';
|
||||
import { loadEnv } from 'vite';
|
||||
import customVariables from '/@/theme/custom-variables';
|
||||
|
||||
const pathResolve = (dir) => {
|
||||
return resolve(__dirname, '.', dir);
|
||||
};
|
||||
export default {
|
||||
base: process.env.NODE_ENV === 'production' ? '/' : '/',
|
||||
root: process.cwd(),
|
||||
resolve: {
|
||||
alias: [
|
||||
// 国际化替换
|
||||
{
|
||||
find: 'vue-i18n',
|
||||
replacement: 'vue-i18n/dist/vue-i18n.cjs.js',
|
||||
},
|
||||
// 绝对路径重命名:/@/xxxx => src/xxxx
|
||||
{
|
||||
find: /\/@\//,
|
||||
replacement: pathResolve('src') + '/',
|
||||
},
|
||||
{
|
||||
find: /^~/,
|
||||
replacement: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 8081,
|
||||
|
||||
export default ({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
return {
|
||||
base: process.env.NODE_ENV === 'production' ? '/' : '/',
|
||||
root: process.cwd(),
|
||||
resolve: {
|
||||
alias: [
|
||||
// 国际化替换
|
||||
{
|
||||
find: 'vue-i18n',
|
||||
replacement: 'vue-i18n/dist/vue-i18n.cjs.js',
|
||||
},
|
||||
// 绝对路径重命名:/@/xxxx => src/xxxx
|
||||
{
|
||||
find: /\/@\//,
|
||||
replacement: pathResolve('src') + '/',
|
||||
},
|
||||
{
|
||||
find: /^~/,
|
||||
replacement: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
// 代理路径
|
||||
'/': {
|
||||
target: 'http://127.0.0.1:1024/', // 目标服务器地址
|
||||
changeOrigin: true, // 是否修改请求头中的 Origin 字段
|
||||
rewrite: (path) => path, // 重写路径
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
plugins: [vue()],
|
||||
optimizeDeps: {
|
||||
include: ['ant-design-vue/es/locale/zh_CN', 'dayjs/locale/zh-cn', 'ant-design-vue/es/locale/en_US'],
|
||||
exclude: ['vue-demi'],
|
||||
},
|
||||
build: {
|
||||
// 清除console和debugger
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true,
|
||||
},
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
//配置这个是让不同类型文件放在不同文件夹,不会显得太乱
|
||||
chunkFileNames: 'js/[name]-[hash].js',
|
||||
entryFileNames: 'js/[name]-[hash].js',
|
||||
assetFileNames: '[ext]/[name]-[hash].[ext]',
|
||||
manualChunks(id) {
|
||||
//静态资源分拆打包
|
||||
if (id.includes('node_modules')) {
|
||||
return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
||||
}
|
||||
host: '0.0.0.0',
|
||||
port: 8081,
|
||||
server: {
|
||||
proxy: {
|
||||
// 代理路径
|
||||
'/': {
|
||||
target: env.VITE_APP_API_URL, // 目标服务器地址
|
||||
changeOrigin: true, // 是否修改请求头中的 Origin 字段
|
||||
rewrite: (path) => path, // 重写路径
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
target: 'esnext',
|
||||
outDir: 'dist', // 指定输出路径
|
||||
assetsDir: 'assets', // 指定生成静态文件目录
|
||||
assetsInlineLimit: '4096', // 小于此阈值的导入或引用资源将内联为 base64 编码
|
||||
chunkSizeWarningLimit: 500, // chunk 大小警告的限制
|
||||
minify: 'terser', // 混淆器,terser构建后文件体积更小
|
||||
emptyOutDir: true, //打包前先清空原有打包文件
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
modifyVars: customVariables,
|
||||
javascriptEnabled: true,
|
||||
plugins: [vue()],
|
||||
optimizeDeps: {
|
||||
include: ['ant-design-vue/es/locale/zh_CN', 'dayjs/locale/zh-cn', 'ant-design-vue/es/locale/en_US'],
|
||||
exclude: ['vue-demi'],
|
||||
},
|
||||
build: {
|
||||
// 清除console和debugger
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true,
|
||||
},
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
//配置这个是让不同类型文件放在不同文件夹,不会显得太乱
|
||||
chunkFileNames: 'js/[name]-[hash].js',
|
||||
entryFileNames: 'js/[name]-[hash].js',
|
||||
assetFileNames: '[ext]/[name]-[hash].[ext]',
|
||||
manualChunks(id) {
|
||||
//静态资源分拆打包
|
||||
if (id.includes('node_modules')) {
|
||||
return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
target: 'esnext',
|
||||
outDir: 'dist', // 指定输出路径
|
||||
assetsDir: 'assets', // 指定生成静态文件目录
|
||||
assetsInlineLimit: '4096', // 小于此阈值的导入或引用资源将内联为 base64 编码
|
||||
chunkSizeWarningLimit: 500, // chunk 大小警告的限制
|
||||
minify: 'terser', // 混淆器,terser构建后文件体积更小
|
||||
emptyOutDir: true, //打包前先清空原有打包文件
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
modifyVars: customVariables,
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
define: {
|
||||
__INTLIFY_PROD_DEVTOOLS__: false,
|
||||
'process.env': process.env,
|
||||
},
|
||||
define: {
|
||||
__INTLIFY_PROD_DEVTOOLS__: false,
|
||||
'process.env': process.env,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user