
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@lcap/core-template
Advanced tools
基础包core目录下路径别名@都统一改用相对路径,脱离构建工具依赖
export { initService as initAuthService } from './auth'
export { initService as initConfigurationService } from "./configuration";
export { initService as initIoService } from './io'
export { initService as initLowauthService } from "./lowauth";
export { initService as initProcessService } from "./process";
-- 方法名 -- | -- PC -- | -- H5 -- |
---|---|---|
compareKeyboardInput | ✅ | |
getIsMiniApp | ✅ | |
getWeChatOpenid | ✅ | |
getWeChatHeadImg | ✅ | |
getWeChatNickName | ✅ | |
navigateToUserInfo | ✅ | |
logout | ⚠️ | ⚠️ |
setI18nLocale | ⚠️ | ⚠️ |
getI18nList | ⚠️ | ⚠️ |
hasAuth | ⚠️ | ⚠️ |
downloadFile | ✅ | |
downloadFiles | ✅ | |
getUserList | ✅ |
// config.js
{
getFrontendVariables: () => {
return {
frontendVariables: {},
localCacheVariableSet: new Set(),
};
},
$global: {},
}
function fixIOSDateString(value) {
// 判断是否ios系统
if (!/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
return value;
}
if (/^\d{4}-\d{1,2}-\d{1,2}(\s\d{1,2}:\d{1,2}:\d{1,2})?$/.test(value)) {
return value.replace(/-/g, "/");
}
return value;
}
// main入口文件
import '@lcap/mobile-ui/dist-theme/index.css';
import metaData from './metaData.json';
import platformConfig from './platform.config.json';
import { routes } from '@lcap/base-core/router/routes';
import cloudAdminDesigner from './init';
import { setConfig } from '@lcap/base-core';
// 实现以下内容, 具体调用处在core目录下搜索
setConfig({
$global: {}, // 参照plugins/dataTypes对比差异
Toast: {
show: (message, stack) => void 0,
error: (message, stack) => void 0,
},
getFrontendVariables: () => {
return {
frontendVariables: {},
localCacheVariableSet: new Set(),
};
},
destination: () => void 0,
createRouter: (routes) => void 0,
getTitleGuard: (appConfig) => (to, from, next) => void 0,
});
cloudAdminDesigner.init(platformConfig?.appConfig, platformConfig, routes, metaData);
init.js中都是用core
import filters from '@lcap/base-core/filters';
// import { AuthPlugin, DataTypesPlugin, LogicsPlugin, RouterPlugin, ServicesPlugin, UtilsPlugin } from '@/plugins';
import { AuthPlugin, DataTypesPlugin, LogicsPlugin, RouterPlugin, ServicesPlugin, UtilsPlugin } from '@lcap/base-core/plugins';
import { filterRoutes, parsePath } from '@lcap/base-core/utils/route';
import { getBasePath } from '@lcap/base-core/utils/encodeUrl';
import { filterAuthResources, findNoAuthView } from '@lcap/base-core/router/guards/auth';
FAQs
基础包core目录下路径别名@都统一改用相对路径,脱离构建工具依赖
The npm package @lcap/core-template receives a total of 0 weekly downloads. As such, @lcap/core-template popularity was classified as not popular.
We found that @lcap/core-template demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 20 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.