hd-idevvue3 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.development +5 -0
- package/.env.production +5 -0
- package/README.md +22 -191
- package/dist/assets/index.774ef40e.css +1 -0
- package/dist/hd-idevvue3.mjs +45697 -0
- package/dist/hd-idevvue3.umd.js +153 -0
- package/index.html +1 -0
- package/npminstall-debug.log +10 -2
- package/package.json +35 -40
- package/pnpm-lock.yaml +2631 -0
- package/src/App.vue +15 -0
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +43 -0
- package/src/demo/dropdemo.vue +43 -0
- package/src/demo/extsets.vue +107 -0
- package/src/demo/formedit.vue +145 -0
- package/src/demo/hightquery.vue +169 -0
- package/src/demo/inlineedit.vue +88 -0
- package/src/demo/selfdrop.vue +41 -0
- package/src/demo//350/241/214/345/206/205/347/272/247/350/201/224.txt +2 -0
- package/src/directive/el-dragDialog/drag.js +124 -0
- package/src/directive/el-dragDialog/index.js +13 -0
- package/src/errorLog.js +16 -0
- package/src/hdcom/BigGrid.js +173 -0
- package/src/hdcom/BillShow.vue +90 -0
- package/src/hdcom/BillUpload.vue +253 -0
- package/src/hdcom/BtnRight.vue +98 -0
- package/src/hdcom/ErrHint.vue +30 -0
- package/src/hdcom/ExtendColumn.vue +108 -0
- package/src/hdcom/ExtendCommon.js +29 -0
- package/src/hdcom/ExtendForm.vue +114 -0
- package/src/hdcom/FacePicUpload.vue +71 -0
- package/src/hdcom/FaceRecTest.vue +104 -0
- package/src/hdcom/GridChart.vue +194 -0
- package/src/hdcom/GridExField.vue +281 -0
- package/src/hdcom/GridShow.vue +238 -0
- package/src/hdcom/HdAside.vue +178 -0
- package/src/hdcom/HdBtn.vue +113 -0
- package/src/hdcom/HdButton.vue +137 -0
- package/src/hdcom/HdComFaceRec.vue +58 -0
- package/src/hdcom/HdComGrid.vue +776 -0
- package/src/hdcom/HdComQuery.vue +273 -0
- package/src/hdcom/HdComQueryDetail.vue +161 -0
- package/src/hdcom/HdComSortDetail.vue +155 -0
- package/src/hdcom/HdDatePicker.vue +78 -0
- package/src/hdcom/HdDialog.vue +63 -0
- package/src/hdcom/HdDrop.vue +163 -0
- package/src/hdcom/HdFileUpload.vue +148 -0
- package/src/hdcom/HdFilterBox.vue +90 -0
- package/src/hdcom/HdFooter.vue +149 -0
- package/src/hdcom/HdForm.vue +278 -0
- package/src/hdcom/HdFormBtn.vue +89 -0
- package/src/hdcom/HdFormItem.vue +35 -0
- package/src/hdcom/HdGctosGrid +0 -0
- package/src/hdcom/HdGrid.vue +825 -0
- package/src/hdcom/HdGridEditBtn.vue +44 -0
- package/src/hdcom/HdGridExt.js +219 -0
- package/src/hdcom/HdGridSel.vue +223 -0
- package/src/hdcom/HdHeader.vue +148 -0
- package/src/hdcom/HdHotKey.vue +81 -0
- package/src/hdcom/HdInputHint.vue +49 -0
- package/src/hdcom/HdMain.vue +43 -0
- package/src/hdcom/HdMessage.vue +192 -0
- package/src/hdcom/HdNum.vue +69 -0
- package/src/hdcom/HdPopSel.vue +58 -0
- package/src/hdcom/HdRightMenu.vue +61 -0
- package/src/hdcom/HdSel/SelGridFieldcod.vue +36 -0
- package/src/hdcom/HdTableColumn.vue +334 -0
- package/src/hdcom/HdTempSave.vue +140 -0
- package/src/hdcom/HdTree.vue +86 -0
- package/src/hdcom/HdTreeTable/eval.js +34 -0
- package/src/hdcom/HdTreeTable/index.vue +174 -0
- package/src/hdcom/ImportExcel.vue +143 -0
- package/src/hdcom/index.js +80 -0
- package/src/idev.common.js +72 -0
- package/src/index.js +14 -0
- package/src/utils/HdQuery.js +54 -0
- package/src/utils/comutils.js +98 -0
- package/src/utils/utils.js +105 -0
- package/src/vendor/Blob.js +179 -0
- package/src/vendor/Export2Excel.js +220 -0
- package/src/vendor/Export2Zip.js +22 -0
- package/src/views/layout/AppMain.vue +32 -0
- package/src/views/layout/HdLayout.vue +78 -0
- package/src/views/layout/header/ElasticSearch.vue +225 -0
- package/src/views/layout/header/HZRecorder.js +231 -0
- package/src/views/layout/header/HeaderSearch.vue +198 -0
- package/src/views/layout/header/Levelbar.vue +49 -0
- package/src/views/layout/header/MainHeader.vue +271 -0
- package/src/views/layout/header/Navbar.vue +105 -0
- package/src/views/layout/header/ScrollPane.vue +81 -0
- package/src/views/layout/header/TagsView.vue +210 -0
- package/src/views/layout/header/VocRec.vue +97 -0
- package/src/views/layout/header/changepswform.vue +96 -0
- package/src/views/layout/index.js +12 -0
- package/src/views/layout/menu/Hamburger.vue +45 -0
- package/src/views/layout/menu/HdMenu.vue +167 -0
- package/src/views/layout/menu/css/menu.css +288 -0
- package/src/views/layout/menu/index.vue +25 -0
- package/src/views/privilege/commsg/commsg.vue +78 -0
- package/src/views/privilege/commsg/commsgOrgn.vue +42 -0
- package/src/views/privilege/commsg/commsgRole.vue +149 -0
- package/src/views/privilege/commsg/commsgform.vue +160 -0
- package/src/views/privilege/commsg/commsgiframe.vue +33 -0
- package/src/views/privilege/commsg/commsgto.vue +120 -0
- package/src/views/privilege/commsg/commsgtoform.vue +108 -0
- package/src/views/privilege/commsg/commsgtrans.vue +155 -0
- package/src/views/privilege/exfield/comexcolumn.vue +71 -0
- package/src/views/privilege/exfield/comexcolumnform.vue +101 -0
- package/src/views/privilege/exfield/comexfield.vue +31 -0
- package/src/views/privilege/exfield/comexfieldform.vue +94 -0
- package/src/views/privilege/exfield/comexfieldsub.vue +72 -0
- package/src/views/privilege/index.js +42 -0
- package/src/views/privilege/menu/comMenu.vue +41 -0
- package/src/views/privilege/menu/menu.vue +133 -0
- package/src/views/privilege/menu/menuinfo.vue +56 -0
- package/src/views/privilege/menu/rolelist.vue +47 -0
- package/src/views/privilege/menu/userlist.vue +49 -0
- package/src/views/privilege/mobile/authmobileupdate.vue +69 -0
- package/src/views/privilege/mobile/authmobileupdateform.vue +90 -0
- package/src/views/privilege/orgDept/authOrgn.vue +96 -0
- package/src/views/privilege/orgDept/authorgnform.vue +145 -0
- package/src/views/privilege/orgDept/orgDept.vue +37 -0
- package/src/views/privilege/orgDept/orgTree.vue +88 -0
- package/src/views/privilege/orgDept/orgnselect.vue +134 -0
- package/src/views/privilege/personDept/authuser.vue +123 -0
- package/src/views/privilege/personDept/authuserform.vue +154 -0
- package/src/views/privilege/personDept/facerec.vue +117 -0
- package/src/views/privilege/personDept/orgncascader.vue +125 -0
- package/src/views/privilege/personDept/personDept.vue +31 -0
- package/src/views/privilege/quartz/comquartzjob.vue +65 -0
- package/src/views/privilege/quartz/comquartzjobform.vue +99 -0
- package/src/views/privilege/quartz/comquartzlog.vue +59 -0
- package/src/views/privilege/role/btnRole.vue +117 -0
- package/src/views/privilege/role/menuRole.vue +64 -0
- package/src/views/privilege/role/orgnRole.vue +56 -0
- package/src/views/privilege/role/role.vue +67 -0
- package/src/views/privilege/role/rolelist.vue +67 -0
- package/src/views/privilege/role/roleselect.vue +57 -0
- package/src/views/privilege/search/comsearch.vue +105 -0
- package/src/views/privilege/search/menu.vue +52 -0
- package/src/views/privilege/syscode/syscode.vue +103 -0
- package/src/views/privilege/syscode/sysfield.vue +66 -0
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -0
- package/src/views/privilege/syslog/menulog.vue +52 -0
- package/src/views/privilege/syslog/syslog.vue +115 -0
- package/src/views/privilege/syslog/syslogconfig.vue +61 -0
- package/src/views/privilege/syslog/syslogform.vue +83 -0
- package/src/views/privilege/syslog/syslogframe.vue +26 -0
- package/src/views/privilege/userRole/userRole.vue +122 -0
- package/src/views/privilege.zip +0 -0
- package/vite.config.js +93 -0
- package/.babelrc +0 -17
- package/.editorconfig +0 -14
- package/.eslintignore +0 -3
- package/.npminstall.done +0 -1
- package/.postcssrc.js +0 -8
- package/LICENSE +0 -21
- package/Listening +0 -28
- package/build/build.js +0 -70
- package/build/check-versions.js +0 -45
- package/build/config.js +0 -81
- package/build/dev-client.js +0 -9
- package/build/dev-server.js +0 -93
- package/build/utils.js +0 -78
- package/build/vue-loader.conf.js +0 -12
- package/build/webpack.common.js +0 -37
- package/build/webpack.component.js +0 -36
- package/build/webpack.prod.conf.js +0 -38
- package/components.json +0 -8
- package/conf.js +0 -42
- package/config/dev.env.js +0 -6
- package/config/index.js +0 -43
- package/config/prod.env.js +0 -6
- package/config/sit.env.js +0 -6
- package/favicon.ico +0 -0
- package/jsdoc-vue.js +0 -12
- package/lib/0.index.js +0 -12573
- package/lib/1.index.js +0 -6
- package/lib/2.index.js +0 -2
- package/lib/idev.common.js +0 -1
- package/lib/idv8.common.js +0 -1
- package/lib/index.js +0 -49170
- package/lib/js/ErrHint.js +0 -1
- package/lib/js/HdAside.js +0 -1
- package/lib/js/HdBtn.js +0 -1
- package/lib/js/HdButton.js +0 -1
- package/lib/js/HdComFaceRec.js +0 -1
- package/lib/js/HdComGrid.js +0 -1
- package/lib/js/HdDatePicker.js +0 -1
- package/lib/js/HdDialog.js +0 -1
- package/lib/js/HdDrop.js +0 -1
- package/lib/js/HdFileUpload.js +0 -1
- package/lib/js/HdFooter.js +0 -1
- package/lib/js/HdForm.js +0 -1
- package/lib/js/HdFormBtn.js +0 -1
- package/lib/js/HdFormItem.js +0 -1
- package/lib/js/HdGrid.js +0 -1
- package/lib/js/HdGridEditBtn.js +0 -1
- package/lib/js/HdGridSel.js +0 -1
- package/lib/js/HdHeader.js +0 -1
- package/lib/js/HdHotkey.js +0 -1
- package/lib/js/HdLayout.js +0 -1
- package/lib/js/HdMain.js +0 -1
- package/lib/js/HdMessage.js +0 -1
- package/lib/js/HdNum.js +0 -1
- package/lib/js/HdPopSel.js +0 -1
- package/lib/js/HdSearch.js +0 -1
- package/lib/js/HdTableColumn.js +0 -1
- package/lib/js/HdTempSave.js +0 -1
- package/lib/js/HdTree.js +0 -1
- package/lib/js/HdTreeTable.js +0 -1
- package/lib/js/authmobileupdate.js +0 -1
- package/lib/js/comexfield.js +0 -1
- package/lib/js/commsg.js +0 -1
- package/lib/js/commsgto.js +0 -1
- package/lib/js/comquartzjob.js +0 -1
- package/lib/js/comquartzlog.js +0 -1
- package/lib/js/comsearch.js +0 -1
- package/lib/js/menu.js +0 -1
- package/lib/js/menuinfo.js +0 -1
- package/lib/js/orgDept.js +0 -1
- package/lib/js/orgTree.js +0 -1
- package/lib/js/personDept.js +0 -1
- package/lib/js/role.js +0 -1
- package/lib/js/sysfieldframe.js +0 -1
- package/lib/js/syslog.js +0 -1
- package/lib/js/syslogframe.js +0 -1
- package/lib/js/userRole.js +0 -1
- package/ytgvue.rar +0 -0
package/build/build.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
require('./check-versions')();
|
|
2
|
-
var server = require('pushstate-server');
|
|
3
|
-
var opn = require('opn')
|
|
4
|
-
var ora = require('ora')
|
|
5
|
-
var rm = require('rimraf')
|
|
6
|
-
var path = require('path')
|
|
7
|
-
var chalk = require('chalk')
|
|
8
|
-
var webpack = require('webpack');
|
|
9
|
-
var config = require('../config');
|
|
10
|
-
var webpackConfig = require('./webpack.prod.conf');
|
|
11
|
-
var componentConfig = require('./webpack.component');
|
|
12
|
-
var commonConfig = require('./webpack.common');
|
|
13
|
-
|
|
14
|
-
var spinner = ora('building for ' + process.env.NODE_ENV + ' of ' + process.env.env_config+ ' mode...' )
|
|
15
|
-
spinner.start()
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
|
19
|
-
if (err) throw err
|
|
20
|
-
webpack(webpackConfig, function (err, stats) {
|
|
21
|
-
if (err) throw err
|
|
22
|
-
process.stdout.write(stats.toString({
|
|
23
|
-
colors: true,
|
|
24
|
-
modules: false,
|
|
25
|
-
children: false,
|
|
26
|
-
chunks: false,
|
|
27
|
-
chunkModules: false
|
|
28
|
-
}) + '\n\n')
|
|
29
|
-
console.log(chalk.cyan(' Build index complete.\n'))
|
|
30
|
-
if(process.env.npm_config_preview){
|
|
31
|
-
server.start({
|
|
32
|
-
port: 9528,
|
|
33
|
-
directory: './dist',
|
|
34
|
-
file: '/index.html'
|
|
35
|
-
});
|
|
36
|
-
console.log('> Listening at ' + 'http://localhost:9528' + '\n')
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
webpack(commonConfig, function (err, stats) {
|
|
42
|
-
if (err) throw err
|
|
43
|
-
process.stdout.write(stats.toString({
|
|
44
|
-
colors: true,
|
|
45
|
-
modules: false,
|
|
46
|
-
children: false,
|
|
47
|
-
chunks: false,
|
|
48
|
-
chunkModules: false
|
|
49
|
-
}) + '\n\n')
|
|
50
|
-
|
|
51
|
-
console.log(chalk.cyan(' Build common complete.\n'))
|
|
52
|
-
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
webpack(componentConfig, function (err, stats) {
|
|
56
|
-
if (err) throw err
|
|
57
|
-
process.stdout.write(stats.toString({
|
|
58
|
-
colors: true,
|
|
59
|
-
modules: false,
|
|
60
|
-
children: false,
|
|
61
|
-
chunks: false,
|
|
62
|
-
chunkModules: false
|
|
63
|
-
}) + '\n\n')
|
|
64
|
-
|
|
65
|
-
console.log(chalk.cyan(' Build component complete.\n'))
|
|
66
|
-
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
spinner.stop()
|
|
70
|
-
})
|
package/build/check-versions.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var chalk = require('chalk')
|
|
2
|
-
var semver = require('semver')
|
|
3
|
-
var packageConfig = require('../package.json')
|
|
4
|
-
|
|
5
|
-
function exec(cmd) {
|
|
6
|
-
return require('child_process').execSync(cmd).toString().trim()
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
var versionRequirements = [
|
|
10
|
-
{
|
|
11
|
-
name: 'node',
|
|
12
|
-
currentVersion: semver.clean(process.version),
|
|
13
|
-
versionRequirement: packageConfig.engines.node
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'npm',
|
|
17
|
-
currentVersion: exec('npm --version'),
|
|
18
|
-
versionRequirement: packageConfig.engines.npm
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
module.exports = function () {
|
|
23
|
-
var warnings = []
|
|
24
|
-
for (var i = 0; i < versionRequirements.length; i++) {
|
|
25
|
-
var mod = versionRequirements[i]
|
|
26
|
-
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
|
27
|
-
warnings.push(mod.name + ': ' +
|
|
28
|
-
chalk.red(mod.currentVersion) + ' should be ' +
|
|
29
|
-
chalk.green(mod.versionRequirement)
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (warnings.length) {
|
|
35
|
-
console.log('')
|
|
36
|
-
console.log(chalk.yellow('To use this template, you must update following to modules:'))
|
|
37
|
-
console.log()
|
|
38
|
-
for (var i = 0; i < warnings.length; i++) {
|
|
39
|
-
var warning = warnings[i]
|
|
40
|
-
console.log(' ' + warning)
|
|
41
|
-
}
|
|
42
|
-
console.log()
|
|
43
|
-
process.exit(1)
|
|
44
|
-
}
|
|
45
|
-
}
|
package/build/config.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
var path = require('path');
|
|
2
|
-
var fs = require('fs');
|
|
3
|
-
var nodeExternals = require('webpack-node-externals');
|
|
4
|
-
var Components = require('../components.json');
|
|
5
|
-
|
|
6
|
-
// var utilsList = fs.readdirSync(path.resolve(__dirname, '../src/utils'));
|
|
7
|
-
// var mixinsList = fs.readdirSync(path.resolve(__dirname, '../src/mixins'));
|
|
8
|
-
// var transitionList = fs.readdirSync(path.resolve(__dirname, '../src/transitions'));
|
|
9
|
-
var externals = {};
|
|
10
|
-
|
|
11
|
-
Object.keys(Components).forEach(function(key) {
|
|
12
|
-
externals[`idevvue/${Components[key].substring(2)}`] = `idevvue/lib/${key}`;
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
//externals['element-ui/src/locale'] = 'element-ui/lib/locale';
|
|
16
|
-
// utilsList.forEach(function(file) {
|
|
17
|
-
// file = path.basename(file, '.js');
|
|
18
|
-
// externals[`element-ui/src/utils/${file}`] = `element-ui/lib/utils/${file}`;
|
|
19
|
-
// });
|
|
20
|
-
// mixinsList.forEach(function(file) {
|
|
21
|
-
// file = path.basename(file, '.js');
|
|
22
|
-
// externals[`element-ui/src/mixins/${file}`] = `element-ui/lib/mixins/${file}`;
|
|
23
|
-
// });
|
|
24
|
-
// transitionList.forEach(function(file) {
|
|
25
|
-
// file = path.basename(file, '.js');
|
|
26
|
-
// externals[`element-ui/src/transitions/${file}`] = `element-ui/lib/transitions/${file}`;
|
|
27
|
-
// });
|
|
28
|
-
|
|
29
|
-
externals = [Object.assign({
|
|
30
|
-
vue: 'vue'
|
|
31
|
-
}, externals), nodeExternals()];
|
|
32
|
-
console.log(externals);
|
|
33
|
-
exports.externals = externals;
|
|
34
|
-
|
|
35
|
-
exports.alias = {
|
|
36
|
-
'vue$': 'vue/dist/vue.esm.js',
|
|
37
|
-
'@': path.join(__dirname, '..', 'src'),
|
|
38
|
-
'src': path.resolve(__dirname, '../src'),
|
|
39
|
-
'assets': path.resolve(__dirname, '../src/assets'),
|
|
40
|
-
'components': path.resolve(__dirname, '../src/components'),
|
|
41
|
-
'views': path.resolve(__dirname, '../src/views'),
|
|
42
|
-
'styles': path.resolve(__dirname, '../src/styles'),
|
|
43
|
-
'api': path.resolve(__dirname, '../src/api'),
|
|
44
|
-
'utils': path.resolve(__dirname, '../src/utils'),
|
|
45
|
-
'store': path.resolve(__dirname, '../src/store'),
|
|
46
|
-
'router': path.resolve(__dirname, '../src/router'),
|
|
47
|
-
'mock': path.resolve(__dirname, '../src/mock'),
|
|
48
|
-
'vendor': path.resolve(__dirname, '../src/vendor'),
|
|
49
|
-
'static': path.resolve(__dirname, '../static')
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
exports.vue = {
|
|
53
|
-
root: 'Vue',
|
|
54
|
-
commonjs: 'vue',
|
|
55
|
-
commonjs2: 'vue',
|
|
56
|
-
amd: 'vue'
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
exports.loaders = [{
|
|
60
|
-
test: /\.vue$/,
|
|
61
|
-
loader: 'vue-loader',
|
|
62
|
-
}, {
|
|
63
|
-
test: /\.js$/,
|
|
64
|
-
loader: 'babel-loader?cacheDirectory',
|
|
65
|
-
exclude: /node_modules/
|
|
66
|
-
}, {
|
|
67
|
-
test: /\.css$/,
|
|
68
|
-
loader: 'style!css!autoprefixer'
|
|
69
|
-
}, {
|
|
70
|
-
test: /\.less$/,
|
|
71
|
-
loader: 'style!css!less'
|
|
72
|
-
}, {
|
|
73
|
-
test: /\.(wav|mp3|mp4)(\?.*)?$/,
|
|
74
|
-
loader: 'url-loader',
|
|
75
|
-
}, {
|
|
76
|
-
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
|
|
77
|
-
loader: 'url?limit=8192'
|
|
78
|
-
}, {
|
|
79
|
-
test: /\.(html|tpl)$/,
|
|
80
|
-
loader: 'vue-html'
|
|
81
|
-
}];
|
package/build/dev-client.js
DELETED
package/build/dev-server.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
require('./check-versions')(); // 检查 Node 和 npm 版本
|
|
2
|
-
|
|
3
|
-
var config = require('../config');
|
|
4
|
-
if (!process.env.NODE_ENV) {
|
|
5
|
-
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
var opn = require('opn')
|
|
9
|
-
var path = require('path');
|
|
10
|
-
var express = require('express');
|
|
11
|
-
var webpack = require('webpack');
|
|
12
|
-
var proxyMiddleware = require('http-proxy-middleware');
|
|
13
|
-
var webpackConfig = require('./webpack.dev.conf');
|
|
14
|
-
|
|
15
|
-
// default port where dev server listens for incoming traffic
|
|
16
|
-
var port = process.env.PORT || config.dev.port;
|
|
17
|
-
// automatically open browser, if not set will be false
|
|
18
|
-
var autoOpenBrowser = !!config.dev.autoOpenBrowser;
|
|
19
|
-
// Define HTTP proxies to your custom API backend
|
|
20
|
-
// https://github.com/chimurai/http-proxy-middleware
|
|
21
|
-
var proxyTable = config.dev.proxyTable;
|
|
22
|
-
|
|
23
|
-
var app = express();
|
|
24
|
-
var compiler = webpack(webpackConfig);
|
|
25
|
-
|
|
26
|
-
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
27
|
-
publicPath: webpackConfig.output.publicPath,
|
|
28
|
-
quiet: true
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
var hotMiddleware = require('webpack-hot-middleware')(compiler, {
|
|
32
|
-
log: false,
|
|
33
|
-
heartbeat: 2000
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// force page reload when html-webpack-plugin template changes
|
|
37
|
-
// currently disabled until this is resolved:
|
|
38
|
-
// https://github.com/jantimon/html-webpack-plugin/issues/680
|
|
39
|
-
// compiler.plugin('compilation', function (compilation) {
|
|
40
|
-
// compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
41
|
-
// hotMiddleware.publish({ action: 'reload' })
|
|
42
|
-
// cb()
|
|
43
|
-
// })
|
|
44
|
-
// })
|
|
45
|
-
|
|
46
|
-
// proxy api requests
|
|
47
|
-
Object.keys(proxyTable).forEach(function (context) {
|
|
48
|
-
var options = proxyTable[context]
|
|
49
|
-
if (typeof options === 'string') {
|
|
50
|
-
options = {target: options}
|
|
51
|
-
}
|
|
52
|
-
app.use(proxyMiddleware(options.filter || context, options))
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// handle fallback for HTML5 history API
|
|
56
|
-
app.use(require('connect-history-api-fallback')());
|
|
57
|
-
|
|
58
|
-
// serve webpack bundle output
|
|
59
|
-
app.use(devMiddleware);
|
|
60
|
-
|
|
61
|
-
// enable hot-reload and state-preserving
|
|
62
|
-
// compilation error display
|
|
63
|
-
app.use(hotMiddleware);
|
|
64
|
-
|
|
65
|
-
// serve pure static assets
|
|
66
|
-
var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory);
|
|
67
|
-
app.use(staticPath, express.static('./static'));
|
|
68
|
-
|
|
69
|
-
var uri = 'http://localhost:' + port
|
|
70
|
-
|
|
71
|
-
var _resolve
|
|
72
|
-
var readyPromise = new Promise(resolve => {
|
|
73
|
-
_resolve = resolve
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
console.log('> Starting dev server...')
|
|
77
|
-
devMiddleware.waitUntilValid(() => {
|
|
78
|
-
console.log('> Listening at ' + uri + '\n')
|
|
79
|
-
// when env is testing, don't need open it
|
|
80
|
-
if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
|
|
81
|
-
opn(uri)
|
|
82
|
-
}
|
|
83
|
-
_resolve()
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
var server = app.listen(port)
|
|
87
|
-
|
|
88
|
-
module.exports = {
|
|
89
|
-
ready: readyPromise,
|
|
90
|
-
close: () => {
|
|
91
|
-
server.close()
|
|
92
|
-
}
|
|
93
|
-
}
|
package/build/utils.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
var path = require('path')
|
|
2
|
-
var config = require('../config')
|
|
3
|
-
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
|
4
|
-
|
|
5
|
-
exports.assetsPath = function (_path) {
|
|
6
|
-
var assetsSubDirectory = process.env.NODE_ENV === 'production'
|
|
7
|
-
? config.build.assetsSubDirectory
|
|
8
|
-
: config.dev.assetsSubDirectory
|
|
9
|
-
return path.posix.join(assetsSubDirectory, _path)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
exports.cssLoaders = function (options) {
|
|
13
|
-
options = options || {}
|
|
14
|
-
|
|
15
|
-
var cssLoader = {
|
|
16
|
-
loader: 'css-loader',
|
|
17
|
-
options: {
|
|
18
|
-
minimize: process.env.NODE_ENV === 'production',
|
|
19
|
-
sourceMap: options.sourceMap
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var postcssLoader = {
|
|
24
|
-
loader: 'postcss-loader',
|
|
25
|
-
options: {
|
|
26
|
-
sourceMap: true
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// generate loader string to be used with extract text plugin
|
|
31
|
-
function generateLoaders (loader, loaderOptions) {
|
|
32
|
-
var loaders = options.usePostCSS !== false ? [cssLoader, postcssLoader] : [cssLoader]
|
|
33
|
-
if (loader) {
|
|
34
|
-
loaders.push({
|
|
35
|
-
loader: loader + '-loader',
|
|
36
|
-
options: Object.assign({}, loaderOptions, {
|
|
37
|
-
sourceMap: options.sourceMap
|
|
38
|
-
})
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Extract CSS when that option is specified
|
|
43
|
-
// (which is the case during production build)
|
|
44
|
-
if (options.extract) {
|
|
45
|
-
return ExtractTextPlugin.extract({
|
|
46
|
-
use: loaders,
|
|
47
|
-
fallback: 'vue-style-loader'
|
|
48
|
-
})
|
|
49
|
-
} else {
|
|
50
|
-
return ['vue-style-loader'].concat(loaders)
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
|
55
|
-
return {
|
|
56
|
-
css: generateLoaders(),
|
|
57
|
-
postcss: generateLoaders(),
|
|
58
|
-
less: generateLoaders('less'),
|
|
59
|
-
sass: generateLoaders('sass', { indentedSyntax: true }),
|
|
60
|
-
scss: generateLoaders('sass'),
|
|
61
|
-
stylus: generateLoaders('stylus'),
|
|
62
|
-
styl: generateLoaders('stylus')
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Generate loaders for standalone style files (outside of .vue)
|
|
67
|
-
exports.styleLoaders = function (options) {
|
|
68
|
-
var output = []
|
|
69
|
-
var loaders = exports.cssLoaders(options)
|
|
70
|
-
for (var extension in loaders) {
|
|
71
|
-
var loader = loaders[extension]
|
|
72
|
-
output.push({
|
|
73
|
-
test: new RegExp('\\.' + extension + '$'),
|
|
74
|
-
use: loader
|
|
75
|
-
})
|
|
76
|
-
}
|
|
77
|
-
return output
|
|
78
|
-
}
|
package/build/vue-loader.conf.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var utils = require('./utils')
|
|
2
|
-
var config = require('../config')
|
|
3
|
-
var isProduction = process.env.NODE_ENV === 'production'
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
loaders: utils.cssLoaders({
|
|
7
|
-
sourceMap: isProduction
|
|
8
|
-
? config.build.productionSourceMap
|
|
9
|
-
: config.dev.cssSourceMap,
|
|
10
|
-
extract: isProduction
|
|
11
|
-
})
|
|
12
|
-
}
|
package/build/webpack.common.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var path = require('path');
|
|
2
|
-
var webpack = require('webpack');
|
|
3
|
-
|
|
4
|
-
const config = require('./config');
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
entry: {
|
|
8
|
-
main: './src/idev.common.js'
|
|
9
|
-
},
|
|
10
|
-
output: {
|
|
11
|
-
path: path.resolve(__dirname, '../lib'),
|
|
12
|
-
publicPath: '/dist/',
|
|
13
|
-
filename: 'idev.common.js',
|
|
14
|
-
chunkFilename: '[id].js',
|
|
15
|
-
library: 'idevvue',
|
|
16
|
-
libraryExport: 'default',
|
|
17
|
-
libraryTarget: 'commonjs2'
|
|
18
|
-
},
|
|
19
|
-
externals: config.externals,
|
|
20
|
-
resolve: {
|
|
21
|
-
extensions: ['.js', '.vue'],
|
|
22
|
-
alias: config.alias
|
|
23
|
-
},
|
|
24
|
-
module: {
|
|
25
|
-
loaders: config.loaders
|
|
26
|
-
},
|
|
27
|
-
plugins: [
|
|
28
|
-
new webpack.DefinePlugin({
|
|
29
|
-
'process.env': {
|
|
30
|
-
NODE_ENV: '"production"'
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
module.exports.plugins.push(
|
|
36
|
-
new webpack.optimize.UglifyJsPlugin({sourceMap: true})
|
|
37
|
-
);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var path = require('path');
|
|
4
|
-
var webpack = require('webpack');
|
|
5
|
-
|
|
6
|
-
const config = require('./config');
|
|
7
|
-
const Components = require('../components.json');
|
|
8
|
-
|
|
9
|
-
module.exports = {
|
|
10
|
-
entry: Components,
|
|
11
|
-
output: {
|
|
12
|
-
path: path.resolve(__dirname, '../lib'),
|
|
13
|
-
publicPath: '/dist/',
|
|
14
|
-
filename: 'js/[name].js',
|
|
15
|
-
chunkFilename: '[id].js',
|
|
16
|
-
libraryTarget: 'commonjs2',
|
|
17
|
-
},
|
|
18
|
-
externals: config.externals,
|
|
19
|
-
resolve: {
|
|
20
|
-
extensions: ['.js', '.vue'],
|
|
21
|
-
alias: config.alias
|
|
22
|
-
},
|
|
23
|
-
module: {
|
|
24
|
-
loaders: config.loaders
|
|
25
|
-
},
|
|
26
|
-
plugins: [
|
|
27
|
-
new webpack.DefinePlugin({
|
|
28
|
-
'process.env': {
|
|
29
|
-
NODE_ENV: '"production"'
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
module.exports.plugins.push(
|
|
35
|
-
new webpack.optimize.UglifyJsPlugin({sourceMap: true}),
|
|
36
|
-
);
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var path = require('path');
|
|
2
|
-
var webpack = require('webpack');
|
|
3
|
-
|
|
4
|
-
const config = require('./config');
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
entry: {
|
|
8
|
-
main: './src/index.js'
|
|
9
|
-
},
|
|
10
|
-
output: {
|
|
11
|
-
path: path.resolve(__dirname, '../lib'),
|
|
12
|
-
publicPath: '/lib/',
|
|
13
|
-
filename: 'index.js',
|
|
14
|
-
library: 'lib',
|
|
15
|
-
libraryTarget: 'umd',
|
|
16
|
-
umdNamedDefine: true
|
|
17
|
-
},
|
|
18
|
-
externals: {
|
|
19
|
-
vue: config.vue
|
|
20
|
-
},
|
|
21
|
-
resolve: {
|
|
22
|
-
extensions: ['.js', '.vue'],
|
|
23
|
-
alias: config.alias
|
|
24
|
-
},
|
|
25
|
-
module: {
|
|
26
|
-
loaders: config.loaders
|
|
27
|
-
},
|
|
28
|
-
plugins: [
|
|
29
|
-
new webpack.DefinePlugin({
|
|
30
|
-
'process.env': {
|
|
31
|
-
NODE_ENV: '"production"'
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
module.exports.plugins.push(
|
|
37
|
-
new webpack.optimize.UglifyJsPlugin({sourceMap: true}),
|
|
38
|
-
);
|
package/components.json
DELETED
package/conf.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* jsdoc-vue 配置文件
|
|
3
|
-
*/
|
|
4
|
-
module.exports = {
|
|
5
|
-
"tags": {
|
|
6
|
-
"allowUnknownTags": true,
|
|
7
|
-
// 指定所用词典
|
|
8
|
-
"dictionaries": [
|
|
9
|
-
"jsdoc"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
// 查找文件的深度 需要用 -r 参数
|
|
13
|
-
"recurseDepth": 10,
|
|
14
|
-
"source": {
|
|
15
|
-
"include": [
|
|
16
|
-
// 需要编译的文件路径 使用时请替换
|
|
17
|
-
"./src"
|
|
18
|
-
],
|
|
19
|
-
"includePattern": ".+\\.(vue)$",
|
|
20
|
-
"excludePattern": "(^|\\/|\\\\)_"
|
|
21
|
-
},
|
|
22
|
-
// 使用插件
|
|
23
|
-
"plugins": [
|
|
24
|
-
// 插件路径
|
|
25
|
-
"./jsdoc-vue"
|
|
26
|
-
],
|
|
27
|
-
"templates": {
|
|
28
|
-
"cleverLinks": false,
|
|
29
|
-
"monospaceLinks": true,
|
|
30
|
-
"useLongnameInNav": false,
|
|
31
|
-
"showInheritedInNav": true
|
|
32
|
-
},
|
|
33
|
-
"opts": {
|
|
34
|
-
// 文档输出路径
|
|
35
|
-
"destination": "./doc",
|
|
36
|
-
"encoding": "utf8",
|
|
37
|
-
"private": true,
|
|
38
|
-
"recurse": true,
|
|
39
|
-
// 使用模板 minami
|
|
40
|
-
"template": "./node_modules/minami"
|
|
41
|
-
}
|
|
42
|
-
}
|
package/config/dev.env.js
DELETED
package/config/index.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// see http://vuejs-templates.github.io/webpack for documentation.
|
|
2
|
-
var path = require('path')
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
build: {
|
|
6
|
-
sitEnv: require('./sit.env'),
|
|
7
|
-
prodEnv: require('./prod.env'),
|
|
8
|
-
index: path.resolve(__dirname, '../dist/index.html'),
|
|
9
|
-
assetsRoot: path.resolve(__dirname, '../dist'),
|
|
10
|
-
assetsSubDirectory: 'static',
|
|
11
|
-
assetsPublicPath: './', //请根据自己路径配置更改
|
|
12
|
-
productionSourceMap: false,
|
|
13
|
-
// Gzip off by default as many popular static hosts such as
|
|
14
|
-
// Surge or Netlify already gzip all static assets for you.
|
|
15
|
-
// Before setting to `true`, make sure to:
|
|
16
|
-
// npm install --save-dev compression-webpack-plugin
|
|
17
|
-
productionGzip: false,
|
|
18
|
-
productionGzipExtensions: ['js', 'css'],
|
|
19
|
-
// Run the build command with an extra argument to
|
|
20
|
-
// View the bundle analyzer report after build finishes:
|
|
21
|
-
// `npm run build --report`
|
|
22
|
-
// Set to `true` or `false` to always turn it on or off
|
|
23
|
-
bundleAnalyzerReport: process.env.npm_config_report
|
|
24
|
-
},
|
|
25
|
-
dev: {
|
|
26
|
-
env: require('./dev.env'),
|
|
27
|
-
port: 9527,
|
|
28
|
-
autoOpenBrowser: true,
|
|
29
|
-
assetsSubDirectory: 'static',
|
|
30
|
-
assetsPublicPath: '/',
|
|
31
|
-
proxyTable: {
|
|
32
|
-
'/webresources': 'http://localhost:8080',
|
|
33
|
-
'/PrivilegeVueController': 'http://localhost:8080'
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
// CSS Sourcemaps off by default because relative paths are "buggy"
|
|
37
|
-
// with this option, according to the CSS-Loader README
|
|
38
|
-
// (https://github.com/webpack/css-loader#sourcemaps)
|
|
39
|
-
// In our experience, they generally work as expected,
|
|
40
|
-
// just be aware of this issue when enabling this option.
|
|
41
|
-
cssSourceMap: false
|
|
42
|
-
}
|
|
43
|
-
}
|
package/config/prod.env.js
DELETED
package/config/sit.env.js
DELETED
package/favicon.ico
DELETED
|
Binary file
|
package/jsdoc-vue.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var compiler = require('vue-template-compiler');
|
|
2
|
-
|
|
3
|
-
exports.handlers = {
|
|
4
|
-
// 利用 vue-template-compiler 编译 vue 模板
|
|
5
|
-
beforeParse: function (e) {
|
|
6
|
-
if (/\.vue$/.test(e.filename)) {
|
|
7
|
-
var output = compiler.parseComponent(e.source);
|
|
8
|
-
|
|
9
|
-
e.source = output.script ? output.script.content : '';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|