diff --git a/.storybook/main.js b/.storybook/main.js index d795354e..9aaf14c5 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -23,6 +23,7 @@ module.exports = { '@storybook/addon-toolbars' ], webpackFinal: async (config, { configType }) => { + config.module.noParse = /(mapbox-gl-enhance)\.js$/, config.resolve.alias['vue-iclient'] = resolve('./'); config.resolve.alias['@supermapgis/vue-iclient-mapboxgl/static'] = resolve('./static'); config.resolve.alias['@supermapgis/vue-iclient-mapboxgl/lib'] = resolve('./lib/mapboxgl'); diff --git a/babel.config.js b/babel.config.js index 15cd3484..09cad498 100644 --- a/babel.config.js +++ b/babel.config.js @@ -15,6 +15,7 @@ module.exports = function (api) { ]; const plugins = [ '@babel/plugin-transform-runtime', + 'transform-vue-jsx', 'transform-flow-strip-types', '@babel/plugin-transform-modules-commonjs', [ diff --git a/build/iclient/common-webmapv2base.js b/build/iclient/common-webmapv2base.js new file mode 100644 index 00000000..70d2bdd7 --- /dev/null +++ b/build/iclient/common-webmapv2base.js @@ -0,0 +1 @@ +export * from '../src/common/mapping/WebMapV2Base'; \ No newline at end of file diff --git a/build/iclient/common.js b/build/iclient/common.js index 446b601b..601f6c2c 100644 --- a/build/iclient/common.js +++ b/build/iclient/common.js @@ -1,21 +1,31 @@ import { QueryBySQLParameters } from '../src/common/iServer/QueryBySQLParameters'; +import { QueryByGeometryParameters } from '../src/common/iServer/QueryByGeometryParameters'; import { FilterParameter } from '../src/common/iServer/FilterParameter'; import { QueryBySQLService } from '../src/common/iServer/QueryBySQLService'; +import { QueryService } from '../src/common/iServer/QueryService'; import { FetchRequest } from '../src/common/util/FetchRequest'; import { GetFeaturesBySQLParameters } from '../src/common/iServer/GetFeaturesBySQLParameters'; import { GetFeaturesBySQLService } from '../src/common/iServer/GetFeaturesBySQLService'; +import { GetFeaturesByBoundsParameters } from '../src/common/iServer/GetFeaturesByBoundsParameters'; import { FeatureService } from '../src/common/iServer/FeatureService'; import { Util } from '../src/common/commontypes/Util'; import { ColorsPickerUtil } from '../src/common/util/ColorsPickerUtil'; +import { GeometryPolygon, GeometryLinearRing, GeometryPoint } from '../src/common/commontypes'; export { QueryBySQLParameters, + QueryByGeometryParameters, FilterParameter, QueryBySQLService, + QueryService, FetchRequest, GetFeaturesBySQLParameters, GetFeaturesBySQLService, + GetFeaturesByBoundsParameters, FeatureService, Util, - ColorsPickerUtil + ColorsPickerUtil, + GeometryPolygon, + GeometryLinearRing, + GeometryPoint }; diff --git a/build/iclient/webpack.config.common-webmapv2base.js b/build/iclient/webpack.config.common-webmapv2base.js new file mode 100644 index 00000000..0489d318 --- /dev/null +++ b/build/iclient/webpack.config.common-webmapv2base.js @@ -0,0 +1,48 @@ +// "deploy-common": "webpack --config ./build/webpack.config.common.js --color", + +// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; + +module.exports = { + target: ['es6'], + mode: 'production', + //页面入口文件配置 + entry: [`${__dirname}/common-webmapv2base.js`], + + output: { + clean: true, + path: `${__dirname}/../dist/common/`, + filename: 'iclient-common-webmapv2base.js', + chunkFormat: 'commonjs', + libraryTarget: 'umd' + }, + + //是否启用压缩 + optimization: { + minimize: true, + emitOnErrors: false + }, + //不显示打包文件大小相关警告 + performance: { + hints: false + }, + + //其它解决方案配置 + resolve: { + extensions: ['.js'] + }, + + module: { + rules: [ + { + test: [/\.js$/], + exclude: /node_modules[\/\\]proj4/, + loader: 'babel-loader', + options: { + presets: ['@babel/preset-env'] + } + } + ] + }, + + plugins: [] +}; diff --git a/demo/iconfont/iconfont.html b/demo/iconfont/iconfont.html index 8a40932c..4c54eb8d 100644 --- a/demo/iconfont/iconfont.html +++ b/demo/iconfont/iconfont.html @@ -2,9 +2,9 @@ - IconFont Demo - - + iconfont Demo + + @@ -13,10 +13,33 @@ +
-

+

+ + +