├── packages ├── .gitkeep ├── types │ ├── src │ │ └── index.ts │ ├── .eslintrc.cjs │ ├── tsconfig.json │ ├── build.config.ts │ └── package.json └── hooks │ ├── .eslintrc.cjs │ ├── src │ ├── useRequest │ │ └── utils │ │ │ ├── isFunction.ts │ │ │ ├── isBrowser.ts │ │ │ ├── isDocumentVisible.ts │ │ │ ├── isOnline.ts │ │ │ ├── limit.ts │ │ │ ├── cacheSubscribe.ts │ │ │ ├── subscribeReVisible.ts │ │ │ └── cachePromise.ts │ ├── index.ts │ ├── onMountedOrActivated.ts │ └── useRefs.ts │ ├── tsconfig.json │ └── build.config.ts ├── CNAME ├── apps ├── portal-view │ └── .gitkeep └── test-server │ ├── nodemon.json │ ├── utils.ts │ ├── tsconfig.json │ ├── README.md │ ├── controller │ ├── UserController.ts │ └── FileController.ts │ ├── ecosystem.config.cjs │ ├── routes.ts │ └── service │ └── UserService.ts ├── .stylelintignore ├── .dockerignore ├── .env ├── src ├── components │ ├── Tree │ │ ├── style │ │ │ └── index.ts │ │ ├── index.ts │ │ └── src │ │ │ └── TreeIcon.ts │ ├── SimpleMenu │ │ ├── index.ts │ │ └── src │ │ │ ├── types.ts │ │ │ └── components │ │ │ └── types.ts │ ├── Menu │ │ ├── index.ts │ │ └── src │ │ │ ├── types.ts │ │ │ └── components │ │ │ └── BasicMenuItem.vue │ ├── CodeEditor │ │ ├── src │ │ │ ├── typing.ts │ │ │ └── json-preview │ │ │ │ └── JsonPreview.vue │ │ └── index.ts │ ├── Preview │ │ ├── index.ts │ │ └── src │ │ │ └── functional.ts │ ├── Markdown │ │ ├── src │ │ │ ├── typing.ts │ │ │ └── getTheme.ts │ │ └── index.ts │ ├── Time │ │ └── index.ts │ ├── ContextMenu │ │ ├── index.ts │ │ └── src │ │ │ └── typing.ts │ ├── VxeTable │ │ ├── src │ │ │ ├── const.ts │ │ │ ├── css │ │ │ │ ├── index.scss │ │ │ │ ├── common.scss │ │ │ │ └── toolbar.scss │ │ │ ├── components │ │ │ │ ├── ACheckboxGroup.tsx │ │ │ │ ├── ARadioGroup.tsx │ │ │ │ ├── ARate.tsx │ │ │ │ ├── AInput.tsx │ │ │ │ ├── AAutoComplete.tsx │ │ │ │ ├── AInputNumber.tsx │ │ │ │ ├── AInputSearch.tsx │ │ │ │ ├── AYearPicker.tsx │ │ │ │ ├── AMonthPicker.tsx │ │ │ │ ├── ATimePicker.tsx │ │ │ │ ├── AWeekPicker.tsx │ │ │ │ ├── AApiSelect.tsx │ │ │ │ ├── AApiTreeSelect.tsx │ │ │ │ └── AEmpty.tsx │ │ │ ├── setting.ts │ │ │ ├── types.ts │ │ │ ├── emits.ts │ │ │ ├── componentType.ts │ │ │ └── helper.ts │ │ └── index.ts │ ├── Icon │ │ └── index.ts │ ├── CountTo │ │ └── index.ts │ ├── Tinymce │ │ └── index.ts │ ├── CardList │ │ ├── index.ts │ │ └── src │ │ │ └── data.ts │ ├── Authority │ │ └── index.ts │ ├── FlowChart │ │ ├── index.ts │ │ └── src │ │ │ ├── enum.ts │ │ │ ├── types.ts │ │ │ └── useFlowContext.ts │ ├── Qrcode │ │ ├── src │ │ │ ├── qrcodePlus.ts │ │ │ └── toCanvas.ts │ │ └── index.ts │ ├── Form │ │ ├── src │ │ │ ├── types │ │ │ │ └── hooks.ts │ │ │ └── hooks │ │ │ │ ├── useFormContext.ts │ │ │ │ └── useComponentRegister.ts │ │ └── index.ts │ ├── VirtualScroll │ │ └── index.ts │ ├── ClickOutSide │ │ ├── index.ts │ │ └── src │ │ │ └── ClickOutSide.vue │ ├── EllipsisText │ │ └── index.ts │ ├── StrengthMeter │ │ └── index.ts │ ├── Dropdown │ │ ├── index.ts │ │ └── src │ │ │ └── typing.ts │ ├── Loading │ │ ├── index.ts │ │ └── src │ │ │ └── typing.ts │ ├── Cropper │ │ ├── src │ │ │ └── typing.ts │ │ └── index.ts │ ├── Scrollbar │ │ ├── index.ts │ │ └── src │ │ │ └── types.d.ts │ ├── Description │ │ └── index.ts │ ├── Drawer │ │ └── index.ts │ ├── Page │ │ └── index.ts │ ├── CountDown │ │ └── index.ts │ ├── Upload │ │ ├── index.ts │ │ └── src │ │ │ └── components │ │ │ └── ThumbUrl.vue │ ├── registerGlobComp.ts │ ├── Application │ │ ├── src │ │ │ ├── search │ │ │ │ └── AppSearchKeyItem.vue │ │ │ └── useAppContext.ts │ │ └── index.ts │ ├── Verify │ │ ├── src │ │ │ └── typing.ts │ │ └── index.ts │ ├── Table │ │ ├── src │ │ │ ├── types │ │ │ │ └── componentType.ts │ │ │ ├── components │ │ │ │ ├── EditTableHeaderIcon.vue │ │ │ │ ├── settings │ │ │ │ │ └── RedoSetting.vue │ │ │ │ └── editable │ │ │ │ │ └── helper.ts │ │ │ ├── hooks │ │ │ │ ├── useLoading.ts │ │ │ │ ├── useTableContext.ts │ │ │ │ └── useTableStyle.ts │ │ │ └── helper.ts │ │ └── index.ts │ ├── Modal │ │ ├── index.ts │ │ └── src │ │ │ ├── components │ │ │ └── ModalHeader.vue │ │ │ └── hooks │ │ │ └── useModalContext.ts │ ├── Basic │ │ └── index.ts │ ├── Container │ │ ├── index.ts │ │ └── src │ │ │ └── typing.ts │ ├── Excel │ │ └── index.ts │ └── Button │ │ ├── index.ts │ │ └── src │ │ └── props.ts ├── logics │ └── theme │ │ ├── index.ts │ │ ├── updateGrayMode.ts │ │ ├── updateColorWeak.ts │ │ ├── util.ts │ │ └── dark.ts ├── views │ ├── sys │ │ ├── exception │ │ │ └── index.ts │ │ ├── iframe │ │ │ └── FrameBlank.vue │ │ ├── lock │ │ │ └── index.vue │ │ └── redirect │ │ │ └── index.vue │ ├── demo │ │ ├── feat │ │ │ ├── breadcrumb │ │ │ │ ├── FlatListDetail.vue │ │ │ │ ├── ChildrenListDetail.vue │ │ │ │ ├── FlatList.vue │ │ │ │ └── ChildrenList.vue │ │ │ ├── ripple │ │ │ │ └── index.vue │ │ │ ├── tabs │ │ │ │ └── TabDetail.vue │ │ │ ├── tab-params │ │ │ │ └── index.vue │ │ │ └── click-out-side │ │ │ │ └── index.vue │ │ ├── level │ │ │ ├── Menu12.vue │ │ │ ├── Menu2.vue │ │ │ └── Menu111.vue │ │ ├── comp │ │ │ ├── drawer │ │ │ │ ├── Drawer1.vue │ │ │ │ ├── Drawer5.vue │ │ │ │ └── Drawer2.vue │ │ │ ├── modal │ │ │ │ ├── Modal3.vue │ │ │ │ └── Modal2.vue │ │ │ ├── flow-chart │ │ │ │ └── index.vue │ │ │ ├── verify │ │ │ │ └── Rotate.vue │ │ │ ├── strength-meter │ │ │ │ └── index.vue │ │ │ └── scroll │ │ │ │ └── index.vue │ │ ├── main-out │ │ │ └── index.vue │ │ ├── page │ │ │ └── list │ │ │ │ ├── card │ │ │ │ └── data.tsx │ │ │ │ └── basic │ │ │ │ └── data.tsx │ │ ├── permission │ │ │ └── front │ │ │ │ ├── AuthPageA.vue │ │ │ │ └── AuthPageB.vue │ │ ├── editor │ │ │ └── tinymce │ │ │ │ └── index.vue │ │ └── table │ │ │ ├── MultipleHeader.vue │ │ │ └── MergeHeader.vue │ ├── form-design │ │ ├── typings │ │ │ └── base-type.ts │ │ ├── index.vue │ │ ├── components │ │ │ └── VFormDesign │ │ │ │ └── styles │ │ │ │ └── variable.less │ │ ├── utils │ │ │ └── message.ts │ │ └── hooks │ │ │ └── useFormDesignState.ts │ ├── dashboard │ │ ├── analysis │ │ │ └── components │ │ │ │ └── props.ts │ │ └── workbench │ │ │ └── components │ │ │ └── QuickNav.vue │ └── hooks │ │ └── request │ │ └── mock-api.ts ├── design │ ├── config.less │ ├── ant │ │ ├── popconfirm.less │ │ └── input.less │ ├── transition │ │ ├── index.less │ │ ├── base.less │ │ ├── scale.less │ │ ├── zoom.less │ │ └── slide.less │ └── var │ │ └── index.less ├── locales │ └── lang │ │ ├── en │ │ ├── routes │ │ │ ├── basic.json │ │ │ └── dashboard.json │ │ └── common.json │ │ ├── zh-CN │ │ ├── routes │ │ │ ├── basic.json │ │ │ └── dashboard.json │ │ ├── antdLocale │ │ │ └── DatePicker.json │ │ └── common.json │ │ ├── en.ts │ │ └── zh_CN.ts ├── marsgis │ ├── components │ │ └── mars-ui │ │ │ ├── common.ts │ │ │ ├── themes │ │ │ ├── index.ts │ │ │ ├── light │ │ │ │ └── zhts.less │ │ │ ├── assets │ │ │ │ └── images │ │ │ │ │ ├── header-bg.png │ │ │ │ │ ├── pannel-bg.png │ │ │ │ │ ├── tab-title.png │ │ │ │ │ ├── menu-hover.png │ │ │ │ │ ├── dialog-title.png │ │ │ │ │ ├── heade-title-bg.png │ │ │ │ │ ├── msg-title-bg.png │ │ │ │ │ ├── sub-menu-emb.png │ │ │ │ │ ├── border-image-base.png │ │ │ │ │ ├── dialog-title-slice.png │ │ │ │ │ ├── sub-menu-emb-light.png │ │ │ │ │ └── selet-dropdown-border.png │ │ │ └── dark │ │ │ │ └── zhts.less │ │ │ ├── assets │ │ │ └── images │ │ │ │ ├── logo.png │ │ │ │ ├── tab-title.png │ │ │ │ ├── border-image-base.png │ │ │ │ ├── zhyq │ │ │ │ ├── search-order.png │ │ │ │ ├── datails-title-bg.png │ │ │ │ └── echarts-title-bottom.png │ │ │ │ ├── login │ │ │ │ ├── login-bg-color.png │ │ │ │ ├── login-bg-earth.png │ │ │ │ ├── login-title-bg.png │ │ │ │ ├── login-content-bg.png │ │ │ │ ├── login-title-logo.png │ │ │ │ └── login-content-footer.png │ │ │ │ └── query-site-text_num.png │ │ │ ├── mars-message │ │ │ └── message.less │ │ │ ├── mars-notify │ │ │ └── notify.less │ │ │ ├── mars-table │ │ │ └── index.vue │ │ │ ├── mars-dropdown │ │ │ ├── index.ts │ │ │ └── dropdown.less │ │ │ ├── mars-gui │ │ │ └── index.ts │ │ │ └── mars-input-group │ │ │ └── index.vue │ ├── widgets │ │ ├── basic │ │ │ ├── manage-layers │ │ │ │ ├── img │ │ │ │ │ ├── guihua.jpg │ │ │ │ │ └── heatmap.png │ │ │ │ ├── layer-picture-guihua.vue │ │ │ │ └── layer-picture-heatmap.vue │ │ │ └── manage-basemap │ │ │ │ └── map.ts │ │ └── demo │ │ │ ├── test │ │ │ └── index.vue │ │ │ └── menu │ │ │ └── popup-demo.vue │ ├── .prettierrc │ ├── common │ │ ├── store │ │ │ └── test.ts │ │ └── uses │ │ │ └── use-lifecycle.ts │ ├── .editorconfig │ ├── views │ │ └── index.vue │ └── install │ │ └── index.ts ├── assets │ └── images │ │ ├── demo.png │ │ ├── logo.png │ │ └── header.jpg ├── enums │ ├── sizeEnum.ts │ ├── roleEnum.ts │ ├── pageEnum.ts │ ├── exceptionEnum.ts │ ├── breakpointEnum.ts │ └── httpEnum.ts ├── api │ ├── sys │ │ ├── model │ │ │ ├── uploadModel.ts │ │ │ ├── menuModel.ts │ │ │ └── userModel.ts │ │ ├── menu.ts │ │ └── upload.ts │ ├── demo │ │ ├── model │ │ │ ├── accountModel.ts │ │ │ ├── areaModel.ts │ │ │ ├── optionsModel.ts │ │ │ └── tableModel.ts │ │ ├── error.ts │ │ ├── cascader.ts │ │ ├── tree.ts │ │ ├── select.ts │ │ ├── table.ts │ │ └── account.ts │ └── model │ │ └── baseModel.ts ├── settings │ ├── siteSetting.ts │ ├── encryptionSetting.ts │ └── localeSetting.ts ├── utils │ ├── log.ts │ ├── dateUtil.ts │ └── uuid.ts ├── hooks │ ├── web │ │ ├── useAppInject.ts │ │ ├── useContextMenu.ts │ │ ├── useSortable.ts │ │ └── useDesign.ts │ ├── setting │ │ ├── useDarkModeTheme.ts │ │ └── index.ts │ └── component │ │ └── usePageContext.ts ├── store │ └── index.ts ├── directives │ ├── index.ts │ └── ripple │ │ └── index.less ├── layouts │ ├── default │ │ ├── trigger │ │ │ ├── index.vue │ │ │ ├── SiderTrigger.vue │ │ │ └── HeaderTrigger.vue │ │ ├── setting │ │ │ ├── index.vue │ │ │ └── components │ │ │ │ └── index.ts │ │ ├── header │ │ │ └── components │ │ │ │ ├── index.ts │ │ │ │ └── user-dropdown │ │ │ │ └── DropMenuItem.vue │ │ ├── tabs │ │ │ ├── types.ts │ │ │ └── components │ │ │ │ └── SettingButton.vue │ │ └── content │ │ │ └── useContentContext.ts │ └── iframe │ │ └── index.vue └── router │ ├── routes │ ├── mainOut.ts │ └── modules │ │ ├── demo │ │ ├── flow.ts │ │ └── steps.ts │ │ ├── about.ts │ │ └── form-design │ │ └── main.ts │ └── constant.ts ├── .browserslistrc ├── pnpm-workspace.yaml ├── public ├── logo.png ├── favicon.ico ├── img │ ├── icon │ │ ├── div1.png │ │ ├── typhoon.gif │ │ └── popupLbl.png │ ├── tietu │ │ ├── bg4.jpg │ │ ├── bagua.png │ │ ├── cloud.png │ │ ├── gugong.jpg │ │ ├── leida.jpg │ │ ├── circular.png │ │ ├── hangpai.png │ │ └── backGroundImg.jpg │ ├── basemaps │ │ ├── osm.png │ │ ├── sea.png │ │ ├── arcgis.png │ │ ├── bd-img.png │ │ ├── bd-vec.png │ │ ├── null.png │ │ ├── bingmap.png │ │ ├── offline.png │ │ ├── tdt_img.png │ │ ├── tdt_ter.png │ │ ├── tdt_vec.png │ │ ├── TerrainSTK.png │ │ ├── bd-c-bluish.png │ │ ├── bd-c-dark.png │ │ ├── bd-c-light.png │ │ ├── bd-c-pink.png │ │ ├── bingAerial.png │ │ ├── bingRoads.png │ │ ├── bingimage.png │ │ ├── blackMarble.png │ │ ├── gaode_img.png │ │ ├── gaode_vec.png │ │ ├── google_img.png │ │ ├── google_ter.png │ │ ├── google_vec.png │ │ ├── stamenToner.png │ │ ├── tencent_img.png │ │ ├── tencent_vec.png │ │ ├── bd-c-hardedge.png │ │ ├── bd-c-midnight.png │ │ ├── bd-c-redalert.png │ │ ├── mapboxStreets.png │ │ ├── mapboxTerrain.png │ │ ├── TerrainEllipsoid.png │ │ ├── bd-c-darkgreen.png │ │ ├── bd-c-googlelite.png │ │ ├── bd-c-grassgreen.png │ │ ├── bd-c-grayscale.png │ │ ├── bingAerialLabels.png │ │ ├── esriWorldImagery.png │ │ ├── mapboxSatellite.png │ │ ├── naturalEarthII.png │ │ ├── stamenWatercolor.png │ │ ├── esriWorldStreetMap.png │ │ ├── mapQuestOpenStreetMap.png │ │ └── esriNationalGeographic.png │ ├── marker │ │ ├── lace-red.png │ │ ├── mark-red.png │ │ ├── lace-blue.png │ │ ├── mark-blue.png │ │ ├── mark-green.png │ │ ├── point-red.png │ │ ├── route-end.png │ │ ├── lace-yellow.png │ │ ├── point-orange.png │ │ ├── point-yellow.png │ │ └── route-start.png │ ├── poi │ │ └── indexMark.png │ └── textures │ │ ├── arrow.png │ │ ├── colors.png │ │ ├── fence.png │ │ ├── mining.jpg │ │ ├── road.jpg │ │ ├── tanhao.png │ │ ├── arrow-h.png │ │ ├── poly-san.png │ │ ├── arrow-2left.png │ │ ├── arrow-6left.png │ │ ├── buildings.png │ │ ├── circle-scan.png │ │ ├── circle-two.png │ │ ├── fence-line.png │ │ ├── fence-top.png │ │ ├── line-colour.png │ │ ├── line-pulse.png │ │ ├── line-sprite.png │ │ ├── line-tarans.png │ │ ├── poly-hexa.png │ │ ├── poly-lake.jpg │ │ ├── poly-rivers.png │ │ ├── poly-sand.jpg │ │ ├── poly-soil.jpg │ │ ├── poly-stone.jpg │ │ ├── video-mask.png │ │ ├── line-gradual.png │ │ ├── line-sprite2.png │ │ ├── waterNormals.jpg │ │ ├── line-arrow-blue.png │ │ ├── line-arrow-right.png │ │ ├── line-arrow-trans.png │ │ ├── line-color-aqua.png │ │ ├── line-color-azure.png │ │ ├── line-color-red.png │ │ ├── line-vertebral.png │ │ ├── line-color-yellow.png │ │ └── line-arrow-dovetail.png └── resource │ └── tinymce │ └── skins │ └── ui │ ├── oxide │ ├── fonts │ │ └── tinymce-mobile.woff │ ├── content.mobile.min.css │ └── skin.shadowdom.min.css │ └── oxide-dark │ ├── content.mobile.min.css │ └── skin.shadowdom.min.css ├── .stylelintrc.cjs ├── internal ├── vite-config │ ├── src │ │ ├── index.ts │ │ ├── plugins │ │ │ ├── visualizer.ts │ │ │ ├── html.ts │ │ │ ├── mock.ts │ │ │ └── svgSprite.ts │ │ ├── utils │ │ │ └── hash.ts │ │ └── config │ │ │ └── common.ts │ ├── .eslintrc.cjs │ ├── .eslintignore │ ├── tsconfig.json │ └── build.config.ts ├── eslint-config │ ├── .eslintrc.cjs │ ├── .eslintignore │ ├── tsconfig.json │ └── build.config.ts ├── stylelint-config │ ├── .eslintrc.cjs │ ├── .eslintignore │ ├── tsconfig.json │ └── build.config.ts └── ts-config │ ├── vue-app.json │ ├── node.json │ ├── node-server.json │ └── package.json ├── .eslintrc.cjs ├── .gitpod.yml ├── .prettierignore ├── types ├── utils.d.ts ├── module.d.ts └── index.d.ts ├── uno.config.ts ├── .eslintignore ├── .npmrc ├── .env.development ├── .editorconfig ├── turbo.json ├── .prettierrc.cjs ├── .gitattributes ├── .gitignore ├── .env.production ├── .env.test ├── .env.analyze ├── .env.docker ├── tsconfig.json └── mock └── demo └── select-demo.ts /packages/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | vben.vvbin.cn 2 | -------------------------------------------------------------------------------- /apps/portal-view/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | dist 2 | public 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | .vscode/ 4 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # spa-title 2 | VITE_GLOB_APP_TITLE = Vben Admin 3 | -------------------------------------------------------------------------------- /packages/types/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './utils'; 2 | -------------------------------------------------------------------------------- /src/components/Tree/style/index.ts: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | not ie 11 5 | -------------------------------------------------------------------------------- /src/logics/theme/index.ts: -------------------------------------------------------------------------------- 1 | export async function changeTheme(_color: string) {} 2 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'internal/*' 3 | - 'packages/*' 4 | - 'apps/*' 5 | -------------------------------------------------------------------------------- /src/views/sys/exception/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Exception } from './Exception.vue'; 2 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/logo.png -------------------------------------------------------------------------------- /src/components/SimpleMenu/index.ts: -------------------------------------------------------------------------------- 1 | export { default as SimpleMenu } from './src/SimpleMenu.vue'; 2 | -------------------------------------------------------------------------------- /src/design/config.less: -------------------------------------------------------------------------------- 1 | @import (reference) 'color.less'; 2 | @import (reference) 'var/index.less'; 3 | -------------------------------------------------------------------------------- /src/views/demo/feat/breadcrumb/FlatListDetail.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /.stylelintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@vben/stylelint-config'], 4 | }; 5 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/components/Menu/index.ts: -------------------------------------------------------------------------------- 1 | import BasicMenu from './src/BasicMenu.vue'; 2 | 3 | export { BasicMenu }; 4 | -------------------------------------------------------------------------------- /src/locales/lang/en/routes/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "login": "Login", 3 | "errorLogList": "Error Log" 4 | } 5 | -------------------------------------------------------------------------------- /src/locales/lang/zh-CN/routes/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "login": "登录", 3 | "errorLogList": "错误日志列表" 4 | } 5 | -------------------------------------------------------------------------------- /internal/vite-config/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config/application'; 2 | export * from './config/package'; 3 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/common.ts: -------------------------------------------------------------------------------- 1 | const doc = document.documentElement 2 | doc.dataset.theme = "dark" 3 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/index.ts: -------------------------------------------------------------------------------- 1 | import "./dark/index.less" 2 | import "./light/index.less" 3 | -------------------------------------------------------------------------------- /public/img/icon/div1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/icon/div1.png -------------------------------------------------------------------------------- /public/img/tietu/bg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/bg4.jpg -------------------------------------------------------------------------------- /packages/hooks/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@vben/eslint-config/strict'], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/types/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@vben/eslint-config/strict'], 4 | }; 5 | -------------------------------------------------------------------------------- /public/img/basemaps/osm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/osm.png -------------------------------------------------------------------------------- /public/img/basemaps/sea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/sea.png -------------------------------------------------------------------------------- /public/img/icon/typhoon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/icon/typhoon.gif -------------------------------------------------------------------------------- /public/img/tietu/bagua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/bagua.png -------------------------------------------------------------------------------- /public/img/tietu/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/cloud.png -------------------------------------------------------------------------------- /public/img/tietu/gugong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/gugong.jpg -------------------------------------------------------------------------------- /public/img/tietu/leida.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/leida.jpg -------------------------------------------------------------------------------- /src/assets/images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/assets/images/demo.png -------------------------------------------------------------------------------- /src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/assets/images/logo.png -------------------------------------------------------------------------------- /public/img/basemaps/arcgis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/arcgis.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-img.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-vec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-vec.png -------------------------------------------------------------------------------- /public/img/basemaps/null.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/null.png -------------------------------------------------------------------------------- /public/img/icon/popupLbl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/icon/popupLbl.png -------------------------------------------------------------------------------- /public/img/marker/lace-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/lace-red.png -------------------------------------------------------------------------------- /public/img/marker/mark-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/mark-red.png -------------------------------------------------------------------------------- /public/img/poi/indexMark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/poi/indexMark.png -------------------------------------------------------------------------------- /public/img/textures/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/arrow.png -------------------------------------------------------------------------------- /public/img/textures/colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/colors.png -------------------------------------------------------------------------------- /public/img/textures/fence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/fence.png -------------------------------------------------------------------------------- /public/img/textures/mining.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/mining.jpg -------------------------------------------------------------------------------- /public/img/textures/road.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/road.jpg -------------------------------------------------------------------------------- /public/img/textures/tanhao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/tanhao.png -------------------------------------------------------------------------------- /public/img/tietu/circular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/circular.png -------------------------------------------------------------------------------- /public/img/tietu/hangpai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/hangpai.png -------------------------------------------------------------------------------- /src/assets/images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/assets/images/header.jpg -------------------------------------------------------------------------------- /src/enums/sizeEnum.ts: -------------------------------------------------------------------------------- 1 | export enum SizeEnum { 2 | DEFAULT = 'default', 3 | SMALL = 'small', 4 | LARGE = 'large', 5 | } 6 | -------------------------------------------------------------------------------- /internal/eslint-config/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@vben/eslint-config/strict'], 4 | }; 5 | -------------------------------------------------------------------------------- /internal/vite-config/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@vben/eslint-config/strict'], 4 | }; 5 | -------------------------------------------------------------------------------- /public/img/basemaps/bingmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bingmap.png -------------------------------------------------------------------------------- /public/img/basemaps/offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/offline.png -------------------------------------------------------------------------------- /public/img/basemaps/tdt_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/tdt_img.png -------------------------------------------------------------------------------- /public/img/basemaps/tdt_ter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/tdt_ter.png -------------------------------------------------------------------------------- /public/img/basemaps/tdt_vec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/tdt_vec.png -------------------------------------------------------------------------------- /public/img/marker/lace-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/lace-blue.png -------------------------------------------------------------------------------- /public/img/marker/mark-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/mark-blue.png -------------------------------------------------------------------------------- /public/img/marker/mark-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/mark-green.png -------------------------------------------------------------------------------- /public/img/marker/point-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/point-red.png -------------------------------------------------------------------------------- /public/img/marker/route-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/route-end.png -------------------------------------------------------------------------------- /public/img/textures/arrow-h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/arrow-h.png -------------------------------------------------------------------------------- /public/img/textures/poly-san.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/poly-san.png -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@vben'], 4 | rules: { 5 | 'no-undef': 'off', 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | ports: 2 | - port: 3344 3 | onOpen: open-preview 4 | tasks: 5 | - init: pnpm install 6 | command: pnpm run dev 7 | -------------------------------------------------------------------------------- /internal/stylelint-config/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@vben/eslint-config/strict'], 4 | }; 5 | -------------------------------------------------------------------------------- /public/img/basemaps/TerrainSTK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/TerrainSTK.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-bluish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-bluish.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-dark.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-light.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-pink.png -------------------------------------------------------------------------------- /public/img/basemaps/bingAerial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bingAerial.png -------------------------------------------------------------------------------- /public/img/basemaps/bingRoads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bingRoads.png -------------------------------------------------------------------------------- /public/img/basemaps/bingimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bingimage.png -------------------------------------------------------------------------------- /public/img/basemaps/blackMarble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/blackMarble.png -------------------------------------------------------------------------------- /public/img/basemaps/gaode_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/gaode_img.png -------------------------------------------------------------------------------- /public/img/basemaps/gaode_vec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/gaode_vec.png -------------------------------------------------------------------------------- /public/img/basemaps/google_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/google_img.png -------------------------------------------------------------------------------- /public/img/basemaps/google_ter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/google_ter.png -------------------------------------------------------------------------------- /public/img/basemaps/google_vec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/google_vec.png -------------------------------------------------------------------------------- /public/img/basemaps/stamenToner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/stamenToner.png -------------------------------------------------------------------------------- /public/img/basemaps/tencent_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/tencent_img.png -------------------------------------------------------------------------------- /public/img/basemaps/tencent_vec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/tencent_vec.png -------------------------------------------------------------------------------- /public/img/marker/lace-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/lace-yellow.png -------------------------------------------------------------------------------- /public/img/marker/point-orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/point-orange.png -------------------------------------------------------------------------------- /public/img/marker/point-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/point-yellow.png -------------------------------------------------------------------------------- /public/img/marker/route-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/marker/route-start.png -------------------------------------------------------------------------------- /public/img/textures/arrow-2left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/arrow-2left.png -------------------------------------------------------------------------------- /public/img/textures/arrow-6left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/arrow-6left.png -------------------------------------------------------------------------------- /public/img/textures/buildings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/buildings.png -------------------------------------------------------------------------------- /public/img/textures/circle-scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/circle-scan.png -------------------------------------------------------------------------------- /public/img/textures/circle-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/circle-two.png -------------------------------------------------------------------------------- /public/img/textures/fence-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/fence-line.png -------------------------------------------------------------------------------- /public/img/textures/fence-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/fence-top.png -------------------------------------------------------------------------------- /public/img/textures/line-colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-colour.png -------------------------------------------------------------------------------- /public/img/textures/line-pulse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-pulse.png -------------------------------------------------------------------------------- /public/img/textures/line-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-sprite.png -------------------------------------------------------------------------------- /public/img/textures/line-tarans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-tarans.png -------------------------------------------------------------------------------- /public/img/textures/poly-hexa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/poly-hexa.png -------------------------------------------------------------------------------- /public/img/textures/poly-lake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/poly-lake.jpg -------------------------------------------------------------------------------- /public/img/textures/poly-rivers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/poly-rivers.png -------------------------------------------------------------------------------- /public/img/textures/poly-sand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/poly-sand.jpg -------------------------------------------------------------------------------- /public/img/textures/poly-soil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/poly-soil.jpg -------------------------------------------------------------------------------- /public/img/textures/poly-stone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/poly-stone.jpg -------------------------------------------------------------------------------- /public/img/textures/video-mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/video-mask.png -------------------------------------------------------------------------------- /public/img/tietu/backGroundImg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/tietu/backGroundImg.jpg -------------------------------------------------------------------------------- /internal/vite-config/.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | *.sh 3 | node_modules 4 | *.md 5 | *.woff 6 | *.ttf 7 | .turbo 8 | dist 9 | package.json 10 | -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-hardedge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-hardedge.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-midnight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-midnight.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-redalert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-redalert.png -------------------------------------------------------------------------------- /public/img/basemaps/mapboxStreets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/mapboxStreets.png -------------------------------------------------------------------------------- /public/img/basemaps/mapboxTerrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/mapboxTerrain.png -------------------------------------------------------------------------------- /public/img/textures/line-gradual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-gradual.png -------------------------------------------------------------------------------- /public/img/textures/line-sprite2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-sprite2.png -------------------------------------------------------------------------------- /public/img/textures/waterNormals.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/waterNormals.jpg -------------------------------------------------------------------------------- /src/api/sys/model/uploadModel.ts: -------------------------------------------------------------------------------- 1 | export interface UploadApiResult { 2 | message: string; 3 | code: number; 4 | url: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/enums/roleEnum.ts: -------------------------------------------------------------------------------- 1 | export enum RoleEnum { 2 | // super admin 3 | SUPER = 'super', 4 | 5 | // tester 6 | TEST = 'test', 7 | } 8 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/light/zhts.less: -------------------------------------------------------------------------------- 1 | // 综合态势css变量 2 | :root[data-theme="light"] { 3 | --zhts-title-bg: #008AFF; 4 | } 5 | -------------------------------------------------------------------------------- /internal/eslint-config/.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | *.sh 3 | node_modules 4 | *.md 5 | *.woff 6 | *.ttf 7 | .turbo 8 | dist 9 | package.json 10 | -------------------------------------------------------------------------------- /internal/stylelint-config/.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | *.sh 3 | node_modules 4 | *.md 5 | *.woff 6 | *.ttf 7 | .turbo 8 | dist 9 | package.json 10 | -------------------------------------------------------------------------------- /public/img/basemaps/TerrainEllipsoid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/TerrainEllipsoid.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-darkgreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-darkgreen.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-googlelite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-googlelite.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-grassgreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-grassgreen.png -------------------------------------------------------------------------------- /public/img/basemaps/bd-c-grayscale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bd-c-grayscale.png -------------------------------------------------------------------------------- /public/img/basemaps/bingAerialLabels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/bingAerialLabels.png -------------------------------------------------------------------------------- /public/img/basemaps/esriWorldImagery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/esriWorldImagery.png -------------------------------------------------------------------------------- /public/img/basemaps/mapboxSatellite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/mapboxSatellite.png -------------------------------------------------------------------------------- /public/img/basemaps/naturalEarthII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/naturalEarthII.png -------------------------------------------------------------------------------- /public/img/basemaps/stamenWatercolor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/stamenWatercolor.png -------------------------------------------------------------------------------- /public/img/textures/line-arrow-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-arrow-blue.png -------------------------------------------------------------------------------- /public/img/textures/line-arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-arrow-right.png -------------------------------------------------------------------------------- /public/img/textures/line-arrow-trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-arrow-trans.png -------------------------------------------------------------------------------- /public/img/textures/line-color-aqua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-color-aqua.png -------------------------------------------------------------------------------- /public/img/textures/line-color-azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-color-azure.png -------------------------------------------------------------------------------- /public/img/textures/line-color-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-color-red.png -------------------------------------------------------------------------------- /public/img/textures/line-vertebral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-vertebral.png -------------------------------------------------------------------------------- /public/img/basemaps/esriWorldStreetMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/esriWorldStreetMap.png -------------------------------------------------------------------------------- /public/img/textures/line-color-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-color-yellow.png -------------------------------------------------------------------------------- /src/components/CodeEditor/src/typing.ts: -------------------------------------------------------------------------------- 1 | export enum MODE { 2 | JSON = 'application/json', 3 | HTML = 'htmlmixed', 4 | JS = 'javascript', 5 | } 6 | -------------------------------------------------------------------------------- /src/components/Preview/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ImagePreview } from './src/Preview.vue'; 2 | export { createImgPreview } from './src/functional'; 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | .local 3 | .output.js 4 | node_modules 5 | 6 | **/*.svg 7 | **/*.sh 8 | 9 | public 10 | .npmrc 11 | 12 | *-lock.yaml 13 | -------------------------------------------------------------------------------- /public/img/basemaps/mapQuestOpenStreetMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/mapQuestOpenStreetMap.png -------------------------------------------------------------------------------- /public/img/textures/line-arrow-dovetail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/textures/line-arrow-dovetail.png -------------------------------------------------------------------------------- /src/components/Markdown/src/typing.ts: -------------------------------------------------------------------------------- 1 | import Vditor from 'vditor'; 2 | 3 | export interface MarkDownActionType { 4 | getVditor: () => Vditor; 5 | } 6 | -------------------------------------------------------------------------------- /src/components/Time/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import time from './src/Time.vue'; 3 | 4 | export const Time = withInstall(time); 5 | -------------------------------------------------------------------------------- /public/img/basemaps/esriNationalGeographic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/img/basemaps/esriNationalGeographic.png -------------------------------------------------------------------------------- /src/components/ContextMenu/index.ts: -------------------------------------------------------------------------------- 1 | export { createContextMenu, destroyContextMenu } from './src/createContextMenu'; 2 | 3 | export * from './src/typing'; 4 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/const.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description: 传给vxe-table 时需要忽略的prop 3 | */ 4 | export const ignorePropKeys = ['tableClass', 'tableStyle']; 5 | -------------------------------------------------------------------------------- /src/locales/lang/zh-CN/routes/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboard": "Dashboard", 3 | "about": "关于", 4 | "workbench": "工作台", 5 | "analysis": "分析页" 6 | } 7 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/isFunction.ts: -------------------------------------------------------------------------------- 1 | export const isFunction = (value: unknown): value is (...args: any) => any => 2 | typeof value === 'function'; 3 | -------------------------------------------------------------------------------- /src/components/Icon/index.ts: -------------------------------------------------------------------------------- 1 | import SvgIcon from './src/SvgIcon.vue'; 2 | import IconPicker from './src/IconPicker.vue'; 3 | 4 | export { IconPicker, SvgIcon }; 5 | -------------------------------------------------------------------------------- /src/components/SimpleMenu/src/types.ts: -------------------------------------------------------------------------------- 1 | export interface MenuState { 2 | activeName: string; 3 | openNames: string[]; 4 | activeSubMenuNames: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/css/index.scss: -------------------------------------------------------------------------------- 1 | @use './common'; 2 | @use './variable'; 3 | @use './toolbar'; 4 | @use './component'; 5 | @use 'vxe-table/styles/index'; 6 | -------------------------------------------------------------------------------- /packages/hooks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/ts-config/vue-app.json", 4 | "include": ["src"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/ts-config/vue-app.json", 4 | "include": ["src"] 5 | } 6 | -------------------------------------------------------------------------------- /src/components/CountTo/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import countTo from './src/CountTo.vue'; 3 | 4 | export const CountTo = withInstall(countTo); 5 | -------------------------------------------------------------------------------- /src/components/Tinymce/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import tinymce from './src/Editor.vue'; 3 | 4 | export const Tinymce = withInstall(tinymce); 5 | -------------------------------------------------------------------------------- /src/locales/lang/en/routes/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboard": "Dashboard", 3 | "about": "About", 4 | "workbench": "Workbench", 5 | "analysis": "Analysis" 6 | } 7 | -------------------------------------------------------------------------------- /src/views/sys/iframe/FrameBlank.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /types/utils.d.ts: -------------------------------------------------------------------------------- 1 | import type { ComputedRef, Ref } from 'vue'; 2 | 3 | export type DynamicProps = { 4 | [P in keyof T]: Ref | T[P] | ComputedRef; 5 | }; 6 | -------------------------------------------------------------------------------- /internal/eslint-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/ts-config/node.json", 4 | "include": ["src"] 5 | } 6 | -------------------------------------------------------------------------------- /internal/vite-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/ts-config/node.json", 4 | "include": ["src"] 5 | } 6 | -------------------------------------------------------------------------------- /src/components/CardList/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import cardList from './src/CardList.vue'; 3 | 4 | export const CardList = withInstall(cardList); 5 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/logo.png -------------------------------------------------------------------------------- /src/marsgis/widgets/basic/manage-layers/img/guihua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/widgets/basic/manage-layers/img/guihua.jpg -------------------------------------------------------------------------------- /src/marsgis/widgets/basic/manage-layers/img/heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/widgets/basic/manage-layers/img/heatmap.png -------------------------------------------------------------------------------- /internal/stylelint-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/ts-config/node.json", 4 | "include": ["src"] 5 | } 6 | -------------------------------------------------------------------------------- /src/components/Authority/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import authority from './src/Authority.vue'; 3 | 4 | export const Authority = withInstall(authority); 5 | -------------------------------------------------------------------------------- /src/components/FlowChart/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import flowChart from './src/FlowChart.vue'; 3 | 4 | export const FlowChart = withInstall(flowChart); 5 | -------------------------------------------------------------------------------- /src/components/Qrcode/src/qrcodePlus.ts: -------------------------------------------------------------------------------- 1 | // 参考 qr-code-with-logo 进行ts版本修改 2 | import { toCanvas } from './toCanvas'; 3 | 4 | export * from './typing'; 5 | export { toCanvas }; 6 | -------------------------------------------------------------------------------- /uno.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, presetTypography, presetUno } from 'unocss'; 2 | 3 | export default defineConfig({ 4 | presets: [presetUno(), presetTypography()], 5 | }); 6 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/isBrowser.ts: -------------------------------------------------------------------------------- 1 | export const isBrowser = !!( 2 | typeof window !== 'undefined' && 3 | window.document && 4 | window.document.createElement 5 | ); 6 | -------------------------------------------------------------------------------- /src/components/Form/src/types/hooks.ts: -------------------------------------------------------------------------------- 1 | export interface AdvanceState { 2 | isAdvanced: boolean; 3 | hideAdvanceBtn: boolean; 4 | isLoad: boolean; 5 | actionSpan: number; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/VirtualScroll/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import vScroll from './src/VirtualScroll.vue'; 3 | 4 | export const VScroll = withInstall(vScroll); 5 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/tab-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/tab-title.png -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/ACheckboxGroup.tsx: -------------------------------------------------------------------------------- 1 | import { createFormItemRender } from './common'; 2 | 3 | export default { 4 | renderItemContent: createFormItemRender(), 5 | }; 6 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/ARadioGroup.tsx: -------------------------------------------------------------------------------- 1 | import { createFormItemRender } from './common'; 2 | 3 | export default { 4 | renderItemContent: createFormItemRender(), 5 | }; 6 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/css/common.scss: -------------------------------------------------------------------------------- 1 | *, 2 | ::before, 3 | ::after { 4 | box-sizing: border-box; 5 | border-width: 0; 6 | border-style: solid; 7 | border-color: initial; 8 | } 9 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/setting.ts: -------------------------------------------------------------------------------- 1 | import { VXETable } from '..'; 2 | import componentSetting from '@/settings/componentSetting'; 3 | 4 | VXETable.setup(componentSetting.vxeTable); 5 | -------------------------------------------------------------------------------- /apps/test-server/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": ["src"], 3 | "ext": "ts", 4 | "exec": "ts-node -r tsconfig-paths/register index.ts", 5 | "events": { 6 | "restart": "clear" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /public/resource/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/public/resource/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /src/api/demo/model/accountModel.ts: -------------------------------------------------------------------------------- 1 | export interface GetAccountInfoModel { 2 | email: string; 3 | name: string; 4 | introduction: string; 5 | phone: string; 6 | address: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/ClickOutSide/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import clickOutSide from './src/ClickOutSide.vue'; 3 | 4 | export const ClickOutSide = withInstall(clickOutSide); 5 | -------------------------------------------------------------------------------- /src/components/EllipsisText/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import ellipsisText from './src/EllipsisText.vue'; 3 | 4 | export const EllipsisText = withInstall(ellipsisText); 5 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/header-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/header-bg.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/pannel-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/pannel-bg.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/tab-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/tab-title.png -------------------------------------------------------------------------------- /src/components/Qrcode/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import qrCode from './src/Qrcode.vue'; 3 | 4 | export const QrCode = withInstall(qrCode); 5 | export * from './src/typing'; 6 | -------------------------------------------------------------------------------- /src/components/StrengthMeter/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import strengthMeter from './src/StrengthMeter.vue'; 3 | 4 | export const StrengthMeter = withInstall(strengthMeter); 5 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/border-image-base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/border-image-base.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/zhyq/search-order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/zhyq/search-order.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/menu-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/menu-hover.png -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | *.sh 3 | node_modules 4 | *.md 5 | *.woff 6 | *.ttf 7 | .vscode 8 | .idea 9 | dist 10 | /public 11 | /docs 12 | .husky 13 | .local 14 | /bin 15 | Dockerfile 16 | package.json 17 | -------------------------------------------------------------------------------- /apps/test-server/utils.ts: -------------------------------------------------------------------------------- 1 | export class Result { 2 | static success(data: any) { 3 | return { 4 | code: 0, 5 | success: true, 6 | result: data, 7 | }; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/login/login-bg-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/login/login-bg-color.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/login/login-bg-earth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/login/login-bg-earth.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/login/login-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/login/login-title-bg.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/query-site-text_num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/query-site-text_num.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/zhyq/datails-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/zhyq/datails-title-bg.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/dialog-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/dialog-title.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/heade-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/heade-title-bg.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/msg-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/msg-title-bg.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/sub-menu-emb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/sub-menu-emb.png -------------------------------------------------------------------------------- /src/components/Dropdown/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import dropdown from './src/Dropdown.vue'; 3 | 4 | export * from './src/typing'; 5 | export const Dropdown = withInstall(dropdown); 6 | -------------------------------------------------------------------------------- /src/components/Loading/index.ts: -------------------------------------------------------------------------------- 1 | import Loading from './src/Loading.vue'; 2 | 3 | export { Loading }; 4 | export { useLoading } from './src/useLoading'; 5 | export { createLoading } from './src/createLoading'; 6 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/login/login-content-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/login/login-content-bg.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/login/login-title-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/login/login-title-logo.png -------------------------------------------------------------------------------- /src/api/model/baseModel.ts: -------------------------------------------------------------------------------- 1 | export interface BasicPageParams { 2 | page: number; 3 | pageSize: number; 4 | } 5 | 6 | export interface BasicFetchResult { 7 | items: T[]; 8 | total: number; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/Cropper/src/typing.ts: -------------------------------------------------------------------------------- 1 | import type Cropper from 'cropperjs'; 2 | 3 | export interface CropendResult { 4 | imgBase64: string; 5 | imgInfo: Cropper.Data; 6 | } 7 | 8 | export type { Cropper }; 9 | -------------------------------------------------------------------------------- /src/components/Scrollbar/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * copy from element-ui 3 | */ 4 | 5 | import Scrollbar from './src/Scrollbar.vue'; 6 | 7 | export { Scrollbar }; 8 | export type { ScrollbarType } from './src/types'; 9 | -------------------------------------------------------------------------------- /src/design/ant/popconfirm.less: -------------------------------------------------------------------------------- 1 | // 修复气泡确认框内的按钮在内容宽度不够换行的情况 2 | // 初始问题发现在 2.10.1 版本 固定列页面 http://ip:port/#/comp/table/fixedColumn 3 | .ant-popconfirm { 4 | &-buttons { 5 | white-space: nowrap; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/login/login-content-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/login/login-content-footer.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/assets/images/zhyq/echarts-title-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/assets/images/zhyq/echarts-title-bottom.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/border-image-base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/border-image-base.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/dialog-title-slice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/dialog-title-slice.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/sub-menu-emb-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/sub-menu-emb-light.png -------------------------------------------------------------------------------- /apps/test-server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/ts-config/node-server.json", 4 | "compilerOptions": { 5 | "noImplicitAny": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/assets/images/selet-dropdown-border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marsgis/mars3d-vue-project-admin/HEAD/src/marsgis/components/mars-ui/themes/assets/images/selet-dropdown-border.png -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/themes/dark/zhts.less: -------------------------------------------------------------------------------- 1 | // 综合态势css变量 2 | :root[data-theme="dark"] { 3 | --zhts-title-bg: url("../assets/images/header-bg.png"); 4 | --zhts-title-img: url("../assets/images/heade-title-bg.png"); 5 | } 6 | -------------------------------------------------------------------------------- /src/components/Tree/index.ts: -------------------------------------------------------------------------------- 1 | import BasicTree from './src/BasicTree.vue'; 2 | import './style'; 3 | 4 | export { BasicTree }; 5 | export type { ContextMenuItem } from '@/hooks/web/useContextMenu'; 6 | export * from './src/types/tree'; 7 | -------------------------------------------------------------------------------- /src/views/form-design/typings/base-type.ts: -------------------------------------------------------------------------------- 1 | export interface IAnyObject { 2 | [key: string]: T; 3 | } 4 | 5 | export interface IInputEvent { 6 | target: { 7 | value: any; 8 | checked: boolean; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/Dropdown/src/typing.ts: -------------------------------------------------------------------------------- 1 | export interface DropMenu { 2 | onClick?: Fn; 3 | to?: string; 4 | icon?: string; 5 | event: string | number; 6 | text: string; 7 | disabled?: boolean; 8 | divider?: boolean; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/types.ts: -------------------------------------------------------------------------------- 1 | import { CSSProperties } from 'vue'; 2 | import { VxeGridProps } from 'vxe-table'; 3 | 4 | export type BasicTableProps = VxeGridProps & { 5 | tableClass?: string; 6 | tableStyle?: CSSProperties; 7 | }; 8 | -------------------------------------------------------------------------------- /src/views/demo/level/Menu12.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /src/views/demo/level/Menu2.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /src/views/demo/level/Menu111.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /packages/hooks/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | entries: ['src/index'], 6 | declaration: true, 7 | rollup: { 8 | emitCJS: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/isDocumentVisible.ts: -------------------------------------------------------------------------------- 1 | import { isBrowser } from './isBrowser'; 2 | 3 | export function isDocumentVisible(): boolean { 4 | if (isBrowser) { 5 | return document.visibilityState !== 'hidden'; 6 | } 7 | return true; 8 | } 9 | -------------------------------------------------------------------------------- /packages/types/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | entries: ['src/index'], 6 | declaration: true, 7 | rollup: { 8 | emitCJS: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /src/marsgis/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": false, 3 | "eslintIntegration": true, 4 | "singleQuote": false, 5 | "semi": false, 6 | "trailingComma": "none", 7 | "bracketSpacing": true, 8 | "printWidth": 150, 9 | "arrowParens": "always" 10 | } 11 | -------------------------------------------------------------------------------- /src/views/demo/comp/drawer/Drawer1.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /src/views/demo/feat/breadcrumb/ChildrenListDetail.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /internal/vite-config/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | entries: ['src/index'], 6 | declaration: true, 7 | rollup: { 8 | emitCJS: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/isOnline.ts: -------------------------------------------------------------------------------- 1 | import { isBrowser } from './isBrowser'; 2 | 3 | export function isOnline(): boolean { 4 | if (isBrowser && typeof navigator.onLine !== 'undefined') { 5 | return navigator.onLine; 6 | } 7 | return true; 8 | } 9 | -------------------------------------------------------------------------------- /internal/stylelint-config/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | entries: ['src/index'], 6 | declaration: true, 7 | rollup: { 8 | emitCJS: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | public-hoist-pattern[]=husky 2 | public-hoist-pattern[]=*eslint* 3 | public-hoist-pattern[]=*prettier* 4 | public-hoist-pattern[]=lint-staged 5 | public-hoist-pattern[]=*stylelint* 6 | public-hoist-pattern[]=@commitlint/cli 7 | public-hoist-pattern[]=@vben/eslint-config 8 | -------------------------------------------------------------------------------- /internal/eslint-config/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | entries: ['src/index', 'src/strict'], 6 | declaration: true, 7 | rollup: { 8 | emitCJS: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /src/components/Description/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import description from './src/Description.vue'; 3 | 4 | export * from './src/typing'; 5 | export { useDescription } from './src/useDescription'; 6 | export const Description = withInstall(description); 7 | -------------------------------------------------------------------------------- /src/components/Drawer/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import basicDrawer from './src/BasicDrawer.vue'; 3 | 4 | export const BasicDrawer = withInstall(basicDrawer); 5 | export * from './src/typing'; 6 | export { useDrawer, useDrawerInner } from './src/useDrawer'; 7 | -------------------------------------------------------------------------------- /src/components/FlowChart/src/enum.ts: -------------------------------------------------------------------------------- 1 | export enum ToolbarTypeEnum { 2 | ZOOM_IN = 'zoomIn', 3 | ZOOM_OUT = 'zoomOut', 4 | RESET_ZOOM = 'resetZoom', 5 | 6 | UNDO = 'undo', 7 | REDO = 'redo', 8 | 9 | SNAPSHOT = 'snapshot', 10 | VIEW_DATA = 'viewData', 11 | } 12 | -------------------------------------------------------------------------------- /src/logics/theme/updateGrayMode.ts: -------------------------------------------------------------------------------- 1 | import { toggleClass } from './util'; 2 | 3 | /** 4 | * Change project gray mode status 5 | * @param gray 6 | */ 7 | export function updateGrayMode(gray: boolean) { 8 | toggleClass(gray, 'gray-mode', document.documentElement); 9 | } 10 | -------------------------------------------------------------------------------- /src/settings/siteSetting.ts: -------------------------------------------------------------------------------- 1 | // github repo url 2 | export const GITHUB_URL = 'https://github.com/anncwb/vue-vben-admin'; 3 | 4 | // vue-vben-admin-next-doc 5 | export const DOC_URL = 'https://doc.vvbin.cn/'; 6 | 7 | // site url 8 | export const SITE_URL = 'https://vben.vvbin.cn/'; 9 | -------------------------------------------------------------------------------- /packages/hooks/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './onMountedOrActivated'; 2 | export * from './useAttrs'; 3 | export * from './useRefs'; 4 | export * from './useRequest'; 5 | export * from './useScrollTo'; 6 | export * from './useWindowSizeFn'; 7 | export { useTimeoutFn } from '@vueuse/core'; 8 | -------------------------------------------------------------------------------- /src/components/Loading/src/typing.ts: -------------------------------------------------------------------------------- 1 | import { SizeEnum } from '@/enums/sizeEnum'; 2 | 3 | export interface LoadingProps { 4 | tip: string; 5 | size: SizeEnum; 6 | absolute: boolean; 7 | loading: boolean; 8 | background: string; 9 | theme: 'dark' | 'light'; 10 | } 11 | -------------------------------------------------------------------------------- /src/views/demo/main-out/index.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/components/Page/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | 3 | import pageFooter from './src/PageFooter.vue'; 4 | import pageWrapper from './src/PageWrapper.vue'; 5 | 6 | export const PageFooter = withInstall(pageFooter); 7 | export const PageWrapper = withInstall(pageWrapper); 8 | -------------------------------------------------------------------------------- /apps/test-server/README.md: -------------------------------------------------------------------------------- 1 | # Test Server 2 | 3 | It is used to start the test interface service, which can test the upload, websocket, login and other interfaces. 4 | 5 | ## Usage 6 | 7 | ```bash 8 | 9 | cd ./test/server 10 | 11 | pnpm install 12 | 13 | pnpm run start 14 | 15 | ``` 16 | -------------------------------------------------------------------------------- /src/api/demo/model/areaModel.ts: -------------------------------------------------------------------------------- 1 | export interface AreaModel { 2 | id: string; 3 | code: string; 4 | parentCode: string; 5 | name: string; 6 | levelType: number; 7 | [key: string]: string | number; 8 | } 9 | 10 | export interface AreaParams { 11 | parentCode: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/api/demo/error.ts: -------------------------------------------------------------------------------- 1 | import { defHttp } from '@/utils/http/axios'; 2 | 3 | enum Api { 4 | // The address does not exist 5 | Error = '/error', 6 | } 7 | 8 | /** 9 | * @description: Trigger ajax error 10 | */ 11 | 12 | export const fireErrorApi = () => defHttp.get({ url: Api.Error }); 13 | -------------------------------------------------------------------------------- /internal/ts-config/vue-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Vue Application", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "preserve", 7 | "lib": ["ESNext", "DOM"], 8 | "noImplicitAny": false 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/components/CountDown/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import countButton from './src/CountButton.vue'; 3 | import countdownInput from './src/CountdownInput.vue'; 4 | 5 | export const CountdownInput = withInstall(countdownInput); 6 | export const CountButton = withInstall(countButton); 7 | -------------------------------------------------------------------------------- /src/components/Upload/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import basicUpload from './src/BasicUpload.vue'; 3 | import uploadImage from './src/components/ImageUpload.vue'; 4 | 5 | export const ImageUpload = withInstall(uploadImage); 6 | export const BasicUpload = withInstall(basicUpload); 7 | -------------------------------------------------------------------------------- /src/utils/log.ts: -------------------------------------------------------------------------------- 1 | const projectName = import.meta.env.VITE_GLOB_APP_TITLE; 2 | 3 | export function warn(message: string) { 4 | console.warn(`[${projectName} warn]:${message}`); 5 | } 6 | 7 | export function error(message: string) { 8 | throw new Error(`[${projectName} error]:${message}`); 9 | } 10 | -------------------------------------------------------------------------------- /src/components/registerGlobComp.ts: -------------------------------------------------------------------------------- 1 | import type { App } from 'vue'; 2 | import { Button } from './Button'; 3 | import { Input, Layout } from 'ant-design-vue'; 4 | import VXETable from 'vxe-table'; 5 | 6 | export function registerGlobComp(app: App) { 7 | app.use(Input).use(Button).use(Layout).use(VXETable); 8 | } 9 | -------------------------------------------------------------------------------- /src/logics/theme/updateColorWeak.ts: -------------------------------------------------------------------------------- 1 | import { toggleClass } from './util'; 2 | 3 | /** 4 | * Change the status of the project's color weakness mode 5 | * @param colorWeak 6 | */ 7 | export function updateColorWeak(colorWeak: boolean) { 8 | toggleClass(colorWeak, 'color-weak', document.documentElement); 9 | } 10 | -------------------------------------------------------------------------------- /src/views/demo/feat/breadcrumb/FlatList.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | # Whether to open mock 2 | VITE_USE_MOCK = true 3 | 4 | # public path 5 | VITE_PUBLIC_PATH = / 6 | 7 | # Basic interface address SPA 8 | VITE_GLOB_API_URL=/basic-api 9 | 10 | # File upload address, optional 11 | VITE_GLOB_UPLOAD_URL=/upload 12 | 13 | # Interface prefix 14 | VITE_GLOB_API_URL_PREFIX= 15 | -------------------------------------------------------------------------------- /src/components/Application/src/search/AppSearchKeyItem.vue: -------------------------------------------------------------------------------- 1 | 6 | 13 | -------------------------------------------------------------------------------- /src/components/Markdown/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import markDown from './src/Markdown.vue'; 3 | import markDownViewer from './src/MarkdownViewer.vue'; 4 | 5 | export const MarkDown = withInstall(markDown); 6 | export const MarkdownViewer = withInstall(markDownViewer); 7 | export * from './src/typing'; 8 | -------------------------------------------------------------------------------- /src/hooks/web/useAppInject.ts: -------------------------------------------------------------------------------- 1 | import { useAppProviderContext } from '@/components/Application'; 2 | import { computed, unref } from 'vue'; 3 | 4 | export function useAppInject() { 5 | const values = useAppProviderContext(); 6 | 7 | return { 8 | getIsMobile: computed(() => unref(values.isMobile)), 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /internal/ts-config/node.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Node Config", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "lib": ["ESNext"], 7 | "noImplicitAny": true, 8 | "sourceMap": true, 9 | "noEmit": true, 10 | "baseUrl": "./" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/components/Cropper/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import cropperImage from './src/Cropper.vue'; 3 | import avatarCropper from './src/CropperAvatar.vue'; 4 | 5 | export * from './src/typing'; 6 | export const CropperImage = withInstall(cropperImage); 7 | export const CropperAvatar = withInstall(avatarCropper); 8 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/limit.ts: -------------------------------------------------------------------------------- 1 | export function limit(fn: any, timespan: number) { 2 | let pending = false; 3 | 4 | return (...args: any[]) => { 5 | if (pending) return; 6 | pending = true; 7 | fn(...args); 8 | setTimeout(() => { 9 | pending = false; 10 | }, timespan); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /src/components/Verify/src/typing.ts: -------------------------------------------------------------------------------- 1 | export interface DragVerifyActionType { 2 | resume: () => void; 3 | } 4 | 5 | export interface PassingData { 6 | isPassing: boolean; 7 | time: number; 8 | } 9 | 10 | export interface MoveData { 11 | event: MouseEvent | TouchEvent; 12 | moveDistance: number; 13 | moveX: number; 14 | } 15 | -------------------------------------------------------------------------------- /src/api/demo/cascader.ts: -------------------------------------------------------------------------------- 1 | import { defHttp } from '@/utils/http/axios'; 2 | import { AreaModel, AreaParams } from '@/api/demo/model/areaModel'; 3 | 4 | enum Api { 5 | AREA_RECORD = '/cascader/getAreaRecord', 6 | } 7 | 8 | export const areaRecord = (data: AreaParams) => 9 | defHttp.post({ url: Api.AREA_RECORD, data }); 10 | -------------------------------------------------------------------------------- /src/components/CodeEditor/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import codeEditor from './src/CodeEditor.vue'; 3 | import jsonPreview from './src/json-preview/JsonPreview.vue'; 4 | 5 | export const CodeEditor = withInstall(codeEditor); 6 | export const JsonPreview = withInstall(jsonPreview); 7 | 8 | export * from './src/typing'; 9 | -------------------------------------------------------------------------------- /src/views/demo/feat/breadcrumb/ChildrenList.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /src/components/Verify/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import basicDragVerify from './src/DragVerify.vue'; 3 | import rotateDragVerify from './src/ImgRotate.vue'; 4 | 5 | export const BasicDragVerify = withInstall(basicDragVerify); 6 | export const RotateDragVerify = withInstall(rotateDragVerify); 7 | export * from './src/typing'; 8 | -------------------------------------------------------------------------------- /src/views/demo/comp/modal/Modal3.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /src/api/demo/tree.ts: -------------------------------------------------------------------------------- 1 | import { defHttp } from '@/utils/http/axios'; 2 | 3 | enum Api { 4 | TREE_OPTIONS_LIST = '/tree/getDemoOptions', 5 | } 6 | 7 | /** 8 | * @description: Get sample options value 9 | */ 10 | export const treeOptionsListApi = (params?: Recordable) => 11 | defHttp.get({ url: Api.TREE_OPTIONS_LIST, params }); 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset=utf-8 5 | end_of_line=lf 6 | insert_final_newline=true 7 | indent_style=space 8 | indent_size=2 9 | max_line_length = 100 10 | 11 | [*.{yml,yaml,json}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | 18 | [Makefile] 19 | indent_style = tab 20 | -------------------------------------------------------------------------------- /src/components/Table/src/types/componentType.ts: -------------------------------------------------------------------------------- 1 | export type ComponentType = 2 | | 'Input' 3 | | 'InputNumber' 4 | | 'Select' 5 | | 'ApiSelect' 6 | | 'AutoComplete' 7 | | 'ApiTreeSelect' 8 | | 'Checkbox' 9 | | 'Switch' 10 | | 'DatePicker' 11 | | 'TimePicker' 12 | | 'RadioGroup' 13 | | 'RadioButtonGroup' 14 | | 'ApiRadioGroup'; 15 | -------------------------------------------------------------------------------- /src/store/index.ts: -------------------------------------------------------------------------------- 1 | import type { App } from 'vue'; 2 | import { createPinia } from 'pinia'; 3 | import { registerPiniaPersistPlugin } from '@/store/plugin/persist'; 4 | 5 | const store = createPinia(); 6 | registerPiniaPersistPlugin(store); 7 | 8 | export function setupStore(app: App) { 9 | app.use(store); 10 | } 11 | 12 | export { store }; 13 | -------------------------------------------------------------------------------- /src/views/demo/comp/drawer/Drawer5.vue: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /src/enums/pageEnum.ts: -------------------------------------------------------------------------------- 1 | export enum PageEnum { 2 | // basic login path 3 | BASE_LOGIN = '/login', 4 | // basic home path 5 | BASE_HOME = '/dashboard', 6 | // error page path 7 | ERROR_PAGE = '/exception', 8 | // error log page path 9 | ERROR_LOG_PAGE = '/error-log/list', 10 | } 11 | export const PageWrapperFixedHeightKey = 'PageWrapperFixedHeight'; 12 | -------------------------------------------------------------------------------- /src/components/Menu/src/types.ts: -------------------------------------------------------------------------------- 1 | export type Key = string | number; 2 | export interface MenuState { 3 | // 默认选中的列表 4 | defaultSelectedKeys: Key[]; 5 | 6 | // 缩进 7 | inlineIndent?: number; 8 | 9 | // 展开数组 10 | openKeys: Key[]; 11 | 12 | // 当前选中的菜单项 key 数组 13 | selectedKeys: Key[]; 14 | 15 | // 收缩状态下展开的数组 16 | collapsedOpenKeys: Key[]; 17 | } 18 | -------------------------------------------------------------------------------- /src/components/Modal/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import './src/index.less'; 3 | import basicModal from './src/BasicModal.vue'; 4 | 5 | export const BasicModal = withInstall(basicModal); 6 | export { useModalContext } from './src/hooks/useModalContext'; 7 | export { useModal, useModalInner } from './src/hooks/useModal'; 8 | export * from './src/typing'; 9 | -------------------------------------------------------------------------------- /src/design/transition/index.less: -------------------------------------------------------------------------------- 1 | @import './base.less'; 2 | @import './fade.less'; 3 | @import './scale.less'; 4 | @import './slide.less'; 5 | @import './scroll.less'; 6 | @import './zoom.less'; 7 | 8 | .collapse-transition { 9 | transition: 10 | 0.2s height ease-in-out, 11 | 0.2s padding-top ease-in-out, 12 | 0.2s padding-bottom ease-in-out; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/CodeEditor/src/json-preview/JsonPreview.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/components/Basic/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import basicArrow from './src/BasicArrow.vue'; 3 | import basicTitle from './src/BasicTitle.vue'; 4 | import basicHelp from './src/BasicHelp.vue'; 5 | 6 | export const BasicArrow = withInstall(basicArrow); 7 | export const BasicTitle = withInstall(basicTitle); 8 | export const BasicHelp = withInstall(basicHelp); 9 | -------------------------------------------------------------------------------- /src/components/Container/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import collapseContainer from './src/collapse/CollapseContainer.vue'; 3 | import scrollContainer from './src/ScrollContainer.vue'; 4 | 5 | export const CollapseContainer = withInstall(collapseContainer); 6 | export const ScrollContainer = withInstall(scrollContainer); 7 | 8 | export * from './src/typing'; 9 | -------------------------------------------------------------------------------- /src/views/form-design/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/locales/lang/zh-CN/antdLocale/DatePicker.json: -------------------------------------------------------------------------------- 1 | { 2 | "lang": { 3 | "shortWeekDays": ["日", "一", "二", "三", "四", "五", "六"], 4 | "shortMonths": [ 5 | "1月", 6 | "2月", 7 | "3月", 8 | "4月", 9 | "5月", 10 | "6月", 11 | "7月", 12 | "8月", 13 | "9月", 14 | "10月", 15 | "11月", 16 | "12月" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turborepo.org/schema.json", 3 | "pipeline": { 4 | "build": { 5 | "dependsOn": ["^build"], 6 | "outputs": ["dist/**"] 7 | }, 8 | "stub": {}, 9 | "lint": {}, 10 | "clean": { 11 | "cache": false 12 | }, 13 | "dev": { 14 | "cache": false, 15 | "persistent": true 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/design/transition/base.less: -------------------------------------------------------------------------------- 1 | .transition-default() { 2 | &-enter-active, 3 | &-leave-active { 4 | transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1) !important; 5 | } 6 | 7 | &-move { 8 | transition: transform 0.4s; 9 | } 10 | } 11 | 12 | .expand-transition { 13 | .transition-default(); 14 | } 15 | 16 | .expand-x-transition { 17 | .transition-default(); 18 | } 19 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/mars-message/message.less: -------------------------------------------------------------------------------- 1 | /*提示*/ 2 | .mars-message { 3 | .ant-message-notice-content { 4 | background: none; 5 | color: var(--mars-text-color); 6 | padding: 15px 20px; 7 | .mars-msg-bg(); 8 | .ant-message-info span{ 9 | font-size: 16px; 10 | } 11 | .mars-icon { 12 | margin-right: 10px; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/api/sys/menu.ts: -------------------------------------------------------------------------------- 1 | import { defHttp } from '@/utils/http/axios'; 2 | import { getMenuListResultModel } from './model/menuModel'; 3 | 4 | enum Api { 5 | GetMenuList = '/getMenuList', 6 | } 7 | 8 | /** 9 | * @description: Get user menu based on id 10 | */ 11 | 12 | export const getMenuList = () => { 13 | return defHttp.get({ url: Api.GetMenuList }); 14 | }; 15 | -------------------------------------------------------------------------------- /src/components/Excel/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import impExcel from './src/ImportExcel.vue'; 3 | import expExcelModal from './src/ExportExcelModal.vue'; 4 | 5 | export const ImpExcel = withInstall(impExcel); 6 | export const ExpExcelModal = withInstall(expExcelModal); 7 | export * from './src/typing'; 8 | export { jsonToSheetXlsx, aoaToSheetXlsx } from './src/Export2Excel'; 9 | -------------------------------------------------------------------------------- /src/components/Qrcode/src/toCanvas.ts: -------------------------------------------------------------------------------- 1 | import { renderQrCode } from './drawCanvas'; 2 | import { drawLogo } from './drawLogo'; 3 | import { RenderQrCodeParams } from './typing'; 4 | 5 | export const toCanvas = (options: RenderQrCodeParams) => { 6 | return renderQrCode(options) 7 | .then(() => { 8 | return options; 9 | }) 10 | .then(drawLogo) as Promise; 11 | }; 12 | -------------------------------------------------------------------------------- /src/views/demo/page/list/card/data.tsx: -------------------------------------------------------------------------------- 1 | export const cardList = (() => { 2 | const result: any[] = []; 3 | for (let i = 0; i < 12; i++) { 4 | result.push({ 5 | title: 'Vben Admin', 6 | icon: 'logos:vue', 7 | color: '#1890ff', 8 | active: '100', 9 | new: '1,799', 10 | download: 'bx:bx-download', 11 | }); 12 | } 13 | return result; 14 | })(); 15 | -------------------------------------------------------------------------------- /src/views/dashboard/analysis/components/props.ts: -------------------------------------------------------------------------------- 1 | import { PropType } from 'vue'; 2 | 3 | export interface BasicProps { 4 | width: string; 5 | height: string; 6 | } 7 | export const basicProps = { 8 | width: { 9 | type: String as PropType, 10 | default: '100%', 11 | }, 12 | height: { 13 | type: String as PropType, 14 | default: '280px', 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /src/locales/lang/en.ts: -------------------------------------------------------------------------------- 1 | import { genMessage } from '../helper'; 2 | import antdLocale from 'ant-design-vue/es/locale/en_US'; 3 | 4 | const modules = import.meta.glob('./en/**/*.{json,ts,js}', { eager: true }); 5 | export default { 6 | message: { 7 | ...genMessage(modules as Recordable, 'en'), 8 | antdLocale, 9 | }, 10 | dateLocale: null, 11 | dateLocaleName: 'en', 12 | }; 13 | -------------------------------------------------------------------------------- /src/api/demo/model/optionsModel.ts: -------------------------------------------------------------------------------- 1 | import { BasicFetchResult } from '@/api/model/baseModel'; 2 | 3 | export interface DemoOptionsItem { 4 | name: string; 5 | id: string; 6 | } 7 | 8 | export interface selectParams { 9 | id: number | string; 10 | } 11 | 12 | /** 13 | * @description: Request list return value 14 | */ 15 | export type DemoOptionsGetResultModel = BasicFetchResult; 16 | -------------------------------------------------------------------------------- /src/marsgis/widgets/basic/manage-layers/layer-picture-guihua.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /src/components/FlowChart/src/types.ts: -------------------------------------------------------------------------------- 1 | import { NodeConfig } from '@logicflow/core'; 2 | import { ToolbarTypeEnum } from './enum'; 3 | 4 | export interface NodeItem extends NodeConfig { 5 | icon: string; 6 | } 7 | 8 | export interface ToolbarConfig { 9 | type?: string | ToolbarTypeEnum; 10 | tooltip?: string | boolean; 11 | icon?: string; 12 | disabled?: boolean; 13 | separate?: boolean; 14 | } 15 | -------------------------------------------------------------------------------- /src/api/demo/select.ts: -------------------------------------------------------------------------------- 1 | import { defHttp } from '@/utils/http/axios'; 2 | import { DemoOptionsItem, selectParams } from './model/optionsModel'; 3 | 4 | enum Api { 5 | OPTIONS_LIST = '/select/getDemoOptions', 6 | } 7 | 8 | /** 9 | * @description: Get sample options value 10 | */ 11 | export const optionsListApi = (params?: selectParams) => 12 | defHttp.get({ url: Api.OPTIONS_LIST, params }); 13 | -------------------------------------------------------------------------------- /src/design/transition/scale.less: -------------------------------------------------------------------------------- 1 | .scale-transition { 2 | .transition-default(); 3 | 4 | &-enter-from, 5 | &-leave, 6 | &-leave-to { 7 | transform: scale(0); 8 | opacity: 0; 9 | } 10 | } 11 | 12 | .scale-rotate-transition { 13 | .transition-default(); 14 | 15 | &-enter-from, 16 | &-leave, 17 | &-leave-to { 18 | transform: scale(0) rotate(-45deg); 19 | opacity: 0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/components/Scrollbar/src/types.d.ts: -------------------------------------------------------------------------------- 1 | export interface BarMapItem { 2 | offset: string; 3 | scroll: string; 4 | scrollSize: string; 5 | size: string; 6 | key: string; 7 | axis: string; 8 | client: string; 9 | direction: string; 10 | } 11 | export interface BarMap { 12 | vertical: BarMapItem; 13 | horizontal: BarMapItem; 14 | } 15 | 16 | export interface ScrollbarType { 17 | wrap: ElRef; 18 | } 19 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/emits.ts: -------------------------------------------------------------------------------- 1 | import tableEmits from 'vxe-table/es/table/src/emits'; 2 | 3 | export const basicEmits = [ 4 | ...tableEmits, 5 | 'page-change', 6 | 'form-submit', 7 | 'form-submit-invalid', 8 | 'form-reset', 9 | 'form-collapse', 10 | 'form-toggle-collapse', 11 | 'toolbar-button-click', 12 | 'toolbar-tool-click', 13 | 'zoom', 14 | 15 | //... 如有缺少在此处追加 16 | // xxx 17 | ]; 18 | -------------------------------------------------------------------------------- /src/components/Tree/src/TreeIcon.ts: -------------------------------------------------------------------------------- 1 | import type { VNode } from 'vue'; 2 | import { h } from 'vue'; 3 | import { isString } from 'lodash-es'; 4 | import Icon from '@/components/Icon/Icon.vue'; 5 | 6 | export const TreeIcon = ({ icon }: { icon: VNode | string | undefined }) => { 7 | if (!icon) return null; 8 | if (isString(icon)) { 9 | return h(Icon, { icon, class: 'mr-2' }); 10 | } 11 | return h(Icon); 12 | }; 13 | -------------------------------------------------------------------------------- /src/locales/lang/zh-CN/common.json: -------------------------------------------------------------------------------- 1 | { 2 | "okText": "确认", 3 | "closeText": "关闭", 4 | "cancelText": "取消", 5 | "loadingText": "加载中...", 6 | "saveText": "保存", 7 | "delText": "删除", 8 | "resetText": "重置", 9 | "searchText": "搜索", 10 | "queryText": "查询", 11 | 12 | "inputText": "请输入", 13 | "chooseText": "请选择", 14 | 15 | "redo": "刷新", 16 | "back": "返回", 17 | 18 | "light": "亮色主题", 19 | "dark": "黑暗主题" 20 | } 21 | -------------------------------------------------------------------------------- /src/settings/encryptionSetting.ts: -------------------------------------------------------------------------------- 1 | import { isDevMode } from '@/utils/env'; 2 | 3 | // System default cache time, in seconds 4 | export const DEFAULT_CACHE_TIME = 60 * 60 * 24 * 7; 5 | 6 | // aes encryption key 7 | export const cacheCipher = { 8 | key: '_11111000001111@', 9 | iv: '@11111000001111_', 10 | }; 11 | 12 | // Whether the system cache is encrypted using aes 13 | export const SHOULD_ENABLE_STORAGE_ENCRYPTION = !isDevMode(); 14 | -------------------------------------------------------------------------------- /apps/test-server/controller/UserController.ts: -------------------------------------------------------------------------------- 1 | import UserService from '../service/UserService'; 2 | 3 | class UserController { 4 | private service: UserService = new UserService(); 5 | 6 | login = async (ctx) => { 7 | ctx.body = await this.service.login(); 8 | }; 9 | 10 | getUserInfoById = async (ctx) => { 11 | ctx.body = await this.service.getUserInfoById(); 12 | }; 13 | } 14 | 15 | export default new UserController(); 16 | -------------------------------------------------------------------------------- /internal/vite-config/src/plugins/visualizer.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Package file volume analysis 3 | */ 4 | import visualizer from 'rollup-plugin-visualizer'; 5 | import { type PluginOption } from 'vite'; 6 | 7 | export function configVisualizerConfig() { 8 | return visualizer({ 9 | filename: './node_modules/.cache/visualizer/stats.html', 10 | open: true, 11 | gzipSize: true, 12 | brotliSize: true, 13 | }) as PluginOption; 14 | } 15 | -------------------------------------------------------------------------------- /src/marsgis/common/store/test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * store 状态管理 3 | * @copyright 火星科技 mars3d.cn 4 | * @author 火星渣渣灰 2022-02-19 5 | */ 6 | import { Store, createStore } from "vuex" 7 | import { InjectionKey } from "vue" 8 | 9 | export interface Test { 10 | count?: number 11 | } 12 | 13 | export const key: InjectionKey> = Symbol("test") 14 | 15 | export const store = createStore({ 16 | state: { 17 | count: 0 18 | } 19 | }) 20 | -------------------------------------------------------------------------------- /src/marsgis/widgets/basic/manage-layers/layer-picture-heatmap.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 18 | -------------------------------------------------------------------------------- /src/api/sys/model/menuModel.ts: -------------------------------------------------------------------------------- 1 | import type { RouteMeta } from 'vue-router'; 2 | 3 | export interface RouteItem { 4 | path: string; 5 | component: any; 6 | meta: RouteMeta; 7 | name?: string; 8 | alias?: string | string[]; 9 | redirect?: string; 10 | caseSensitive?: boolean; 11 | children?: RouteItem[]; 12 | } 13 | 14 | /** 15 | * @description: Get menu return value 16 | */ 17 | export type getMenuListResultModel = RouteItem[]; 18 | -------------------------------------------------------------------------------- /src/components/Table/src/components/EditTableHeaderIcon.vue: -------------------------------------------------------------------------------- 1 | 8 | 17 | -------------------------------------------------------------------------------- /src/views/demo/comp/drawer/Drawer2.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/demo/permission/front/AuthPageA.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 17 | -------------------------------------------------------------------------------- /src/views/demo/permission/front/AuthPageB.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 17 | -------------------------------------------------------------------------------- /.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 100, 3 | semi: true, 4 | vueIndentScriptAndStyle: true, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | proseWrap: 'never', 8 | htmlWhitespaceSensitivity: 'strict', 9 | endOfLine: 'auto', 10 | plugins: ['prettier-plugin-packagejson'], 11 | overrides: [ 12 | { 13 | files: '.*rc', 14 | options: { 15 | parser: 'json', 16 | }, 17 | }, 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /src/components/FlowChart/src/useFlowContext.ts: -------------------------------------------------------------------------------- 1 | import type LogicFlow from '@logicflow/core'; 2 | 3 | import { provide, inject } from 'vue'; 4 | 5 | const key = Symbol('flow-chart'); 6 | 7 | type Instance = { 8 | logicFlow: LogicFlow; 9 | }; 10 | 11 | export function createFlowChartContext(instance: Instance) { 12 | provide(key, instance); 13 | } 14 | 15 | export function useFlowChartContext(): Instance { 16 | return inject(key) as Instance; 17 | } 18 | -------------------------------------------------------------------------------- /src/marsgis/widgets/demo/test/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /src/directives/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Configure and register global directives 3 | */ 4 | import type { App } from 'vue'; 5 | import { setupPermissionDirective } from './permission'; 6 | import { setupLoadingDirective } from './loading'; 7 | import { setupEllipsisDirective } from './ellipsis'; 8 | 9 | export function setupGlobDirectives(app: App) { 10 | setupPermissionDirective(app); 11 | setupLoadingDirective(app); 12 | setupEllipsisDirective(app); 13 | } 14 | -------------------------------------------------------------------------------- /src/locales/lang/en/common.json: -------------------------------------------------------------------------------- 1 | { 2 | "okText": "OK", 3 | "closeText": "Close", 4 | "cancelText": "Cancel", 5 | "loadingText": "Loading...", 6 | "saveText": "Save", 7 | "delText": "Delete", 8 | "resetText": "Reset", 9 | "searchText": "Search", 10 | "queryText": "Search", 11 | "inputText": "Please enter ", 12 | "chooseText": "Please choose ", 13 | "redo": "Refresh", 14 | "back": "Back", 15 | "light": "Light", 16 | "dark": "Dark" 17 | } 18 | -------------------------------------------------------------------------------- /src/marsgis/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true #表示是最顶层的配置文件,发现设为true时,才会停止查找.editorconfig文件 2 | 3 | # 匹配全部文件 4 | [*] 5 | # 缩进风格,可选"space"、"tab" 6 | indent_style = space 7 | # 缩进的空格数 8 | indent_size = 2 9 | # 结尾换行符 10 | end_of_line = lf 11 | # 设置字符集 12 | charset = utf-8 13 | # 删除一行中的前后空格 14 | trim_trailing_whitespace = true 15 | # 在文件结尾插入新行 16 | insert_final_newline = true 17 | max_line_length = 150 18 | 19 | [*.md] 20 | # 删除一行中的前后空格 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /src/components/Menu/src/components/BasicMenuItem.vue: -------------------------------------------------------------------------------- 1 | 6 | 15 | -------------------------------------------------------------------------------- /src/views/demo/comp/flow-chart/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /apps/test-server/ecosystem.config.cjs: -------------------------------------------------------------------------------- 1 | const { name } = require('./package.json'); 2 | const path = require('path'); 3 | 4 | module.exports = { 5 | apps: [ 6 | { 7 | name, 8 | script: path.resolve(__dirname, './dist/index.js'), 9 | instances: require('os').cpus().length, 10 | autorestart: true, 11 | watch: true, 12 | env_production: { 13 | NODE_ENV: 'production', 14 | PORT: 8080, 15 | }, 16 | }, 17 | ], 18 | }; 19 | -------------------------------------------------------------------------------- /internal/vite-config/src/plugins/html.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Plugin to minimize and use ejs template syntax in index.html. 3 | * https://github.com/anncwb/vite-plugin-html 4 | */ 5 | import type { PluginOption } from 'vite'; 6 | import { createHtmlPlugin } from 'vite-plugin-html'; 7 | 8 | export function configHtmlPlugin({ isBuild }: { isBuild: boolean }) { 9 | const htmlPlugin: PluginOption[] = createHtmlPlugin({ 10 | minify: isBuild, 11 | }); 12 | return htmlPlugin; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/Button/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import type { ExtractPropTypes } from 'vue'; 3 | import button from './src/BasicButton.vue'; 4 | import popConfirmButton from './src/PopConfirmButton.vue'; 5 | import { buttonProps } from './src/props'; 6 | 7 | export const Button = withInstall(button); 8 | export const PopConfirmButton = withInstall(popConfirmButton); 9 | export declare type ButtonProps = Partial>; 10 | -------------------------------------------------------------------------------- /src/directives/ripple/index.less: -------------------------------------------------------------------------------- 1 | .ripple-container { 2 | position: absolute; 3 | top: 0; 4 | left: 0; 5 | width: 0; 6 | height: 0; 7 | overflow: hidden; 8 | pointer-events: none; 9 | } 10 | 11 | .ripple-effect { 12 | position: relative; 13 | z-index: 9999; 14 | width: 1px; 15 | height: 1px; 16 | margin-top: 0; 17 | margin-left: 0; 18 | transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); 19 | border-radius: 50%; 20 | pointer-events: none; 21 | } 22 | -------------------------------------------------------------------------------- /src/views/sys/lock/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/ARate.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createEditRender, 3 | createDefaultRender, 4 | createFilterRender, 5 | createDefaultFilterRender, 6 | createFormItemRender, 7 | } from './common'; 8 | 9 | export default { 10 | renderDefault: createDefaultRender(), 11 | renderEdit: createEditRender(), 12 | renderFilter: createFilterRender(), 13 | defaultFilterMethod: createDefaultFilterRender(), 14 | renderItemContent: createFormItemRender(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/layouts/default/trigger/index.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 16 | -------------------------------------------------------------------------------- /src/layouts/default/trigger/SiderTrigger.vue: -------------------------------------------------------------------------------- 1 | 7 | 13 | -------------------------------------------------------------------------------- /src/logics/theme/util.ts: -------------------------------------------------------------------------------- 1 | const docEle = document.documentElement; 2 | export function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) { 3 | const targetEl = target || document.body; 4 | let { className } = targetEl; 5 | className = className.replace(clsName, ''); 6 | targetEl.className = flag ? `${className} ${clsName} ` : className; 7 | } 8 | 9 | export function setCssVar(prop: string, val: any, dom = docEle) { 10 | dom.style.setProperty(prop, val); 11 | } 12 | -------------------------------------------------------------------------------- /src/views/demo/feat/ripple/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings 2 | 3 | # Automatically normalize line endings (to LF) for all text-based files. 4 | * text=auto eol=lf 5 | 6 | # Declare files that will always have CRLF line endings on checkout. 7 | *.{cmd,[cC][mM][dD]} text eol=crlf 8 | *.{bat,[bB][aA][tT]} text eol=crlf 9 | 10 | # Denote all files that are truly binary and should not be modified. 11 | *.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary -------------------------------------------------------------------------------- /src/views/demo/editor/tinymce/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | .cache 5 | .turbo 6 | 7 | tests/server/static 8 | tests/server/static/upload 9 | 10 | .local 11 | # local env files 12 | .env.local 13 | .env.*.local 14 | .eslintcache 15 | 16 | # Log files 17 | npm-debug.log* 18 | yarn-debug.log* 19 | yarn-error.log* 20 | pnpm-debug.log* 21 | 22 | # Editor directories and files 23 | .idea 24 | # .vscode 25 | *.suo 26 | *.ntvs* 27 | *.njsproj 28 | *.sln 29 | *.sw? 30 | 31 | package-lock.json 32 | pnpm-lock.yaml 33 | 34 | .history 35 | -------------------------------------------------------------------------------- /src/components/ClickOutSide/src/ClickOutSide.vue: -------------------------------------------------------------------------------- 1 | 6 | 21 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AInput.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createEditRender, 3 | createDefaultRender, 4 | createFilterRender, 5 | createDefaultFilterRender, 6 | createFormItemRender, 7 | } from './common'; 8 | 9 | export default { 10 | autofocus: 'input.ant-input', 11 | renderDefault: createDefaultRender(), 12 | renderEdit: createEditRender(), 13 | renderFilter: createFilterRender(), 14 | defaultFilterMethod: createDefaultFilterRender(), 15 | renderItemContent: createFormItemRender(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/views/form-design/components/VFormDesign/styles/variable.less: -------------------------------------------------------------------------------- 1 | // 表单设计器样式 2 | @primary-color: #13c2c2; 3 | @layout-color: #9867f7; 4 | 5 | @primary-background-color: fade(@primary-color, 6%); 6 | @primary-hover-bg-color: fade(@primary-color, 20%); 7 | @layout-background-color: fade(@layout-color, 12%); 8 | @layout-hover-bg-color: fade(@layout-color, 24%); 9 | 10 | @title-text-color: #fff; 11 | @border-color: #ccc; 12 | 13 | @left-right-width: 280px; 14 | @header-height: 56px; 15 | @operating-area-height: 45px; 16 | -------------------------------------------------------------------------------- /src/components/Container/src/typing.ts: -------------------------------------------------------------------------------- 1 | export type ScrollType = 'default' | 'main'; 2 | 3 | export interface CollapseContainerOptions { 4 | canExpand?: boolean; 5 | title?: string; 6 | helpMessage?: Array | string; 7 | } 8 | export interface ScrollContainerOptions { 9 | enableScroll?: boolean; 10 | type?: ScrollType; 11 | } 12 | 13 | export type ScrollActionType = RefType<{ 14 | scrollBottom: () => void; 15 | getScrollWrap: () => Nullable; 16 | scrollTo: (top: number) => void; 17 | }>; 18 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/componentType.ts: -------------------------------------------------------------------------------- 1 | export type ComponentType = 2 | | 'AInput' 3 | | 'AInputNumber' 4 | | 'ASelect' 5 | | 'AApiSelect' 6 | | 'ATreeSelect' 7 | | 'AApiTreeSelect' 8 | | 'ARadioGroup' 9 | | 'ACheckboxGroup' 10 | | 'AAutoComplete' 11 | | 'ACascader' 12 | | 'ADatePicker' 13 | | 'AMonthPicker' 14 | | 'ARangePicker' 15 | | 'AWeekPicker' 16 | | 'ATimePicker' 17 | | 'AYearPicker' 18 | | 'ASwitch' 19 | | 'ARate' 20 | | 'AInputSearch' 21 | | 'AButton' 22 | | 'AEmpty'; 23 | -------------------------------------------------------------------------------- /src/api/demo/table.ts: -------------------------------------------------------------------------------- 1 | import { defHttp } from '@/utils/http/axios'; 2 | import { DemoParams, DemoListGetResultModel } from './model/tableModel'; 3 | 4 | enum Api { 5 | DEMO_LIST = '/table/getDemoList', 6 | } 7 | 8 | /** 9 | * @description: Get sample list value 10 | */ 11 | 12 | export const demoListApi = (params: DemoParams) => 13 | defHttp.get({ 14 | url: Api.DEMO_LIST, 15 | params, 16 | headers: { 17 | // @ts-ignore 18 | ignoreCancelToken: true, 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AAutoComplete.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createEditRender, 3 | createDefaultRender, 4 | createFilterRender, 5 | createDefaultFilterRender, 6 | createFormItemRender, 7 | } from './common'; 8 | 9 | export default { 10 | autofocus: 'input.ant-input', 11 | renderDefault: createDefaultRender(), 12 | renderEdit: createEditRender(), 13 | renderFilter: createFilterRender(), 14 | defaultFilterMethod: createDefaultFilterRender(), 15 | renderItemContent: createFormItemRender(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/hooks/web/useContextMenu.ts: -------------------------------------------------------------------------------- 1 | import { onUnmounted, getCurrentInstance } from 'vue'; 2 | import { createContextMenu, destroyContextMenu } from '@/components/ContextMenu'; 3 | import type { ContextMenuItem } from '@/components/ContextMenu'; 4 | 5 | export type { ContextMenuItem }; 6 | export function useContextMenu(authRemove = true) { 7 | if (getCurrentInstance() && authRemove) { 8 | onUnmounted(() => { 9 | destroyContextMenu(); 10 | }); 11 | } 12 | return [createContextMenu, destroyContextMenu]; 13 | } 14 | -------------------------------------------------------------------------------- /src/layouts/default/setting/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 17 | -------------------------------------------------------------------------------- /src/views/demo/page/list/basic/data.tsx: -------------------------------------------------------------------------------- 1 | export const cardList = (() => { 2 | const result: any[] = []; 3 | for (let i = 0; i < 6; i++) { 4 | result.push({ 5 | id: i, 6 | title: 'Vben Admin', 7 | description: '基于Vue Next, TypeScript, Ant Design Vue实现的一套完整的企业级后台管理系统', 8 | datetime: '2020-11-26 17:39', 9 | extra: '编辑', 10 | icon: 'logos:vue', 11 | color: '#1890ff', 12 | author: 'Vben', 13 | percent: 20 * (i + 1), 14 | }); 15 | } 16 | return result; 17 | })(); 18 | -------------------------------------------------------------------------------- /src/views/form-design/utils/message.ts: -------------------------------------------------------------------------------- 1 | import { useMessage } from '@/hooks/web/useMessage'; 2 | 3 | const { createMessage } = useMessage(); 4 | const message = Object.assign({ 5 | success: (msg: string) => { 6 | createMessage.success(msg); 7 | }, 8 | error: (msg: string) => { 9 | createMessage.error(msg); 10 | }, 11 | warning: (msg: string) => { 12 | createMessage.warning(msg); 13 | }, 14 | info: (msg: string) => { 15 | createMessage.info(msg); 16 | }, 17 | }); 18 | 19 | export default message; 20 | -------------------------------------------------------------------------------- /types/module.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { DefineComponent } from 'vue'; 3 | 4 | const Component: DefineComponent<{}, {}, any>; 5 | export default Component; 6 | } 7 | 8 | declare module 'ant-design-vue/es/locale/*' { 9 | import { Locale } from 'ant-design-vue/types/locale-provider'; 10 | 11 | const locale: Locale & ReadonlyRecordable; 12 | export default locale as Locale & ReadonlyRecordable; 13 | } 14 | 15 | declare module 'virtual:*' { 16 | const result: any; 17 | export default result; 18 | } 19 | -------------------------------------------------------------------------------- /apps/test-server/controller/FileController.ts: -------------------------------------------------------------------------------- 1 | import FileService from '../service/FileService'; 2 | 3 | class FileController { 4 | private service: FileService = new FileService(); 5 | 6 | upload = async (ctx) => { 7 | const files = ctx.request.files.file; 8 | console.log(files); 9 | 10 | if (files.length === undefined) { 11 | this.service.upload(ctx, files, false); 12 | } else { 13 | this.service.upload(ctx, files, true); 14 | } 15 | }; 16 | } 17 | 18 | export default new FileController(); 19 | -------------------------------------------------------------------------------- /src/components/Modal/src/components/ModalHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AInputNumber.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createEditRender, 3 | createFilterRender, 4 | createFormItemRender, 5 | createDefaultFilterRender, 6 | createDefaultRender, 7 | } from './common'; 8 | 9 | export default { 10 | autofocus: 'input.ant-input-number-input', 11 | renderDefault: createDefaultRender(), 12 | renderEdit: createEditRender(), 13 | renderFilter: createFilterRender(), 14 | defaultFilterMethod: createDefaultFilterRender(), 15 | renderItemContent: createFormItemRender(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/views/demo/table/MultipleHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 18 | -------------------------------------------------------------------------------- /apps/test-server/routes.ts: -------------------------------------------------------------------------------- 1 | import UserController from './controller/UserController'; 2 | import FileController from './controller/FileController'; 3 | 4 | export default [ 5 | // user 6 | { 7 | path: '/login', 8 | method: 'post', 9 | action: UserController.login, 10 | }, 11 | { 12 | path: '/getUserInfoById', 13 | method: 'get', 14 | action: UserController.getUserInfoById, 15 | }, 16 | 17 | // file 18 | { 19 | path: '/upload', 20 | method: 'post', 21 | action: FileController.upload, 22 | }, 23 | ]; 24 | -------------------------------------------------------------------------------- /src/components/Modal/src/hooks/useModalContext.ts: -------------------------------------------------------------------------------- 1 | import { InjectionKey } from 'vue'; 2 | import { createContext, useContext } from '@/hooks/core/useContext'; 3 | 4 | export interface ModalContextProps { 5 | redoModalHeight: () => void; 6 | } 7 | 8 | const key: InjectionKey = Symbol(); 9 | 10 | export function createModalContext(context: ModalContextProps) { 11 | return createContext(context, key); 12 | } 13 | 14 | export function useModalContext() { 15 | return useContext(key); 16 | } 17 | -------------------------------------------------------------------------------- /src/design/ant/input.less: -------------------------------------------------------------------------------- 1 | @import (reference) '../color.less'; 2 | 3 | // input 4 | .ant-input { 5 | &-number, 6 | &-number-group-wrapper { 7 | width: 100% !important; 8 | min-width: 110px; 9 | max-width: 100%; 10 | } 11 | } 12 | 13 | .ant-input-affix-wrapper .ant-input-suffix { 14 | right: 9px; 15 | } 16 | 17 | .ant-input-clear-icon { 18 | margin-right: 5px; 19 | } 20 | 21 | .ant-input-affix-wrapper-textarea-with-clear-btn { 22 | padding: 0 !important; 23 | 24 | textarea.ant-input { 25 | padding: 4px; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/views/demo/table/MergeHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /internal/ts-config/node-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Node Server Config", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "module": "commonjs", 7 | "declaration": false, 8 | "removeComments": true, 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es6", 12 | "sourceMap": false, 13 | "esModuleInterop": true, 14 | "outDir": "./dist", 15 | "baseUrl": "./" 16 | }, 17 | "exclude": ["node_modules"] 18 | } 19 | -------------------------------------------------------------------------------- /src/components/CardList/src/data.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue'; 2 | // 每行个数 3 | export const grid = ref(12); 4 | // slider属性 5 | export const useSlider = (min = 6, max = 12) => { 6 | // 每行显示个数滑动条 7 | const getMarks = () => { 8 | const l = {}; 9 | for (let i = min; i < max + 1; i++) { 10 | l[i] = { 11 | style: { 12 | color: '#fff', 13 | }, 14 | label: i, 15 | }; 16 | } 17 | return l; 18 | }; 19 | return { 20 | min, 21 | max, 22 | marks: getMarks(), 23 | step: 1, 24 | }; 25 | }; 26 | -------------------------------------------------------------------------------- /src/components/VxeTable/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | import vxeBasicTable from './src/VxeBasicTable'; 3 | import { VXETable } from 'vxe-table'; 4 | import VXETablePluginAntd from './src/components'; 5 | import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'; 6 | import ExcelJS from 'exceljs'; 7 | import './src/setting'; 8 | 9 | export const VxeBasicTable = withInstall(vxeBasicTable); 10 | export * from 'vxe-table'; 11 | export * from './src/types'; 12 | 13 | VXETable.use(VXETablePluginAntd).use(VXETablePluginExportXLSX, { ExcelJS }); 14 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AInputSearch.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createEditRender, 3 | createDefaultRender, 4 | createFilterRender, 5 | createDefaultFilterRender, 6 | createFormItemRender, 7 | createToolbarToolRender, 8 | } from './common'; 9 | 10 | export default { 11 | renderDefault: createDefaultRender(), 12 | renderEdit: createEditRender(), 13 | renderFilter: createFilterRender(), 14 | defaultFilterMethod: createDefaultFilterRender(), 15 | renderItemContent: createFormItemRender(), 16 | renderToolbarTool: createToolbarToolRender(), 17 | }; 18 | -------------------------------------------------------------------------------- /src/api/demo/model/tableModel.ts: -------------------------------------------------------------------------------- 1 | import { BasicPageParams, BasicFetchResult } from '@/api/model/baseModel'; 2 | /** 3 | * @description: Request list interface parameters 4 | */ 5 | export type DemoParams = Partial; 6 | 7 | export interface DemoListItem { 8 | id: string; 9 | beginTime: string; 10 | endTime: string; 11 | address: string; 12 | name: string; 13 | no: number; 14 | status: number; 15 | } 16 | 17 | /** 18 | * @description: Request list return value 19 | */ 20 | export type DemoListGetResultModel = BasicFetchResult; 21 | -------------------------------------------------------------------------------- /src/utils/dateUtil.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Independent time operation tool to facilitate subsequent switch to dayjs 3 | */ 4 | import dayjs from 'dayjs'; 5 | 6 | const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss'; 7 | const DATE_FORMAT = 'YYYY-MM-DD'; 8 | 9 | export function formatToDateTime(date?: dayjs.ConfigType, format = DATE_TIME_FORMAT): string { 10 | return dayjs(date).format(format); 11 | } 12 | 13 | export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): string { 14 | return dayjs(date).format(format); 15 | } 16 | 17 | export const dateUtil = dayjs; 18 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AYearPicker.tsx: -------------------------------------------------------------------------------- 1 | import { getDatePickerCellValue } from './ADatePicker'; 2 | import { 3 | createEditRender, 4 | createCellRender, 5 | createFormItemRender, 6 | createExportMethod, 7 | } from './common'; 8 | 9 | export default { 10 | renderEdit: createEditRender(), 11 | renderCell: createCellRender(getDatePickerCellValue, () => { 12 | return ['YYYY']; 13 | }), 14 | renderItemContent: createFormItemRender(), 15 | exportMethod: createExportMethod(getDatePickerCellValue, () => { 16 | return ['YYYY']; 17 | }), 18 | }; 19 | -------------------------------------------------------------------------------- /src/hooks/setting/useDarkModeTheme.ts: -------------------------------------------------------------------------------- 1 | import { computed } from 'vue'; 2 | import { theme } from 'ant-design-vue'; 3 | import { useRootSetting } from '@/hooks/setting/useRootSetting'; 4 | import { ThemeEnum } from '@/enums/appEnum'; 5 | 6 | export function useDarkModeTheme() { 7 | const { getDarkMode } = useRootSetting(); 8 | const { darkAlgorithm } = theme; 9 | const isDark = computed(() => getDarkMode.value === ThemeEnum.DARK); 10 | const darkTheme = { 11 | algorithm: [darkAlgorithm], 12 | }; 13 | 14 | return { 15 | isDark, 16 | darkTheme, 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | # Whether to open mock 2 | VITE_USE_MOCK = true 3 | 4 | # public path 5 | VITE_PUBLIC_PATH = / 6 | 7 | # Whether to enable gzip or brotli compression 8 | # Optional: gzip | brotli | none 9 | # If you need multiple forms, you can use `,` to separate 10 | VITE_BUILD_COMPRESS = 'none' 11 | 12 | 13 | # Basic interface address SPA 14 | VITE_GLOB_API_URL=/basic-api 15 | 16 | # File upload address, optional 17 | # It can be forwarded by nginx or write the actual address directly 18 | VITE_GLOB_UPLOAD_URL=/upload 19 | 20 | # Interface prefix 21 | VITE_GLOB_API_URL_PREFIX= 22 | -------------------------------------------------------------------------------- /apps/test-server/service/UserService.ts: -------------------------------------------------------------------------------- 1 | import { Result } from '../utils'; 2 | 3 | const fakeUserInfo = { 4 | userId: '1', 5 | username: 'vben', 6 | realName: 'Vben Admin', 7 | desc: 'manager', 8 | password: '123456', 9 | token: 'fakeToken1', 10 | roles: [ 11 | { 12 | roleName: 'Super Admin', 13 | value: 'super', 14 | }, 15 | ], 16 | }; 17 | export default class UserService { 18 | async login() { 19 | return Result.success(fakeUserInfo); 20 | } 21 | 22 | async getUserInfoById() { 23 | return Result.success(fakeUserInfo); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AMonthPicker.tsx: -------------------------------------------------------------------------------- 1 | import { getDatePickerCellValue } from './ADatePicker'; 2 | import { 3 | createCellRender, 4 | createEditRender, 5 | createExportMethod, 6 | createFormItemRender, 7 | } from './common'; 8 | 9 | export default { 10 | renderEdit: createEditRender(), 11 | renderCell: createCellRender(getDatePickerCellValue, () => { 12 | return ['YYYY-MM']; 13 | }), 14 | renderItemContent: createFormItemRender(), 15 | exportMethod: createExportMethod(getDatePickerCellValue, () => { 16 | return ['YYYY-MM']; 17 | }), 18 | }; 19 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/ATimePicker.tsx: -------------------------------------------------------------------------------- 1 | import { getDatePickerCellValue } from './ADatePicker'; 2 | import { 3 | createEditRender, 4 | createCellRender, 5 | createFormItemRender, 6 | createExportMethod, 7 | } from './common'; 8 | 9 | export default { 10 | renderEdit: createEditRender(), 11 | renderCell: createCellRender(getDatePickerCellValue, () => { 12 | return ['HH:mm:ss']; 13 | }), 14 | renderItemContent: createFormItemRender(), 15 | exportMethod: createExportMethod(getDatePickerCellValue, () => { 16 | return ['HH:mm:ss']; 17 | }), 18 | }; 19 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AWeekPicker.tsx: -------------------------------------------------------------------------------- 1 | import { getDatePickerCellValue } from './ADatePicker'; 2 | import { 3 | createEditRender, 4 | createCellRender, 5 | createFormItemRender, 6 | createExportMethod, 7 | } from './common'; 8 | 9 | export default { 10 | renderEdit: createEditRender(), 11 | renderCell: createCellRender(getDatePickerCellValue, () => { 12 | return ['YYYY-WW周']; 13 | }), 14 | renderItemContent: createFormItemRender(), 15 | exportMethod: createExportMethod(getDatePickerCellValue, () => { 16 | return ['YYYY-WW周']; 17 | }), 18 | }; 19 | -------------------------------------------------------------------------------- /src/views/demo/comp/verify/Rotate.vue: -------------------------------------------------------------------------------- 1 | 8 | 19 | -------------------------------------------------------------------------------- /internal/vite-config/src/utils/hash.ts: -------------------------------------------------------------------------------- 1 | import { createHash } from 'node:crypto'; 2 | 3 | function createContentHash(content: string, hashLSize = 12) { 4 | const hash = createHash('sha256').update(content); 5 | return hash.digest('hex').slice(0, hashLSize); 6 | } 7 | function strToHex(str: string) { 8 | const result: string[] = []; 9 | for (let i = 0; i < str.length; ++i) { 10 | const hex = str.charCodeAt(i).toString(16); 11 | result.push(('000' + hex).slice(-4)); 12 | } 13 | return result.join('').toUpperCase(); 14 | } 15 | 16 | export { createContentHash, strToHex }; 17 | -------------------------------------------------------------------------------- /packages/hooks/src/onMountedOrActivated.ts: -------------------------------------------------------------------------------- 1 | import { type AnyFunction } from '@vben/types'; 2 | import { nextTick, onActivated, onMounted } from 'vue'; 3 | 4 | /** 5 | * 在 OnMounted 或者 OnActivated 时触发 6 | * @param hook 任何函数(包括异步函数) 7 | */ 8 | function onMountedOrActivated(hook: AnyFunction) { 9 | let mounted: boolean; 10 | 11 | onMounted(() => { 12 | hook(); 13 | nextTick(() => { 14 | mounted = true; 15 | }); 16 | }); 17 | 18 | onActivated(() => { 19 | if (mounted) { 20 | hook(); 21 | } 22 | }); 23 | } 24 | 25 | export { onMountedOrActivated }; 26 | -------------------------------------------------------------------------------- /src/marsgis/views/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 22 | 23 | -------------------------------------------------------------------------------- /src/components/Form/src/hooks/useFormContext.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey } from 'vue'; 2 | import { createContext, useContext } from '@/hooks/core/useContext'; 3 | 4 | export interface FormContextProps { 5 | resetAction: () => Promise; 6 | submitAction: () => Promise; 7 | } 8 | 9 | const key: InjectionKey = Symbol(); 10 | 11 | export function createFormContext(context: FormContextProps) { 12 | return createContext(context, key); 13 | } 14 | 15 | export function useFormContext() { 16 | return useContext(key); 17 | } 18 | -------------------------------------------------------------------------------- /src/views/demo/feat/tabs/TabDetail.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 21 | -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | NODE_ENV=production 2 | # Whether to open mock 3 | VITE_USE_MOCK = true 4 | 5 | # public path 6 | VITE_PUBLIC_PATH = / 7 | 8 | # Whether to enable gzip or brotli compression 9 | # Optional: gzip | brotli | none 10 | # If you need multiple forms, you can use `,` to separate 11 | VITE_BUILD_COMPRESS = 'none' 12 | 13 | # Basic interface address SPA 14 | VITE_GLOB_API_URL=/basic-api 15 | 16 | # File upload address, optional 17 | # It can be forwarded by nginx or write the actual address directly 18 | VITE_GLOB_UPLOAD_URL=/upload 19 | 20 | # Interface prefix 21 | VITE_GLOB_API_URL_PREFIX= 22 | -------------------------------------------------------------------------------- /internal/vite-config/src/plugins/mock.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Mock plugin for development and production. 3 | * https://github.com/anncwb/vite-plugin-mock 4 | */ 5 | import { viteMockServe } from 'vite-plugin-mock'; 6 | 7 | export function configMockPlugin({ isBuild }: { isBuild: boolean }) { 8 | return viteMockServe({ 9 | ignore: /^_/, 10 | mockPath: 'mock', 11 | localEnabled: !isBuild, 12 | prodEnabled: isBuild, 13 | injectCode: ` 14 | import { setupProdMockServer } from '../mock/_createProductionServer'; 15 | 16 | setupProdMockServer(); 17 | `, 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /src/components/Markdown/src/getTheme.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 获取主题类型 深色浅色模式 对应的值 3 | * @param darkModeVal 深色模式值 4 | * @param themeMode 主题类型——外观(默认), 内容, 代码块 5 | */ 6 | export const getTheme = ( 7 | darkModeVal: 'light' | 'dark' | string, 8 | themeMode: 'default' | 'content' | 'code' = 'default', 9 | ) => { 10 | const isDark = darkModeVal === 'dark'; 11 | switch (themeMode) { 12 | case 'default': 13 | return isDark ? 'dark' : 'classic'; 14 | case 'content': 15 | return isDark ? 'dark' : 'light'; 16 | case 'code': 17 | return isDark ? 'dracula' : 'github'; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /src/views/dashboard/workbench/components/QuickNav.vue: -------------------------------------------------------------------------------- 1 | 11 | 16 | -------------------------------------------------------------------------------- /public/resource/tinymce/skins/ui/oxide/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /src/enums/exceptionEnum.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description: Exception related enumeration 3 | */ 4 | export enum ExceptionEnum { 5 | // page not access 6 | PAGE_NOT_ACCESS = 403, 7 | 8 | // page not found 9 | PAGE_NOT_FOUND = 404, 10 | 11 | // error 12 | ERROR = 500, 13 | 14 | // net work error 15 | NET_WORK_ERROR = 10000, 16 | 17 | // No data on the page. In fact, it is not an exception page 18 | PAGE_NOT_DATA = 10100, 19 | } 20 | 21 | export enum ErrorTypeEnum { 22 | VUE = 'vue', 23 | SCRIPT = 'script', 24 | RESOURCE = 'resource', 25 | AJAX = 'ajax', 26 | PROMISE = 'promise', 27 | } 28 | -------------------------------------------------------------------------------- /src/layouts/default/header/components/index.ts: -------------------------------------------------------------------------------- 1 | import { createAsyncComponent } from '@/utils/factory/createAsyncComponent'; 2 | import FullScreen from './FullScreen.vue'; 3 | 4 | export const UserDropDown = createAsyncComponent(() => import('./user-dropdown/index.vue'), { 5 | loading: true, 6 | }); 7 | 8 | export const LayoutBreadcrumb = createAsyncComponent(() => import('./Breadcrumb.vue')); 9 | 10 | export const Notify = createAsyncComponent(() => import('./notify/index.vue')); 11 | 12 | export const ErrorAction = createAsyncComponent(() => import('./ErrorAction.vue')); 13 | 14 | export { FullScreen }; 15 | -------------------------------------------------------------------------------- /internal/vite-config/src/config/common.ts: -------------------------------------------------------------------------------- 1 | import UnoCSS from 'unocss/vite'; 2 | import { type UserConfig } from 'vite'; 3 | 4 | const commonConfig: (mode: string) => UserConfig = (mode) => ({ 5 | server: { 6 | host: true, 7 | }, 8 | esbuild: { 9 | drop: mode === 'production' ? ['console', 'debugger'] : [], 10 | }, 11 | build: { 12 | reportCompressedSize: false, 13 | chunkSizeWarningLimit: 1500, 14 | rollupOptions: { 15 | // TODO: Prevent memory overflow 16 | maxParallelFileOps: 3, 17 | }, 18 | }, 19 | plugins: [UnoCSS()], 20 | }); 21 | 22 | export { commonConfig }; 23 | -------------------------------------------------------------------------------- /internal/vite-config/src/plugins/svgSprite.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Vite Plugin for fast creating SVG sprites. 3 | * https://github.com/anncwb/vite-plugin-svg-icons 4 | */ 5 | 6 | import { resolve } from 'node:path'; 7 | 8 | import type { PluginOption } from 'vite'; 9 | import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'; 10 | 11 | export function configSvgIconsPlugin({ isBuild }: { isBuild: boolean }) { 12 | const svgIconsPlugin = createSvgIconsPlugin({ 13 | iconDirs: [resolve(process.cwd(), 'src/assets/icons')], 14 | svgoOptions: isBuild, 15 | }); 16 | return svgIconsPlugin as PluginOption; 17 | } 18 | -------------------------------------------------------------------------------- /public/resource/tinymce/skins/ui/oxide-dark/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /src/layouts/default/tabs/types.ts: -------------------------------------------------------------------------------- 1 | import type { DropMenu } from '@/components/Dropdown'; 2 | import type { RouteLocationNormalized } from 'vue-router'; 3 | 4 | export enum TabContentEnum { 5 | TAB_TYPE, 6 | EXTRA_TYPE, 7 | } 8 | 9 | export type { DropMenu }; 10 | 11 | export interface TabContentProps { 12 | tabItem: RouteLocationNormalized; 13 | type?: TabContentEnum; 14 | trigger?: ('click' | 'hover' | 'contextmenu')[]; 15 | } 16 | 17 | export enum MenuEventEnum { 18 | REFRESH_PAGE, 19 | CLOSE_CURRENT, 20 | CLOSE_LEFT, 21 | CLOSE_RIGHT, 22 | CLOSE_OTHER, 23 | CLOSE_ALL, 24 | SCALE, 25 | } 26 | -------------------------------------------------------------------------------- /src/locales/lang/zh_CN.ts: -------------------------------------------------------------------------------- 1 | import { genMessage } from '../helper'; 2 | import antdLocale from 'ant-design-vue/es/locale/zh_CN'; 3 | import { deepMerge } from '@/utils'; 4 | 5 | const modules = import.meta.glob('./zh-CN/**/*.{json,ts,js}', { eager: true }); 6 | 7 | export default { 8 | message: { 9 | ...genMessage(modules as Recordable, 'zh-CN'), 10 | antdLocale: { 11 | ...antdLocale, 12 | DatePicker: deepMerge( 13 | antdLocale.DatePicker, 14 | genMessage(modules as Recordable, 'zh-CN').antdLocale.DatePicker, 15 | ), 16 | }, 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /src/marsgis/common/uses/use-lifecycle.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 组件中开启 map.ts 生命周期 3 | * @copyright 火星科技 mars3d.cn 4 | * @author 火星渣渣灰 2022-02-19 5 | */ 6 | import { inject, onBeforeMount, onBeforeUnmount } from "vue" 7 | 8 | export default function useLifecycle(mapWork: any): void { 9 | const getMapInstance = inject("getMapInstance") 10 | onBeforeMount(() => { 11 | if (mapWork.onMounted) { 12 | const map = getMapInstance() 13 | mapWork.onMounted(map) 14 | } 15 | }) 16 | onBeforeUnmount(() => { 17 | if (mapWork.onUnmounted) { 18 | mapWork.onUnmounted() 19 | } 20 | }) 21 | } 22 | -------------------------------------------------------------------------------- /.env.analyze: -------------------------------------------------------------------------------- 1 | # Whether to open mock 2 | VITE_USE_MOCK = true 3 | 4 | # public path 5 | VITE_PUBLIC_PATH = / 6 | 7 | # Whether to enable gzip or brotli compression 8 | # Optional: gzip | brotli | none 9 | # If you need multiple forms, you can use `,` to separate 10 | VITE_BUILD_COMPRESS = 'none' 11 | 12 | 13 | # Basic interface address SPA 14 | VITE_GLOB_API_URL=/basic-api 15 | 16 | # File upload address, optional 17 | # It can be forwarded by nginx or write the actual address directly 18 | VITE_GLOB_UPLOAD_URL=/upload 19 | 20 | # Interface prefix 21 | VITE_GLOB_API_URL_PREFIX= 22 | 23 | VITE_ENABLE_ANALYZE = true 24 | -------------------------------------------------------------------------------- /src/components/Application/src/useAppContext.ts: -------------------------------------------------------------------------------- 1 | import { InjectionKey, Ref } from 'vue'; 2 | import { createContext, useContext } from '@/hooks/core/useContext'; 3 | 4 | export interface AppProviderContextProps { 5 | prefixCls: Ref; 6 | isMobile: Ref; 7 | } 8 | 9 | const key: InjectionKey = Symbol(); 10 | 11 | export function createAppProviderContext(context: AppProviderContextProps) { 12 | return createContext(context, key); 13 | } 14 | 15 | export function useAppProviderContext() { 16 | return useContext(key); 17 | } 18 | -------------------------------------------------------------------------------- /src/components/Form/src/hooks/useComponentRegister.ts: -------------------------------------------------------------------------------- 1 | import type { ComponentType } from '../types'; 2 | import { tryOnUnmounted } from '@vueuse/core'; 3 | import { add, del } from '../componentMap'; 4 | import type { Component } from 'vue'; 5 | import { isPascalCase } from '@/utils/is'; 6 | 7 | export function useComponentRegister( 8 | compName: ComponentType | T, 9 | comp: R, 10 | ) { 11 | if (!isPascalCase(compName)) { 12 | throw new Error('compName must be in PascalCase'); 13 | } 14 | 15 | add(compName, comp); 16 | tryOnUnmounted(() => { 17 | del(compName); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /.env.docker: -------------------------------------------------------------------------------- 1 | # Whether to open mock 2 | VITE_USE_MOCK = false 3 | 4 | # public path 5 | VITE_PUBLIC_PATH = / 6 | 7 | # timeout(seconds) 8 | VITE_TIMEOUT = 15 9 | # Delete console 10 | VITE_DROP_CONSOLE = true 11 | 12 | # Whether to enable gzip or brotli compression 13 | # Optional: gzip | brotli | none 14 | # If you need multiple forms, you can use `,` to separate 15 | VITE_BUILD_COMPRESS = 'none' 16 | VITE_GLOB_API_URL="__vg_base_url" 17 | 18 | # File upload address, optional 19 | # It can be forwarded by nginx or write the actual address directly 20 | VITE_GLOB_UPLOAD_URL=/files/upload 21 | # Interface prefix 22 | VITE_GLOB_API_URL_PREFIX= 23 | -------------------------------------------------------------------------------- /src/api/demo/account.ts: -------------------------------------------------------------------------------- 1 | import { defHttp } from '@/utils/http/axios'; 2 | import { GetAccountInfoModel } from './model/accountModel'; 3 | 4 | enum Api { 5 | ACCOUNT_INFO = '/account/getAccountInfo', 6 | SESSION_TIMEOUT = '/user/sessionTimeout', 7 | TOKEN_EXPIRED = '/user/tokenExpired', 8 | } 9 | 10 | // Get personal center-basic settings 11 | 12 | export const accountInfoApi = () => defHttp.get({ url: Api.ACCOUNT_INFO }); 13 | 14 | export const sessionTimeoutApi = () => defHttp.post({ url: Api.SESSION_TIMEOUT }); 15 | 16 | export const tokenExpiredApi = () => defHttp.post({ url: Api.TOKEN_EXPIRED }); 17 | -------------------------------------------------------------------------------- /src/components/Table/src/hooks/useLoading.ts: -------------------------------------------------------------------------------- 1 | import { ref, ComputedRef, unref, computed, watch } from 'vue'; 2 | import type { BasicTableProps } from '../types/table'; 3 | 4 | export function useLoading(props: ComputedRef) { 5 | const loadingRef = ref(unref(props).loading); 6 | 7 | watch( 8 | () => unref(props).loading, 9 | (loading) => { 10 | loadingRef.value = loading; 11 | }, 12 | ); 13 | 14 | const getLoading = computed(() => unref(loadingRef)); 15 | 16 | function setLoading(loading: boolean) { 17 | loadingRef.value = loading; 18 | } 19 | 20 | return { getLoading, setLoading }; 21 | } 22 | -------------------------------------------------------------------------------- /src/design/transition/zoom.less: -------------------------------------------------------------------------------- 1 | // zoom-out 2 | .zoom-out-enter-active, 3 | .zoom-out-leave-active { 4 | transition: 5 | opacity 0.1 ease-in-out, 6 | transform 0.15s ease-out; 7 | } 8 | 9 | .zoom-out-enter-from, 10 | .zoom-out-leave-to { 11 | transform: scale(0); 12 | opacity: 0; 13 | } 14 | 15 | // zoom-fade 16 | .zoom-fade-enter-active, 17 | .zoom-fade-leave-active { 18 | transition: 19 | transform 0.2s, 20 | opacity 0.3s ease-out; 21 | } 22 | 23 | .zoom-fade-enter-from { 24 | transform: scale(0.92); 25 | opacity: 0; 26 | } 27 | 28 | .zoom-fade-leave-to { 29 | transform: scale(1.06); 30 | opacity: 0; 31 | } 32 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/cacheSubscribe.ts: -------------------------------------------------------------------------------- 1 | type Listener = (data: any) => void; 2 | 3 | const listeners: Record = {}; 4 | 5 | export const trigger = (key: string, data: any) => { 6 | if (listeners[key]) { 7 | listeners[key].forEach((item) => item(data)); 8 | } 9 | }; 10 | 11 | export const subscribe = (key: string, listener: Listener) => { 12 | if (!listeners[key]) { 13 | listeners[key] = []; 14 | } 15 | 16 | listeners[key].push(listener); 17 | 18 | return function unsubscribe() { 19 | const index = listeners[key].indexOf(listener); 20 | listeners[key].splice(index, 1); 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AApiSelect.tsx: -------------------------------------------------------------------------------- 1 | import XEUtils from 'xe-utils'; 2 | import { createDefaultRender, createEditRender, createFormItemRender } from './common'; 3 | 4 | export default { 5 | renderDefault: createDefaultRender({}, (_, params) => { 6 | return { 7 | params: XEUtils.get(params, 'row'), 8 | }; 9 | }), 10 | renderEdit: createEditRender({}, (_, params) => { 11 | return { 12 | params: XEUtils.get(params, 'row'), 13 | }; 14 | }), 15 | renderItemContent: createFormItemRender({}, (_, params) => { 16 | return { 17 | params: XEUtils.get(params, 'row'), 18 | }; 19 | }), 20 | }; 21 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AApiTreeSelect.tsx: -------------------------------------------------------------------------------- 1 | import XEUtils from 'xe-utils'; 2 | import { createDefaultRender, createEditRender, createFormItemRender } from './common'; 3 | 4 | export default { 5 | renderDefault: createDefaultRender({}, (_, params) => { 6 | return { 7 | params: XEUtils.get(params, 'row'), 8 | }; 9 | }), 10 | renderEdit: createEditRender({}, (_, params) => { 11 | return { 12 | params: XEUtils.get(params, 'row'), 13 | }; 14 | }), 15 | renderItemContent: createFormItemRender({}, (_, params) => { 16 | return { 17 | params: XEUtils.get(params, 'row'), 18 | }; 19 | }), 20 | }; 21 | -------------------------------------------------------------------------------- /src/layouts/default/setting/components/index.ts: -------------------------------------------------------------------------------- 1 | import { createAsyncComponent } from '@/utils/factory/createAsyncComponent'; 2 | 3 | export const TypePicker = createAsyncComponent(() => import('./TypePicker.vue')); 4 | export const ThemeColorPicker = createAsyncComponent(() => import('./ThemeColorPicker.vue')); 5 | export const SettingFooter = createAsyncComponent(() => import('./SettingFooter.vue')); 6 | export const SwitchItem = createAsyncComponent(() => import('./SwitchItem.vue')); 7 | export const SelectItem = createAsyncComponent(() => import('./SelectItem.vue')); 8 | export const InputNumberItem = createAsyncComponent(() => import('./InputNumberItem.vue')); 9 | -------------------------------------------------------------------------------- /src/views/demo/comp/modal/Modal2.vue: -------------------------------------------------------------------------------- 1 | 14 | 19 | -------------------------------------------------------------------------------- /src/router/routes/mainOut.ts: -------------------------------------------------------------------------------- 1 | /** 2 | The routing of this file will not show the layout. 3 | It is an independent new page. 4 | the contents of the file still need to log in to access 5 | */ 6 | import type { AppRouteModule } from '@/router/types'; 7 | 8 | // test 9 | // http:ip:port/main-out 10 | export const mainOutRoutes: AppRouteModule[] = [ 11 | { 12 | path: '/main-out', 13 | name: 'MainOut', 14 | component: () => import('@/views/demo/main-out/index.vue'), 15 | meta: { 16 | title: 'MainOut', 17 | ignoreAuth: true, 18 | }, 19 | }, 20 | ]; 21 | 22 | export const mainOutRouteNames = mainOutRoutes.map((item) => item.name); 23 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/helper.ts: -------------------------------------------------------------------------------- 1 | import { ComponentType } from './componentType'; 2 | import { useI18n } from '@/hooks/web/useI18n'; 3 | 4 | const { t } = useI18n(); 5 | 6 | /** 7 | * @description: 生成placeholder 8 | */ 9 | export function createPlaceholderMessage(component: ComponentType) { 10 | if (!component) return; 11 | if (component.includes('RangePicker')) { 12 | return [t('common.chooseText'), t('common.chooseText')]; 13 | } 14 | if (component.includes('Input') || component.includes('Complete') || component.includes('Rate')) { 15 | return t('common.inputText'); 16 | } else { 17 | return t('common.chooseText'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/layouts/default/content/useContentContext.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey, ComputedRef } from 'vue'; 2 | import { createContext, useContext } from '@/hooks/core/useContext'; 3 | 4 | export interface ContentContextProps { 5 | contentHeight: ComputedRef; 6 | setPageHeight: (height: number) => Promise; 7 | } 8 | 9 | const key: InjectionKey = Symbol(); 10 | 11 | export function createContentContext(context: ContentContextProps) { 12 | return createContext(context, key, { native: true }); 13 | } 14 | 15 | export function useContentContext() { 16 | return useContext(key); 17 | } 18 | -------------------------------------------------------------------------------- /packages/hooks/src/useRefs.ts: -------------------------------------------------------------------------------- 1 | import type { ComponentPublicInstance, Ref } from 'vue'; 2 | import { onBeforeUpdate, shallowRef } from 'vue'; 3 | 4 | function useRefs(): { 5 | refs: Ref; 6 | setRefs: (index: number) => (el: Element | ComponentPublicInstance | null) => void; 7 | } { 8 | const refs = shallowRef([]) as Ref; 9 | 10 | onBeforeUpdate(() => { 11 | refs.value = []; 12 | }); 13 | 14 | const setRefs = (index: number) => (el: Element | ComponentPublicInstance | null) => { 15 | refs.value[index] = el as T; 16 | }; 17 | 18 | return { 19 | refs, 20 | setRefs, 21 | }; 22 | } 23 | 24 | export { useRefs }; 25 | -------------------------------------------------------------------------------- /src/components/Table/index.ts: -------------------------------------------------------------------------------- 1 | export { default as BasicTable } from './src/BasicTable.vue'; 2 | export { default as TableAction } from './src/components/TableAction.vue'; 3 | export { default as EditTableHeaderIcon } from './src/components/EditTableHeaderIcon.vue'; 4 | export { default as TableImg } from './src/components/TableImg.vue'; 5 | 6 | export * from './src/types/table'; 7 | export * from './src/types/pagination'; 8 | export * from './src/types/tableAction'; 9 | export { useTable } from './src/hooks/useTable'; 10 | export type { FormSchema, FormProps } from '@/components/Form/src/types/form'; 11 | export type { EditRecordRow } from './src/components/editable'; 12 | -------------------------------------------------------------------------------- /src/hooks/component/usePageContext.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey, ComputedRef, Ref } from 'vue'; 2 | import { createContext, useContext } from '@/hooks/core/useContext'; 3 | 4 | export interface PageContextProps { 5 | contentHeight: ComputedRef; 6 | pageHeight: Ref; 7 | setPageHeight: (height: number) => Promise; 8 | } 9 | 10 | const key: InjectionKey = Symbol(); 11 | 12 | export function createPageContext(context: PageContextProps) { 13 | return createContext(context, key, { native: true }); 14 | } 15 | 16 | export function usePageContext() { 17 | return useContext(key); 18 | } 19 | -------------------------------------------------------------------------------- /src/components/Upload/src/components/ThumbUrl.vue: -------------------------------------------------------------------------------- 1 | 6 | 15 | 26 | -------------------------------------------------------------------------------- /src/hooks/web/useSortable.ts: -------------------------------------------------------------------------------- 1 | import { nextTick, unref } from 'vue'; 2 | import type { Ref } from 'vue'; 3 | import type { Options } from 'sortablejs'; 4 | 5 | export function useSortable(el?: HTMLElement | Ref, options?: Options) { 6 | function initSortable() { 7 | nextTick(async () => { 8 | el = unref(el); 9 | 10 | if (!el) return; 11 | 12 | const Sortable = (await import('sortablejs')).default; 13 | Sortable.create(el, { 14 | animation: 100, 15 | delay: 400, 16 | delayOnTouchOnly: true, 17 | ...options, 18 | }); 19 | }); 20 | } 21 | 22 | return { initSortable }; 23 | } 24 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/mars-notify/notify.less: -------------------------------------------------------------------------------- 1 | // 功能提示和已知问题提示框 2 | .mars-notify-message { 3 | padding: 0; 4 | background: none; 5 | .mars-msg-bg(); 6 | .ant-notification-notice-message { 7 | font-size: 16px; 8 | margin: 0; 9 | margin-inline-start: 0 !important; 10 | .mars-msg-title(); 11 | } 12 | .ant-notification-notice-description { 13 | color: var(--mars-text-color); 14 | margin: 0; 15 | margin-inline-start: 0 !important; 16 | padding: 20px; 17 | user-select: text; 18 | } 19 | .ant-notification-notice-close { 20 | color: var(--mars-alert-title-color); 21 | top: 10px; 22 | right: 10px; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/router/constant.ts: -------------------------------------------------------------------------------- 1 | export const REDIRECT_NAME = 'Redirect'; 2 | 3 | export const PARENT_LAYOUT_NAME = 'ParentLayout'; 4 | 5 | export const PAGE_NOT_FOUND_NAME = 'PageNotFound'; 6 | 7 | export const EXCEPTION_COMPONENT = () => import('@/views/sys/exception/Exception.vue'); 8 | 9 | /** 10 | * @description: default layout 11 | */ 12 | export const LAYOUT = () => import('@/layouts/default/index.vue'); 13 | 14 | /** 15 | * @description: parent-layout 16 | */ 17 | export const getParentLayout = (_name?: string) => { 18 | return () => 19 | new Promise((resolve) => { 20 | resolve({ 21 | name: _name || PARENT_LAYOUT_NAME, 22 | }); 23 | }); 24 | }; 25 | -------------------------------------------------------------------------------- /src/enums/breakpointEnum.ts: -------------------------------------------------------------------------------- 1 | export enum sizeEnum { 2 | XS = 'XS', 3 | SM = 'SM', 4 | MD = 'MD', 5 | LG = 'LG', 6 | XL = 'XL', 7 | XXL = 'XXL', 8 | } 9 | 10 | export enum screenEnum { 11 | XS = 320, 12 | SM = 640, 13 | MD = 768, 14 | LG = 960, 15 | XL = 1280, 16 | XXL = 1536, 17 | } 18 | 19 | const screenMap = new Map(); 20 | 21 | screenMap.set(sizeEnum.XS, screenEnum.XS); 22 | screenMap.set(sizeEnum.SM, screenEnum.SM); 23 | screenMap.set(sizeEnum.MD, screenEnum.MD); 24 | screenMap.set(sizeEnum.LG, screenEnum.LG); 25 | screenMap.set(sizeEnum.XL, screenEnum.XL); 26 | screenMap.set(sizeEnum.XXL, screenEnum.XXL); 27 | 28 | export { screenMap }; 29 | -------------------------------------------------------------------------------- /src/views/demo/feat/tab-params/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 25 | -------------------------------------------------------------------------------- /src/api/sys/upload.ts: -------------------------------------------------------------------------------- 1 | import { UploadApiResult } from './model/uploadModel'; 2 | import { defHttp } from '@/utils/http/axios'; 3 | import { UploadFileParams } from '#/axios'; 4 | import { useGlobSetting } from '@/hooks/setting'; 5 | import { AxiosProgressEvent } from 'axios'; 6 | 7 | const { uploadUrl = '' } = useGlobSetting(); 8 | 9 | /** 10 | * @description: Upload interface 11 | */ 12 | export function uploadApi( 13 | params: UploadFileParams, 14 | onUploadProgress: (progressEvent: AxiosProgressEvent) => void, 15 | ) { 16 | return defHttp.uploadFile( 17 | { 18 | url: uploadUrl, 19 | onUploadProgress, 20 | }, 21 | params, 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/mars-table/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 24 | 25 | -------------------------------------------------------------------------------- /internal/ts-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/ts-config", 3 | "version": "1.0.0", 4 | "private": true, 5 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 6 | "bugs": { 7 | "url": "https://github.com/vbenjs/vue-vben-admin/issues" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 12 | "directory": "internal/ts-config" 13 | }, 14 | "license": "MIT", 15 | "type": "module", 16 | "files": [ 17 | "base.json", 18 | "node.json", 19 | "vue-app.json", 20 | "node-server.json" 21 | ], 22 | "dependencies": { 23 | "@types/node": "^20.11.19", 24 | "vite": "^5.1.3" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/hooks/setting/index.ts: -------------------------------------------------------------------------------- 1 | import type { GlobConfig } from '#/config'; 2 | 3 | import { getAppEnvConfig } from '@/utils/env'; 4 | 5 | export const useGlobSetting = (): Readonly => { 6 | const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_UPLOAD_URL } = 7 | getAppEnvConfig(); 8 | 9 | // Take global configuration 10 | const glob: Readonly = { 11 | title: VITE_GLOB_APP_TITLE, 12 | apiUrl: VITE_GLOB_API_URL, 13 | shortName: VITE_GLOB_APP_TITLE.replace(/\s/g, '_').replace(/-/g, '_'), 14 | urlPrefix: VITE_GLOB_API_URL_PREFIX, 15 | uploadUrl: VITE_GLOB_UPLOAD_URL, 16 | }; 17 | return glob as Readonly; 18 | }; 19 | -------------------------------------------------------------------------------- /src/enums/httpEnum.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description: Request result set 3 | */ 4 | export enum ResultEnum { 5 | SUCCESS = 0, 6 | ERROR = -1, 7 | TIMEOUT = 401, 8 | TYPE = 'success', 9 | } 10 | 11 | /** 12 | * @description: request method 13 | */ 14 | export enum RequestEnum { 15 | GET = 'GET', 16 | POST = 'POST', 17 | PUT = 'PUT', 18 | DELETE = 'DELETE', 19 | } 20 | 21 | /** 22 | * @description: contentType 23 | */ 24 | export enum ContentTypeEnum { 25 | // json 26 | JSON = 'application/json;charset=UTF-8', 27 | // form-data qs 28 | FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8', 29 | // form-data upload 30 | FORM_DATA = 'multipart/form-data;charset=UTF-8', 31 | } 32 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/mars-dropdown/index.ts: -------------------------------------------------------------------------------- 1 | import { Dropdown } from "ant-design-vue" 2 | import { App, defineComponent, h } from "vue" 3 | import "./dropdown.less" 4 | 5 | /** 6 | * 下拉菜单 7 | * 8 | * @copyright 火星科技 mars3d.cn 9 | * @author 木遥 2022-01-01 10 | */ 11 | 12 | const MarsDropdown = defineComponent({ 13 | name: "mars-dropdown-menu", 14 | inheritAttrs: false, 15 | setup(props, context) { 16 | return () => h(Dropdown, { ...context.attrs, ...props, overlayClassName: "mars-dropdown-menu" }, context.slots) 17 | } 18 | }) 19 | 20 | export function install(app: App): App { 21 | app.component(MarsDropdown.name, MarsDropdown) 22 | return app 23 | } 24 | export default MarsDropdown 25 | -------------------------------------------------------------------------------- /src/marsgis/widgets/demo/menu/popup-demo.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 23 | -------------------------------------------------------------------------------- /src/components/Application/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '@/utils'; 2 | 3 | import appLogo from './src/AppLogo.vue'; 4 | import appProvider from './src/AppProvider.vue'; 5 | import appSearch from './src/search/AppSearch.vue'; 6 | import appLocalePicker from './src/AppLocalePicker.vue'; 7 | import appDarkModeToggle from './src/AppDarkModeToggle.vue'; 8 | 9 | export { useAppProviderContext } from './src/useAppContext'; 10 | 11 | export const AppLogo = withInstall(appLogo); 12 | export const AppProvider = withInstall(appProvider); 13 | export const AppSearch = withInstall(appSearch); 14 | export const AppLocalePicker = withInstall(appLocalePicker); 15 | export const AppDarkModeToggle = withInstall(appDarkModeToggle); 16 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/ts-config/vue-app.json", 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "declaration": false, 7 | "types": ["vite/client"], 8 | "paths": { 9 | "@/*": ["src/*"], 10 | "#/*": ["types/*"] 11 | } 12 | }, 13 | "include": [ 14 | "tests/**/*.ts", 15 | "src/**/*.ts", 16 | "src/**/*.d.ts", 17 | "src/**/*.tsx", 18 | "src/**/*.vue", 19 | "types/**/*.d.ts", 20 | "types/**/*.ts", 21 | "build/**/*.ts", 22 | "build/**/*.d.ts", 23 | "mock/**/*.ts", 24 | "vite.config.ts" 25 | ], 26 | "exclude": ["node_modules", "tests/server/**/*.ts", "dist", "**/*.js"] 27 | } 28 | -------------------------------------------------------------------------------- /src/components/Table/src/components/settings/RedoSetting.vue: -------------------------------------------------------------------------------- 1 | 9 | 24 | -------------------------------------------------------------------------------- /src/components/Table/src/hooks/useTableContext.ts: -------------------------------------------------------------------------------- 1 | import type { Ref } from 'vue'; 2 | import type { BasicTableProps, TableActionType } from '../types/table'; 3 | import { provide, inject, ComputedRef } from 'vue'; 4 | 5 | const key = Symbol('basic-table'); 6 | 7 | type Instance = TableActionType & { 8 | wrapRef: Ref>; 9 | getBindValues: ComputedRef; 10 | }; 11 | 12 | type RetInstance = Omit & { 13 | getBindValues: ComputedRef; 14 | }; 15 | 16 | export function createTableContext(instance: Instance) { 17 | provide(key, instance); 18 | } 19 | 20 | export function useTableContext(): RetInstance { 21 | return inject(key) as RetInstance; 22 | } 23 | -------------------------------------------------------------------------------- /src/layouts/default/tabs/components/SettingButton.vue: -------------------------------------------------------------------------------- 1 | 7 | 20 | -------------------------------------------------------------------------------- /src/views/form-design/hooks/useFormDesignState.ts: -------------------------------------------------------------------------------- 1 | import { inject, Ref } from 'vue'; 2 | import { IFormDesignMethods } from '../typings/form-type'; 3 | import { IFormConfig } from '../typings/v-form-component'; 4 | 5 | /** 6 | * 获取formDesign状态 7 | */ 8 | export function useFormDesignState() { 9 | const formConfig = inject('formConfig') as Ref; 10 | const formDesignMethods = inject('formDesignMethods') as IFormDesignMethods; 11 | return { formConfig, formDesignMethods }; 12 | } 13 | 14 | export function useFormModelState() { 15 | const formModel = inject('formModel') as Ref<{}>; 16 | const setFormModel = inject('setFormModelMethod') as (key: String, value: any) => void; 17 | return { formModel, setFormModel }; 18 | } 19 | -------------------------------------------------------------------------------- /src/components/Preview/src/functional.ts: -------------------------------------------------------------------------------- 1 | import type { Options, Props } from './typing'; 2 | import ImgPreview from './Functional.vue'; 3 | import { isClient } from '@/utils/is'; 4 | import { createVNode, render } from 'vue'; 5 | 6 | let instance: ReturnType | null = null; 7 | export function createImgPreview(options: Options) { 8 | if (!isClient) return; 9 | const propsData: Partial = {}; 10 | const container = document.createElement('div'); 11 | Object.assign(propsData, { show: true, index: 0, scaleStep: 100 }, options); 12 | 13 | instance = createVNode(ImgPreview, propsData); 14 | render(instance, container); 15 | document.body.appendChild(container); 16 | return instance.component?.exposed; 17 | } 18 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/components/AEmpty.tsx: -------------------------------------------------------------------------------- 1 | import { h } from 'vue'; 2 | import { VxeGlobalRendererHandles } from 'vxe-table'; 3 | import { getComponent } from './common'; 4 | 5 | function createEmptyRender() { 6 | return function (renderOpts: VxeGlobalRendererHandles.RenderEmptyOptions) { 7 | const { name, attrs, props } = renderOpts; 8 | 9 | const Component = getComponent(name); 10 | return [ 11 | h( 12 | 'div', 13 | { 14 | class: 'flex items-center justify-center', 15 | }, 16 | h(Component, { 17 | ...attrs, 18 | ...props, 19 | }), 20 | ), 21 | ]; 22 | }; 23 | } 24 | 25 | export default { 26 | renderEmpty: createEmptyRender(), 27 | }; 28 | -------------------------------------------------------------------------------- /src/design/var/index.less: -------------------------------------------------------------------------------- 1 | @import (reference) '../color.less'; 2 | @import 'easing'; 3 | @import 'breakpoint'; 4 | 5 | @namespace: vben; 6 | 7 | // tabs 8 | @multiple-height: 30px; 9 | 10 | // headers 11 | @header-height: 48px; 12 | 13 | // logo width 14 | @logo-width: 32px; 15 | 16 | // 17 | @side-drag-z-index: 200; 18 | 19 | @page-loading-z-index: 10000; 20 | 21 | @lock-page-z-index: 3000; 22 | 23 | @layout-header-fixed-z-index: 500; 24 | 25 | @multiple-tab-fixed-z-index: 505; 26 | 27 | @layout-sider-fixed-z-index: 510; 28 | 29 | @layout-mix-sider-fixed-z-index: 550; 30 | 31 | @preview-comp-z-index: 1000; 32 | 33 | @page-footer-z-index: 99; 34 | 35 | .bem(@n; @content) { 36 | @{namespace}-@{n} { 37 | @content(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/settings/localeSetting.ts: -------------------------------------------------------------------------------- 1 | import type { DropMenu } from '../components/Dropdown'; 2 | import type { LocaleSetting, LocaleType } from '#/config'; 3 | 4 | export const LOCALE: { [key: string]: LocaleType } = { 5 | ZH_CN: 'zh_CN', 6 | EN_US: 'en', 7 | }; 8 | 9 | export const localeSetting: LocaleSetting = { 10 | showPicker: true, 11 | // Locale 12 | locale: LOCALE.ZH_CN, 13 | // Default locale 14 | fallback: LOCALE.ZH_CN, 15 | // available Locales 16 | availableLocales: [LOCALE.ZH_CN, LOCALE.EN_US], 17 | }; 18 | 19 | // locale list 20 | export const localeList: DropMenu[] = [ 21 | { 22 | text: '简体中文', 23 | event: LOCALE.ZH_CN, 24 | }, 25 | { 26 | text: 'English', 27 | event: LOCALE.EN_US, 28 | }, 29 | ]; 30 | -------------------------------------------------------------------------------- /src/layouts/default/trigger/HeaderTrigger.vue: -------------------------------------------------------------------------------- 1 | 6 | 18 | -------------------------------------------------------------------------------- /src/components/VxeTable/src/css/toolbar.scss: -------------------------------------------------------------------------------- 1 | .vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer { 2 | display: flex; 3 | } 4 | 5 | .vxe-toolbar .vxe-tools--wrapper, 6 | .vxe-toolbar .vxe-tools--operate button:first-child { 7 | margin: 0; 8 | margin-left: 10px; 9 | } 10 | 11 | .vxe-toolbar .vxe-tools--wrapper, 12 | .vxe-toolbar .vxe-tools--operate .vxe-button { 13 | margin-left: 1px; 14 | border-radius: 0 !important; 15 | } 16 | 17 | .vxe-toolbar .vxe-tools--wrapper, 18 | .vxe-toolbar .vxe-tools--operate .vxe-custom--wrapper { 19 | margin-left: 1px; 20 | border-radius: 0 !important; 21 | } 22 | 23 | .vxe-toolbar .vxe-tools--wrapper, 24 | .vxe-toolbar .vxe-tools--operate .vxe-custom--wrapper .vxe-button { 25 | margin-left: 10px; 26 | } 27 | -------------------------------------------------------------------------------- /src/design/transition/slide.less: -------------------------------------------------------------------------------- 1 | .slide-y-transition { 2 | .transition-default(); 3 | 4 | &-enter-from, 5 | &-leave-to { 6 | transform: translateY(-15px); 7 | opacity: 0; 8 | } 9 | } 10 | 11 | .slide-y-reverse-transition { 12 | .transition-default(); 13 | 14 | &-enter-from, 15 | &-leave-to { 16 | transform: translateY(15px); 17 | opacity: 0; 18 | } 19 | } 20 | 21 | .slide-x-transition { 22 | .transition-default(); 23 | 24 | &-enter-from, 25 | &-leave-to { 26 | transform: translateX(-15px); 27 | opacity: 0; 28 | } 29 | } 30 | 31 | .slide-x-reverse-transition { 32 | .transition-default(); 33 | 34 | &-enter-from, 35 | &-leave-to { 36 | transform: translateX(15px); 37 | opacity: 0; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/logics/theme/dark.ts: -------------------------------------------------------------------------------- 1 | import { addClass, hasClass, removeClass } from '@/utils/domUtils'; 2 | 3 | export type CustomColorType = { 4 | name: string; 5 | light: string; 6 | dark: string; 7 | }; 8 | 9 | export async function updateDarkTheme(mode: string | null = 'light') { 10 | const htmlRoot = document.getElementById('htmlRoot'); 11 | if (!htmlRoot) { 12 | return; 13 | } 14 | const hasDarkClass = hasClass(htmlRoot, 'dark'); 15 | if (mode === 'dark') { 16 | htmlRoot.setAttribute('data-theme', 'dark'); 17 | if (!hasDarkClass) { 18 | addClass(htmlRoot, 'dark'); 19 | } 20 | } else { 21 | htmlRoot.setAttribute('data-theme', 'light'); 22 | if (hasDarkClass) { 23 | removeClass(htmlRoot, 'dark'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/marsgis/install/index.ts: -------------------------------------------------------------------------------- 1 | import "mars3d-cesium/Build/Cesium/Widgets/widgets.css" 2 | import * as Cesium from "mars3d-cesium" 3 | 4 | import "mars3d/mars3d.css" 5 | import * as mars3d from "mars3d" 6 | 7 | 8 | import { App } from "vue" 9 | import { injectState, key } from "@mars/common/store/widget" 10 | import store from "./widget-store" 11 | import MarsUIInstall from "@mars/components/mars-ui" 12 | import "@mars/components/mars-ui/common" 13 | 14 | export default { 15 | install: (app: App) => { 16 | // mars3d sdk的挂载 17 | app.config.globalProperties.Cesium = Cesium 18 | app.config.globalProperties.mars3d = mars3d 19 | 20 | // mars3d基础项目 21 | MarsUIInstall(app) 22 | app.use(injectState(store), key) 23 | 24 | return app 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /mock/demo/select-demo.ts: -------------------------------------------------------------------------------- 1 | import { MockMethod } from 'vite-plugin-mock'; 2 | import { resultSuccess } from '../_util'; 3 | 4 | const demoList = (keyword, count = 20) => { 5 | const result = { 6 | list: [] as any[], 7 | }; 8 | for (let index = 0; index < count; index++) { 9 | result.list.push({ 10 | name: `${keyword ?? ''}选项${index}`, 11 | id: `${index}`, 12 | }); 13 | } 14 | return result; 15 | }; 16 | 17 | export default [ 18 | { 19 | url: '/basic-api/select/getDemoOptions', 20 | timeout: 1000, 21 | method: 'get', 22 | response: ({ query }) => { 23 | const { keyword, count } = query; 24 | console.log(keyword); 25 | return resultSuccess(demoList(keyword, count)); 26 | }, 27 | }, 28 | ] as MockMethod[]; 29 | -------------------------------------------------------------------------------- /src/router/routes/modules/demo/flow.ts: -------------------------------------------------------------------------------- 1 | import type { AppRouteModule } from '@/router/types'; 2 | 3 | import { LAYOUT } from '@/router/constant'; 4 | import { t } from '@/hooks/web/useI18n'; 5 | 6 | const charts: AppRouteModule = { 7 | path: '/flow', 8 | name: 'FlowDemo', 9 | component: LAYOUT, 10 | redirect: '/flow/flowChart', 11 | meta: { 12 | orderNo: 5000, 13 | icon: 'tabler:chart-dots', 14 | title: t('routes.demo.flow.name'), 15 | }, 16 | children: [ 17 | { 18 | path: 'flowChart', 19 | name: 'flowChartDemo', 20 | component: () => import('@/views/demo/comp/flow-chart/index.vue'), 21 | meta: { 22 | title: t('routes.demo.flow.flowChart'), 23 | }, 24 | }, 25 | ], 26 | }; 27 | 28 | export default charts; 29 | -------------------------------------------------------------------------------- /src/marsgis/widgets/basic/manage-basemap/map.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 底图控制 3 | * @copyright 火星科技 mars3d.cn 4 | * @author 火星渣渣灰 2022-01-10 5 | */ 6 | import * as mars3d from "mars3d" 7 | 8 | const Cesium = mars3d.Cesium 9 | let map: mars3d.Map // 地图对象 10 | 11 | // 初始化当前业务 12 | export function onMounted(mapInstance: mars3d.Map): void { 13 | map = mapInstance // 记录map 14 | } 15 | 16 | // 释放当前业务 17 | export function onUnmounted(): void { 18 | map = null 19 | } 20 | 21 | export function changeBaseMaps(id: string) { 22 | map.basemap = id 23 | } 24 | 25 | export function changeTerrain(value: boolean) { 26 | map.hasTerrain = value 27 | } 28 | 29 | export function getLayers() { 30 | return { 31 | baseMaps: map.getBasemaps(true), 32 | hasTerrain: map.hasTerrain 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- 1 | declare interface Fn { 2 | (...arg: T[]): R; 3 | } 4 | 5 | declare interface PromiseFn { 6 | (...arg: T[]): Promise; 7 | } 8 | 9 | declare type RefType = T | null; 10 | 11 | declare type LabelValueOptions = { 12 | label: string; 13 | value: any; 14 | [key: string]: string | number | boolean; 15 | }[]; 16 | 17 | declare type EmitType = ReturnType; 18 | 19 | declare type TargetContext = '_self' | '_blank'; 20 | 21 | declare interface ComponentElRef { 22 | $el: T; 23 | } 24 | 25 | declare type ComponentRef = ComponentElRef | null; 26 | 27 | declare type ElRef = Nullable; 28 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/subscribeReVisible.ts: -------------------------------------------------------------------------------- 1 | import { isBrowser } from './isBrowser'; 2 | import { isDocumentVisible } from './isDocumentVisible'; 3 | 4 | type Listener = () => void; 5 | 6 | const listeners: Listener[] = []; 7 | 8 | if (isBrowser) { 9 | const revalidate = () => { 10 | if (!isDocumentVisible()) return; 11 | for (let i = 0; i < listeners.length; i++) { 12 | const listener = listeners[i]; 13 | listener(); 14 | } 15 | }; 16 | window.addEventListener('visibilitychange', revalidate, false); 17 | } 18 | 19 | export default function subscribe(listener: Listener) { 20 | listeners.push(listener); 21 | return function unsubscribe() { 22 | const index = listeners.indexOf(listener); 23 | listeners.splice(index, 1); 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /packages/hooks/src/useRequest/utils/cachePromise.ts: -------------------------------------------------------------------------------- 1 | type CachedKey = string | number; 2 | 3 | const cachePromise = new Map>(); 4 | 5 | export const getCachePromise = (cacheKey: CachedKey) => { 6 | return cachePromise.get(cacheKey); 7 | }; 8 | 9 | export const setCachePromise = (cacheKey: CachedKey, promise: Promise) => { 10 | // Should cache the same promise, cannot be promise.finally 11 | // Because the promise.finally will change the reference of the promise 12 | cachePromise.set(cacheKey, promise); 13 | 14 | // no use promise.finally for compatibility 15 | promise 16 | .then((res) => { 17 | cachePromise.delete(cacheKey); 18 | return res; 19 | }) 20 | .catch(() => { 21 | cachePromise.delete(cacheKey); 22 | }); 23 | }; 24 | -------------------------------------------------------------------------------- /src/views/demo/comp/strength-meter/index.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 18 | 25 | -------------------------------------------------------------------------------- /src/layouts/iframe/index.vue: -------------------------------------------------------------------------------- 1 | 12 | 24 | -------------------------------------------------------------------------------- /src/api/sys/model/userModel.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description: Login interface parameters 3 | */ 4 | export interface LoginParams { 5 | username: string; 6 | password: string; 7 | } 8 | 9 | export interface RoleInfo { 10 | roleName: string; 11 | value: string; 12 | } 13 | 14 | /** 15 | * @description: Login interface return value 16 | */ 17 | export interface LoginResultModel { 18 | userId: string | number; 19 | token: string; 20 | roles: RoleInfo[]; 21 | } 22 | 23 | /** 24 | * @description: Get user information return value 25 | */ 26 | export interface GetUserInfoModel { 27 | roles: RoleInfo[]; 28 | // 用户id 29 | userId: string | number; 30 | // 用户名 31 | username: string; 32 | // 真实名字 33 | realName: string; 34 | // 头像 35 | avatar: string; 36 | // 介绍 37 | desc?: string; 38 | } 39 | -------------------------------------------------------------------------------- /src/components/SimpleMenu/src/components/types.ts: -------------------------------------------------------------------------------- 1 | import { Ref } from 'vue'; 2 | 3 | export interface Props { 4 | theme: string; 5 | activeName?: string | number | undefined; 6 | openNames: string[]; 7 | accordion: boolean; 8 | width: string; 9 | collapsedWidth: string; 10 | indentSize: number; 11 | collapse: boolean; 12 | activeSubMenuNames: (string | number)[]; 13 | } 14 | 15 | export interface SubMenuProvider { 16 | addSubMenu: (name: string | number, update?: boolean) => void; 17 | removeSubMenu: (name: string | number, update?: boolean) => void; 18 | removeAll: () => void; 19 | sliceIndex: (index: number) => void; 20 | isRemoveAllPopup: Ref; 21 | getOpenNames: () => (string | number)[]; 22 | handleMouseleave?: Fn; 23 | level: number; 24 | props: Props; 25 | } 26 | -------------------------------------------------------------------------------- /src/layouts/default/header/components/user-dropdown/DropMenuItem.vue: -------------------------------------------------------------------------------- 1 | 9 | 25 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/mars-dropdown/dropdown.less: -------------------------------------------------------------------------------- 1 | // 下拉菜单 2 | .mars-dropdown-menu { 3 | .ant-dropdown-menu { 4 | border-bottom: 1px solid #008aff70; 5 | border-left: 1px solid #008aff70; 6 | border-right: 1px solid #008aff70; 7 | .mars-drop-bg(); 8 | .mars-icon { 9 | vertical-align: middle; 10 | margin-right: 4px; 11 | } 12 | } 13 | 14 | .ant-dropdown-menu-title-content { 15 | color: var(--mars-text-color); 16 | } 17 | 18 | .ant-dropdown-menu-item, 19 | .ant-dropdown-menu-submenu-title { 20 | &:hover { 21 | background-color: var(--mars-select-bg) !important; 22 | } 23 | .ant-upload { 24 | color: var(--mars-text-color); 25 | } 26 | } 27 | .ant-dropdown-menu-submenu-title { 28 | padding: 6px 20px !important; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/components/Table/src/helper.ts: -------------------------------------------------------------------------------- 1 | import { ROW_KEY } from './const'; 2 | import type { BasicTableProps } from './types/table'; 3 | 4 | export function parseRowKey( 5 | rowKey: BasicTableProps['rowKey'], 6 | record: RecordType, 7 | autoCreateKey?: boolean, 8 | ): number | string { 9 | if (autoCreateKey) { 10 | return ROW_KEY; 11 | } else { 12 | if (typeof rowKey === 'string') { 13 | return rowKey; 14 | } else if (rowKey) { 15 | return rowKey(record); 16 | } else { 17 | return ROW_KEY; 18 | } 19 | } 20 | } 21 | 22 | export function parseRowKeyValue( 23 | rowKey: BasicTableProps['rowKey'], 24 | record: RecordType, 25 | autoCreateKey?: boolean, 26 | ): number | string { 27 | return record[parseRowKey(rowKey, record, autoCreateKey)]; 28 | } 29 | -------------------------------------------------------------------------------- /src/views/hooks/request/mock-api.ts: -------------------------------------------------------------------------------- 1 | import Mock from 'mockjs'; 2 | 3 | export async function imitateApi(username?: string, pass: boolean = true): Promise { 4 | return new Promise((resolve, reject) => { 5 | setTimeout(() => { 6 | if (pass) { 7 | resolve(username ?? Mock.mock('@name')); 8 | } else { 9 | reject(new Error(`Failed to modify username: ${username}`)); 10 | } 11 | }, 1250); 12 | }); 13 | } 14 | 15 | export async function getArticle( 16 | keyword?: string, 17 | ): Promise<{ data: string; time: number; keyword?: string }> { 18 | return new Promise((resolve) => { 19 | setTimeout(() => { 20 | resolve({ 21 | data: Mock.mock('@paragraph'), 22 | time: new Date().getTime(), 23 | keyword, 24 | }); 25 | }, 1000); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /src/utils/uuid.ts: -------------------------------------------------------------------------------- 1 | const hexList: string[] = []; 2 | for (let i = 0; i <= 15; i++) { 3 | hexList[i] = i.toString(16); 4 | } 5 | 6 | export function buildUUID(): string { 7 | let uuid = ''; 8 | for (let i = 1; i <= 36; i++) { 9 | if (i === 9 || i === 14 || i === 19 || i === 24) { 10 | uuid += '-'; 11 | } else if (i === 15) { 12 | uuid += 4; 13 | } else if (i === 20) { 14 | uuid += hexList[(Math.random() * 4) | 8]; 15 | } else { 16 | uuid += hexList[(Math.random() * 16) | 0]; 17 | } 18 | } 19 | return uuid.replace(/-/g, ''); 20 | } 21 | 22 | let unique = 0; 23 | export function buildShortUUID(prefix = ''): string { 24 | const time = Date.now(); 25 | const random = Math.floor(Math.random() * 1000000000); 26 | unique++; 27 | return prefix + '_' + random + unique + String(time); 28 | } 29 | -------------------------------------------------------------------------------- /public/resource/tinymce/skins/ui/oxide/skin.shadowdom.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} 8 | -------------------------------------------------------------------------------- /public/resource/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} 8 | -------------------------------------------------------------------------------- /src/views/demo/comp/scroll/index.vue: -------------------------------------------------------------------------------- 1 | 16 | 20 | 27 | -------------------------------------------------------------------------------- /src/components/Button/src/props.ts: -------------------------------------------------------------------------------- 1 | const validColors = ['primary', 'error', 'warning', 'success', ''] as const; 2 | type ButtonColorType = (typeof validColors)[number]; 3 | 4 | export const buttonProps = { 5 | color: { 6 | type: String as PropType, 7 | validator: (v) => validColors.includes(v), 8 | default: '', 9 | }, 10 | loading: { type: Boolean }, 11 | disabled: { type: Boolean }, 12 | /** 13 | * Text before icon. 14 | */ 15 | preIcon: { type: String }, 16 | /** 17 | * Text after icon. 18 | */ 19 | postIcon: { type: String }, 20 | /** 21 | * preIcon and postIcon icon size. 22 | * @default: 14 23 | */ 24 | iconSize: { type: Number, default: 14 }, 25 | onClick: { type: [Function, Array] as PropType<(() => any) | (() => any)[]>, default: null }, 26 | text: { type: String }, 27 | }; 28 | -------------------------------------------------------------------------------- /src/components/ContextMenu/src/typing.ts: -------------------------------------------------------------------------------- 1 | export interface Axis { 2 | x: number; 3 | y: number; 4 | } 5 | 6 | export interface ContextMenuItem { 7 | label: string; 8 | icon?: string; 9 | hidden?: boolean; 10 | disabled?: boolean; 11 | handler?: Fn; 12 | divider?: boolean; 13 | children?: ContextMenuItem[]; 14 | } 15 | export interface CreateContextOptions { 16 | event: MouseEvent; 17 | icon?: string; 18 | styles?: any; 19 | items?: ContextMenuItem[]; 20 | } 21 | 22 | export interface ContextMenuProps { 23 | event?: MouseEvent; 24 | styles?: any; 25 | items: ContextMenuItem[]; 26 | customEvent?: MouseEvent; 27 | axis?: Axis; 28 | width?: number; 29 | showIcon?: boolean; 30 | } 31 | 32 | export interface ItemContentProps { 33 | showIcon: boolean | undefined; 34 | item: ContextMenuItem; 35 | handler: Fn; 36 | } 37 | -------------------------------------------------------------------------------- /src/router/routes/modules/demo/steps.ts: -------------------------------------------------------------------------------- 1 | import type { AppRouteModule } from '@/router/types'; 2 | 3 | import { LAYOUT } from '@/router/constant'; 4 | import { t } from '@/hooks/web/useI18n'; 5 | 6 | const steps: AppRouteModule = { 7 | path: '/steps', 8 | name: 'StepsDemo', 9 | component: LAYOUT, 10 | redirect: '/steps/index', 11 | meta: { 12 | orderNo: 90000, 13 | hideChildrenInMenu: true, 14 | icon: 'whh:paintroll', 15 | title: t('routes.demo.steps.page'), 16 | }, 17 | children: [ 18 | { 19 | path: 'index', 20 | name: 'StepsDemoPage', 21 | component: () => import('@/views/demo/steps/index.vue'), 22 | meta: { 23 | title: t('routes.demo.steps.page'), 24 | icon: 'whh:paintroll', 25 | hideMenu: true, 26 | }, 27 | }, 28 | ], 29 | }; 30 | 31 | export default steps; 32 | -------------------------------------------------------------------------------- /src/router/routes/modules/about.ts: -------------------------------------------------------------------------------- 1 | import type { AppRouteModule } from '@/router/types'; 2 | 3 | import { LAYOUT } from '@/router/constant'; 4 | import { t } from '@/hooks/web/useI18n'; 5 | 6 | const about: AppRouteModule = { 7 | path: '/about', 8 | name: 'About', 9 | component: LAYOUT, 10 | redirect: '/about/index', 11 | meta: { 12 | hideChildrenInMenu: true, 13 | icon: 'simple-icons:aboutdotme', 14 | title: t('routes.dashboard.about'), 15 | orderNo: 100000, 16 | }, 17 | children: [ 18 | { 19 | path: 'index', 20 | name: 'AboutPage', 21 | component: () => import('@/views/sys/about/index.vue'), 22 | meta: { 23 | title: t('routes.dashboard.about'), 24 | icon: 'simple-icons:aboutdotme', 25 | hideMenu: true, 26 | }, 27 | }, 28 | ], 29 | }; 30 | 31 | export default about; 32 | -------------------------------------------------------------------------------- /src/views/demo/feat/click-out-side/index.vue: -------------------------------------------------------------------------------- 1 | 13 | 28 | -------------------------------------------------------------------------------- /src/components/Table/src/hooks/useTableStyle.ts: -------------------------------------------------------------------------------- 1 | import type { ComputedRef } from 'vue'; 2 | import type { BasicTableProps, TableCustomRecord } from '../types/table'; 3 | import { unref } from 'vue'; 4 | import { isFunction } from '@/utils/is'; 5 | 6 | export function useTableStyle(propsRef: ComputedRef, prefixCls: string) { 7 | function getRowClassName(record: TableCustomRecord, index: number) { 8 | const { striped, rowClassName } = unref(propsRef); 9 | const classNames: string[] = []; 10 | if (striped) { 11 | classNames.push((index || 0) % 2 === 1 ? `${prefixCls}-row__striped` : ''); 12 | } 13 | if (rowClassName && isFunction(rowClassName)) { 14 | classNames.push(rowClassName(record, index)); 15 | } 16 | return classNames.filter((cls) => !!cls).join(' '); 17 | } 18 | 19 | return { getRowClassName }; 20 | } 21 | -------------------------------------------------------------------------------- /src/hooks/web/useDesign.ts: -------------------------------------------------------------------------------- 1 | import { useAppProviderContext } from '@/components/Application'; 2 | // import { computed } from 'vue'; 3 | // import { lowerFirst } from 'lodash-es'; 4 | export function useDesign(scope: string) { 5 | const values = useAppProviderContext(); 6 | // const $style = cssModule ? useCssModule() : {}; 7 | 8 | // const style: Record = {}; 9 | // if (cssModule) { 10 | // Object.keys($style).forEach((key) => { 11 | // // const moduleCls = $style[key]; 12 | // const k = key.replace(new RegExp(`^${values.prefixCls}-?`, 'ig'), ''); 13 | // style[lowerFirst(k)] = $style[key]; 14 | // }); 15 | // } 16 | return { 17 | // prefixCls: computed(() => `${values.prefixCls}-${scope}`), 18 | prefixCls: `${values.prefixCls}-${scope}`, 19 | prefixVar: values.prefixCls, 20 | // style, 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/mars-gui/index.ts: -------------------------------------------------------------------------------- 1 | export const components = { 2 | number: "mars-input-number", 3 | switch: "mars-switch", 4 | radio: "a-radio-group", 5 | checkbox: "a-checkbox-group", 6 | slider: "mars-slider", 7 | color: "mars-color-picker", 8 | select: "mars-select", 9 | textarea: "mars-textarea", 10 | input: "mars-input", 11 | inputGroup: "mars-input-group" 12 | } 13 | 14 | export interface GuiItem { 15 | type: keyof typeof components 16 | field: string 17 | label: string 18 | extra?: any 19 | extraWidth?: number 20 | extraType?: "string" | "custom" 21 | min?: number 22 | max?: number 23 | step?: number 24 | range?: boolean 25 | data?: any[] 26 | value?: string | boolean | number | any 27 | units?: string[] 28 | show?: boolean | ((data: any) => boolean) 29 | change?: (value: any, dataObj: any) => any 30 | } 31 | -------------------------------------------------------------------------------- /src/views/sys/redirect/index.vue: -------------------------------------------------------------------------------- 1 | 4 | 31 | -------------------------------------------------------------------------------- /packages/types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/types", 3 | "version": "1.0.0", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": { 6 | "url": "https://github.com/vbenjs/vue-vben-admin/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 11 | "directory": "packages/types" 12 | }, 13 | "license": "MIT", 14 | "sideEffects": false, 15 | "type": "module", 16 | "exports": { 17 | ".": { 18 | "default": "./src/index.ts" 19 | } 20 | }, 21 | "main": "./src/index.ts", 22 | "module": "./src/index.ts", 23 | "files": [ 24 | "dist" 25 | ], 26 | "scripts": { 27 | "//build": "pnpm unbuild", 28 | "//stub": "pnpm unbuild --stub", 29 | "clean": "pnpm rimraf .turbo node_modules dist", 30 | "lint": "pnpm eslint ." 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/components/Form/index.ts: -------------------------------------------------------------------------------- 1 | import BasicForm from './src/BasicForm.vue'; 2 | 3 | export * from './src/types/form'; 4 | export * from './src/types/formItem'; 5 | 6 | export { useComponentRegister } from './src/hooks/useComponentRegister'; 7 | export { useForm } from './src/hooks/useForm'; 8 | 9 | export { default as ApiSelect } from './src/components/ApiSelect.vue'; 10 | export { default as RadioButtonGroup } from './src/components/RadioButtonGroup.vue'; 11 | export { default as ApiTreeSelect } from './src/components/ApiTreeSelect.vue'; 12 | export { default as ApiTree } from './src/components/ApiTree.vue'; 13 | export { default as ApiRadioGroup } from './src/components/ApiRadioGroup.vue'; 14 | export { default as ApiCascader } from './src/components/ApiCascader.vue'; 15 | export { default as ApiTransfer } from './src/components/ApiTransfer.vue'; 16 | 17 | export { BasicForm }; 18 | -------------------------------------------------------------------------------- /src/router/routes/modules/form-design/main.ts: -------------------------------------------------------------------------------- 1 | import type { AppRouteModule } from '@/router/types'; 2 | 3 | import { LAYOUT } from '@/router/constant'; 4 | 5 | const permission: AppRouteModule = { 6 | path: '/form-designer', 7 | name: 'Form-designer', 8 | component: LAYOUT, 9 | meta: { 10 | orderNo: 10000, 11 | icon: 'ion:build-outline', 12 | title: '表单设计', 13 | }, 14 | children: [ 15 | { 16 | path: 'design', 17 | name: 'Design', 18 | meta: { 19 | title: '表单设计', 20 | }, 21 | component: () => import('@/views/form-design/index.vue'), 22 | }, 23 | { 24 | path: 'example1', 25 | name: 'Example1', 26 | meta: { 27 | title: '示例', 28 | }, 29 | component: () => import('@/views/form-design/examples/baseForm.vue'), 30 | }, 31 | ], 32 | }; 33 | 34 | export default permission; 35 | -------------------------------------------------------------------------------- /src/components/Table/src/components/editable/helper.ts: -------------------------------------------------------------------------------- 1 | import { ComponentType } from '../../types/componentType'; 2 | import { useI18n } from '@/hooks/web/useI18n'; 3 | 4 | const { t } = useI18n(); 5 | 6 | /** 7 | * @description: 生成placeholder 8 | */ 9 | export function createPlaceholderMessage(component: ComponentType) { 10 | if (component.includes('Input') || component.includes('AutoComplete')) { 11 | return t('common.inputText'); 12 | } 13 | if (component.includes('Picker')) { 14 | return t('common.chooseText'); 15 | } 16 | 17 | if ( 18 | component.includes('Select') || 19 | component.includes('Checkbox') || 20 | component.includes('Radio') || 21 | component.includes('Switch') || 22 | component.includes('DatePicker') || 23 | component.includes('TimePicker') 24 | ) { 25 | return t('common.chooseText'); 26 | } 27 | return ''; 28 | } 29 | -------------------------------------------------------------------------------- /src/marsgis/components/mars-ui/mars-input-group/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 28 | 33 | 34 | --------------------------------------------------------------------------------