3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
36 |
37 |
38 |
39 |
40 |
41 | 序号 |
42 | 姓名 |
43 | email |
44 | 创建时间 |
45 | 操作 |
46 |
47 |
48 |
49 |
50 | {{$index+1}} |
51 | {{item.name}} |
52 | {{item.email}} |
53 | {{item.created_at}} |
54 |
55 | 编辑
56 | 删除
57 | |
58 |
59 |
60 |
61 |
62 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
91 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var webpack = require('webpack');
3 | var HtmlWebpackPlugin = require('html-webpack-plugin');
4 | var ExtractTextPlugin = require("extract-text-webpack-plugin");
5 |
6 | var config = require('./config');
7 |
8 | module.exports = {
9 | entry: path.resolve(config.srcPath, 'main.js'),
10 | output:{
11 | path: 'dist',
12 | filename: 'js/[name]-[hash]-bundle.js'
13 | },
14 | resolve: {
15 | extensions: ['', '.js', '.vue']
16 | },
17 | module:{
18 | loaders:[
19 | {
20 | test:/\.vue$/,
21 | loader:'vue'
22 | },
23 | {
24 | test: /\.js?$/,
25 | loader: 'babel',
26 | query: {
27 | presets: ['es2015'],
28 | plugins: ["transform-runtime"],
29 | },
30 | exclude: /node_modules/
31 | },
32 | {
33 | test: /\.scss$/,
34 | loaders: [ 'style', 'css', 'sass' ]
35 | },
36 | {
37 | test:/\.css$/,
38 | loader: ExtractTextPlugin.extract("style-loader", "css-loader")
39 | },
40 | {
41 | test: /\.(woff2?|eot|ttf)(\?.*)?$/,
42 | loader: 'url',
43 | query: {
44 | limit: 10000,
45 | name: 'fonts/[name].[ext]'
46 | }
47 | },
48 | {
49 | test: /\.(png|jpg|gif|svg)(\?.*)?$/,
50 | loader: 'url',
51 | query: {
52 | limit: 10000,
53 | name: 'images/[name].[ext]'
54 | }
55 | }
56 | ]
57 | },
58 | plugins: [
59 | new ExtractTextPlugin('[name].css'),
60 | new HtmlWebpackPlugin({
61 | template: path.join(config.srcPath, 'index.html')
62 | }),
63 | new webpack.ProvidePlugin({
64 | $: "jquery",
65 | jQuery: "jquery",
66 | "window.jQuery": "jquery",
67 | "window.$": "jquery",
68 | })
69 | ],
70 | devServer: {
71 | proxy: {
72 | '/backend/*': {
73 | target: config.apiDomain,
74 | changeOrigin: true
75 | }
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------