1.0.27 • Published 3 months ago

fast-vue-multi-pages v1.0.27

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

fast-vue-multi-pages

快速搭建VUE项目工具类的基本库,主要用于每个功能页面独立生成html,不使用vue单页面功能。

Install

npm i fast-vue-multi-pages

Package.json配置

"dependencies": {
    "fast-vue-multi-pages": "^1.0.0", //具体版本以npm库更新为准
}

配置vue.config.js 文件,快速配置VUE项目代码,复制如下代码:

const {FastVueMultiPages} = require("fast-vue-multi-pages/vue");

const result = FastVueMultiPages.getDefaultVueConfig(__dirname, {
    projectTitle: "项目标题",
    projectPagesDir: ["src/user_pages"],
    projectOutDir: "dist",
    autoCreateProjectIndexPage: false,
    autoCreatePageConfigFile: true,
    buildLevel: 1,
    httpFinalParams:  {
        userTest: true,
    },
    httpBeforeRequest: function (config) {
        console.log("httpBeforeRequest", config);
    },
    httpAfterRequest: function (response) {
        console.log("httpAfterRequest", response);
    },
    globalConfig: {},
    injectJsFiles: ["src/js/iconfont.js"],
    clientStrict: true
});

module.exports = result;

使用默认工具类

引用库之后,在项目中导入即可,例如:

import {FastVueMultiTool} from "fast-vue-multi-pages";

FastVueMultiTool.Http.get("接口地址", {
  orderId: 1
}).then(result => {
  if (result.isSuccess()) {
    console.error(result.getData());
  } else {
    console.error(result.getMessage());
  }
});
1.0.26

3 months ago

1.0.25

3 months ago

1.0.24

3 months ago

1.0.27

3 months ago

1.0.23

4 months ago

1.0.22

7 months ago

1.0.21

7 months ago

1.0.19

9 months ago

1.0.20

9 months ago

1.0.18

10 months ago

1.0.17

10 months ago

1.0.16

10 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago