Commit fd70340e by lishengfu

Merge branch 'master' of gitlab.corp.qinqinxiaobao.com:frontend_vue/qqxb-self-service

parents 9819eaae b7c20a82
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"oidc-client": "^1.10.1", "oidc-client": "^1.10.1",
"qs": "^6.9.4", "qs": "^6.9.4",
"qs.js": "^0.1.12", "qs.js": "^0.1.12",
"ts-loader": "^7.0.5",
"vant": "^2.8.3", "vant": "^2.8.3",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-axios": "^2.1.5", "vue-axios": "^2.1.5",
......
...@@ -79,5 +79,15 @@ export default [ ...@@ -79,5 +79,15 @@ export default [
path: '/paySlipsMonth', path: '/paySlipsMonth',
name: 'PaySlipsMonth', name: 'PaySlipsMonth',
component: () => import("@/views/PaySlipsMonth.vue") component: () => import("@/views/PaySlipsMonth.vue")
},
{
// 测试页面
path: '/test',
name: 'test',
component: () => import("@/views/test.vue"),
meta:{
title:'测试页面',
}
} }
] ]
\ No newline at end of file
<template>
<div class="home">
<van-button type="primary" ></van-button>
</div>
</template>
<script lang="ts">
import { Button } from "vant";
import { Component, Vue } from "vue-property-decorator";
Vue.use(Button);
@Component({
name: "Home",
})
export default class Home extends Vue {
private list: any = [];
created() {
this.$server.EmployeeService.getUserInfo({}).then(res => {
console.log(res);
});
}
}
</script>
\ No newline at end of file
const path = require("path"); const path = require("path");
const merge = require('webpack-merge');
const tsImportPluginFactory = require('ts-import-plugin');
module.exports = { module.exports = {
// 基本路径 // 基本路径
...@@ -40,7 +42,23 @@ module.exports = { ...@@ -40,7 +42,23 @@ module.exports = {
.use('ts-loader') .use('ts-loader')
.loader('ts-loader') .loader('ts-loader')
.tap(options => { .tap(options => {
return Object.assign(options || {}, { allowTsInNodeModules: true }); options = merge(options, {
transpileOnly: true,
getCustomTransformers: () => ({
before: [
tsImportPluginFactory({
libraryName: "vant",
libraryDirectory: "es",
style: true
})
]
}),
compilerOptions: {
module: 'es2015'
}
});
return options;
//return Object.assign(options || {}, { allowTsInNodeModules: true });
}); });
}, },
configureWebpack: config => { configureWebpack: config => {
...@@ -63,7 +81,8 @@ module.exports = { ...@@ -63,7 +81,8 @@ module.exports = {
// css预设器配置项 // css预设器配置项
loaderOptions: {}, loaderOptions: {},
// 启用 CSS modules for all css / pre-processor files. // 启用 CSS modules for all css / pre-processor files.
modules: false modules: false,
//requireModuleExtension
}, },
// use thread-loader for babel & TS in production build // use thread-loader for babel & TS in production build
// enabled by default if the machine has more than 1 cores // enabled by default if the machine has more than 1 cores
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment