config/webpack.config.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
public/index.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
public/manifest.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/zshare/actionList/exceloutbutton/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
config/webpack.config.js
@@ -49,6 +49,14 @@ const cssModuleRegex = /\.module\.css$/; const sassRegex = /\.(scss|sass)$/; const sassModuleRegex = /\.module\.(scss|sass)$/; const sign = (() => { let uuid = [] let options = '0123456789abcdefghigklmnopqrstuv' for (let i = 0; i < 8; i++) { uuid.push(options.substr(Math.floor(Math.random() * 0x20), 1)) } return uuid.join('') })() // src => @ function resolves(dir) { @@ -175,14 +183,14 @@ // In development, it does not produce real files. // contenthash => hash filename: isEnvProduction ? 'static/js/[name].[hash:8].js' ? `static/js/[name].${sign}.js` : isEnvDevelopment && 'static/js/bundle.js', // TODO: remove this when upgrading to webpack 5 futureEmitAssets: true, // There are also additional JS chunk files if you use code splitting. // contenthash => hash chunkFilename: isEnvProduction ? 'static/js/[name].[hash:8].chunk.js' ? `static/js/[name].${sign}.chunk.js` : isEnvDevelopment && 'static/js/[name].chunk.js', // We inferred the "public path" (such as / or /my-project) from homepage. // We use "/" in development. @@ -354,7 +362,7 @@ loader: require.resolve('url-loader'), options: { limit: imageInlineSizeLimit, name: 'static/media/[name].[hash:8].[ext]', name: `static/media/[name].${sign}.[ext]`, }, }, // Process application JS with Babel. @@ -494,7 +502,7 @@ // by webpacks internal loaders. exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/], options: { name: 'static/media/[name].[hash:8].[ext]', name: `static/media/[name].${sign}.[ext]`, }, }, // ** STOP ** Are you adding a new loader? @@ -568,8 +576,8 @@ // Options similar to the same options in webpackOptions.output // both options are optional // contenthash => hash filename: 'static/css/[name].[hash:8].css', chunkFilename: 'static/css/[name].[hash:8].chunk.css', filename: `static/css/[name].${sign}.css`, chunkFilename: `static/css/[name].${sign}.chunk.css`, }), // Generate a manifest file which contains a mapping of all asset filenames // to their corresponding output file so that tools can pick it up without public/index.html
@@ -3,12 +3,62 @@ <head> <meta charset="utf-8" /> <meta name="renderer" content="webkit"> <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> --> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <link rel="shortcut icon" href="#"> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <title></title> <script> let _href = window.location.href.split('#')[0] let l_version = localStorage.getItem(_href + 'version') let _ctime = parseInt(new Date().getTime() / 1000) let _time = '' if (l_version) { let vers = l_version.split('-') l_version = vers[0] _time = +vers[1] } if (_time && _ctime - _time < 180) { let meta1 = document.createElement('meta') let meta2 = document.createElement('meta') let meta3 = document.createElement('meta') let meta4 = document.createElement('meta') meta1.content = '0' meta1.httpEquiv = 'Expires' meta2.content = 'no-cache' meta2.httpEquiv = 'Pragma' meta3.content = 'no-cache' meta3.httpEquiv = 'Cache-Control' meta4.content = 'no-cache' meta4.httpEquiv = 'Cache' document.getElementsByTagName('head')[0].appendChild(meta1) document.getElementsByTagName('head')[0].appendChild(meta2) document.getElementsByTagName('head')[0].appendChild(meta3) document.getElementsByTagName('head')[0].appendChild(meta4) } else { fetch('./manifest.json', { cache: 'no-cache'}) .then(response => response.json()) .then(res => { if (res && res.mk_version) { let version = res.mk_version let nocache = false if (l_version && version !== l_version) { nocache = true localStorage.setItem(_href + 'version', version + '-' + _ctime) } else if (!l_version) { localStorage.setItem(_href + 'version', version + '-' + (_ctime - 360)) } if (nocache) { window.location.reload() } } }) } </script> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> public/manifest.json
@@ -5,5 +5,6 @@ "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" "background_color": "#ffffff", "mk_version": "20230709" } src/index.js
@@ -8,7 +8,6 @@ import options, { styles } from '@/store/options.js' import '@/assets/css/main.scss' import '@/assets/css/action.scss' // import '@/assets/css/minkeicon.css' import '@/assets/css/viewstyle.scss' if (window.location.href.indexOf('#/design') > -1) { // 编辑页面刷新时,跳转至主页 @@ -45,8 +44,6 @@ } sessionStorage.removeItem('isEditState') // 新系统文件置于admin中 ../options.json , { cache: 'no-cache'} fetch('../options.json') .then(response => response.json()) @@ -159,7 +156,6 @@ } let _href = window.location.href.split('#')[0] let _systemMsg = localStorage.getItem(_href + 'system') GLOB.navBar = 'shutter' // 默认为百叶窗 src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -557,6 +557,29 @@ return col }) if (data && data[0]) { let errors = [] columns.forEach(col => { if (col.Column && data[0][col.Column] === undefined) { errors.push(col.Text) } }) if (errors.length) { notification.error({ top: 92, message: '数据中缺少字段:' + errors.join('、'), duration: 5 }) this.setState({ loading: false }) return } } try { if (imgCol) {