快速搭建VUE项目工具类的基本库,主要用于每个功能页面独立生成html,不使用vue单页面功能。
npm install fastchar-appjs
npm i fastchar-appjs
`Package.json配置
`
"dependencies": {
"fastchar-appjs": "^1.2.42", //具体版本以npm库更新为准
}
`
$3
`
import {FastServer} from "fastchar-appjs";FastServer.Croshe.get("接口地址", {
orderId: 1
}).then(result => {
if (result.isSuccess()) {
console.error(result.getData());
} else {
console.error(result.getMessage());
}
});
`
$3
https://www.npmjs.com/package/fastchar-appjs$3
`
const FastVue = require("fastchar-appjs/src/cjs/FastVue");const result = FastVue.System.getDefaultVueConfig(__dirname, {
projectTitle: "项目名称",
projectPagesDir: ["src/user_pages"],
projectOutDir: "dist",
autoCreateProjectIndexPage: false,
autoCreatePageConfigFile: true,
finalParams: {
mobile: false,
client: "vue",
userId: FastVue.System.isVueCliServerBuild() ? undefined : 3
},
globalConfig: {
mainUrl: "http://192.168.0.105:8888/test/"
},
injectJsFiles: ["src/js/fast-security.js", "src/js/iconfont.js"],
clientStrict: true
});
module.exports = result;
``