dai-vue-module-m

d

2022/4/13 19:22:09

更改列表

api.js 8(+4 -4)

routes.js 4(+2 -2)

详细信息

api.js 8(+4 -4)

diff --git a/api.js b/api.js
index 1ad3eb2..84e8abf 100644
--- a/api.js
+++ b/api.js
@@ -1,14 +1,14 @@
-var test = {
+var module__name_test = {
     $config: {
         /**读取配置文件中 service 字段,默认 default*/
         service: 'default',
         /**基础URL */
-        baseURL: '/test/'
+        baseURL: '/module__name_test/'
         /**请求方式,不配置为 payload*/
         // requestType: 'formData'
     },
     /**
-     * 接口方法  在 vue 页面中可以使用方法  await this.$api.test.test({});
+     * 接口方法  在 vue 页面中可以使用方法  await this.$api.module__name_test.test({});
      * @param {Object} data
      * @returns
      */
@@ -16,4 +16,4 @@ var test = {
         return await this.$get('test', data);
     }
 };
-export { test };
+export { module__name_test };

routes.js 4(+2 -2)

diff --git a/routes.js b/routes.js
index a5edda7..1011fc8 100644
--- a/routes.js
+++ b/routes.js
@@ -1,7 +1,7 @@
 const routes = [
     {
-        path: '/name-test',
-        component: { template: '<router-view class="module-test"></router-view>' },
+        path: '/module__name_test',
+        component: { template: '<router-view class="module__module_test"></router-view>' },
         children: [
             { path: 'index', component: () => import('./page/index.vue'), meta: { pageName: '模块模板' } }
         ]
diff --git a/static/style/style.less b/static/style/style.less
index d3f6377..c96fd0a 100644
--- a/static/style/style.less
+++ b/static/style/style.less
@@ -1,3 +1,3 @@
 //模块内样式
-.module-test {
+.module__module_test {
 }