UNPKG

@techui/prime

Version:

TechUI Prime is a paid component library developed based on Vue3, which includes three component libraries: TehcUI Admin, TechUI Base, and TechUI Scifi. These three component libraries can be used independently and are free.

153 lines (140 loc) 4.2 kB
import "@techui/icons"; import "./dist/index.css"; import { dynamicEcharts, toComps, toDirective, toGlobal, toRoot } from "./dist/index.js"; const initComps=(app,features,debug=false)=>{ const {echarts=false,admin=false,}=features app.use(toGlobal.$gAttention) // app.use(toGlobal.$gContextMenu) app.use(toGlobal.$gMask) app.use(toGlobal.$gLoading) app.use(toGlobal.$gPopover) app.use(toGlobal.$gPopoverDirectiveCloseAll) app.directive('tuiMenu', toDirective.$dMenu) app.directive('tuiResize', toDirective.$dResize) app.directive('tuiDrag', toDirective.$dDrag) app.directive('tuiPopover', toDirective.$dPopover) app.directive('tuiCursorTip', toDirective.$dCursorTip) app.directive('tuiVcid', toDirective.$dVcid) const tService=toRoot.tuiService(admin,debug) app.config.globalProperties.$tBus = toRoot.tuiBus app.config.globalProperties.$tService = tService app.config.globalProperties.$tState = tService.state app.config.globalProperties.isActAdminFeatures = admin app.config.globalProperties.isActEchartsFeatures = echarts app.config.globalProperties.isActAdvFeatures = true dynamicEcharts(app,echarts); toComps.forEach((com) => { if(com.name){ const isLayout = com.name.includes("TuiAdminLayout"); const isEcharts = com.name.includes("Echarts"); const shouldSkip = (isLayout && !admin) || (isEcharts && !echarts); if (!shouldSkip) { app.component(com.name, com); } }else{ console.warn("TechUI Warning: Missing component name",com); } }); }; import { initLang } from "@techui/utils"; import init, { coreInfo, techuiCoreInit } from './core/core.js'; export { adptCalc, bar3DPathGen, cidGen, cidVaild, coreConsoleError, coreConsoleInfo, coreConsoleWarn, cssVarGen, floatInfo, getEnv, getVer, md5Enc, openDec, openEnc, pieArcPathGen, //button scifiButtonA1, scifiButtonA2, scifiButtonA3, scifiButtonA4, scifiButtonA5, //deco scifiDecoA1, scifiDecoB1, scifiDecoB2, scifiDecoB3, scifiDecoD1, //geometry scifiGeomeParallelogram, scifiGeomeRectangle, scifiGeomeTrapezoid, scifiGeomeTriangle, scifiGeomHexagon, //header scifiHeaderA1, scifiHeaderA2, scifiHeaderA3, scifiHeaderA4, //panel scifiPanelA1, scifiPanelA2, scifiPanelA3, scifiPanelB1, scifiPanelB2, scifiPanelB3, scifiPanelB4, scifiPanelDV1, scifiPanelDV2, scifiPanelDV3, scifiPanelDV4, scifiPanelDV5, scifiPanelDV6, scifiPanelDV7, scifiPanelDV8, scifiPanelDV9, //panel title scifiPanelTitleA1, scifiPanelTitleA2, scifiPanelTitleA3, svgPatBlocks, svgPatCircuitDiagram, svgPatCircularOverlayA, svgPatCircularOverlayB, svgPatContourLine, svgPatCrosshairA, svgPatCrosshairB, svgPatCubeA, svgPatCubeB, svgPatCubeC, svgPatDiamondFlipped, svgPatDiamondLattice, svgPatDiamondPixel, svgPatDiamondWeaving, svgPatDots, svgPatHexagonA, svgPatHexagonB, svgPatHexagonC, svgPatHexagonCurved, svgPatHexagonD, svgPatLineGrid, svgPatLineWeaving, svgPatMazeA, svgPatMazeB, svgPatMazeC, svgPatMountains, svgPatRain, svgPatRectWeavingA, svgPatRectWeavingB, svgPatRectWeavingC, svgPatShellA, svgPatShellB, svgPatSlashParallel, svgPatTest, svgPatTotem, svgPatTriangleA, svgPatTriangleB, svgPatWaveA, svgPatWaveB, svgPatZigzagA, svgPatZigzagB, svgSpinBarsA, svgSpinBarsB, svgSpinBarsC, svgSpinBlocksA, svgSpinBlocksB, svgSpinBlocksC, svgSpinClock, svgSpinPointA, svgSpinPointB, svgSpinPointC, svgSpinPulseDotA, svgSpinPulseDotB, svgSpinPulseDotC, svgSpinPulseRingA, svgSpinPulseRingB, svgSpinPulseRingC, svgSpinRingA, svgSpinRingB, svgSpinRingC, t3dCoeffCalc, t3dUpdateOrient, t3dUpdateRotate } from './core/core.js'; const coreEnt=async ({ app, license=null, licenseConfig=null, keychain=[], features={}, debug=false })=>{ initLang();//system language await init(); window.tuiCoreInfo=coreInfo techuiCoreInit(license,licenseConfig,coreEnt.toString(),keychain); app.use(initComps,features,debug) }; export default coreEnt