课程思维导图:
设置镜像源
npm config set registry https://registry.npm.taobao.org
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-saas
图片路径保存到数据库时存相对地址,这样做服务器迁移的时候就没有太多障碍
npm 修改库地址
npm config set registry https://registry.npm.taobao.org
npm config set sass_binary_site https://npm.taobao.org/mirros/node-sass
qinchenju.com/island
imooc 123456
root lincms123
ok
项目演示地址:qinchenju.com/island
前期配置
21
url调用service层,service调用Dao层,Dao调用Model层
我的第二篇笔记
我的第一篇笔记
models/movie.js
import { Sequelize, Model } from 'sequelize'
import sequelize from '../libs/db'
class Movie extends Model {
}
Movie.init(
{
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
image: {
type: Sequelize.STRING(64)
},
content: {
type: Sequelize.STRING(300),
allowNull: true
},
pubdate: {
type: Sequelize.DATE,
allowNull: true,
},
fav_nums: {
type: Sequelize.INTEGER,
defaultValue: 0
},
title: {
type: Sequelize.STRING(50)
},
type: {
type: Sequelize.INTEGER
},
status: {
type: Sequelize.INTEGER
}
},
{
// 定义表名
tableName: 'movie',
// 定义模型名称
modelName: 'movie',
// 启用软删除
paranoid: true,
// 自动写入时间
timestamps: true,
// 重命名时间字段
createdAt: 'created_at',
updatedAt: 'updated_at',
deletedAt: 'deleted_at',
sequelize
}
)
export { Movie as MovieModel }
切换淘宝镜像源
npm config set registry https://registry.npm.taobao.org
安装node sass的镜像地址
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass
2222222222
1111
查看全部
开始:开源框架
454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW454GFGFDGFDTRETRBVGCXBCNBGFYTEW
65
7
6767
878
78
8
8
88
7
8
8
78
7
8
7
111222
2
23
3
4
5
65
6
76
7
7
7
7
7
8
8
87
validators->content.js 内容1
最后还有个导出 export {AddContentValidator}
评论啦 笔记啦测试数据
github.com/TaleLin
开源项目 收藏网址
https://www.cnblogs.com/zyw-205520/p/4771253.html
https://www.imooc.com/video/22958
<template>
<div class="container">
<div class="title">设备类型列表</div>
<div class="add-button">
<el-button type="primary" >新增设备类型</el-button>
</div>
<div class="table-container ">
<el-table :data="devlist"></el-table>
</div>
</div>
</template>
<script>
</script>
<style scoped lang="scss">
.container {
.title {
height: 59px;
line-height: 59px;
color: $parent-title-color;
font-size: 16px;
font-weight: 500;
text-indent: 49px;
border-bottom: 1px solid #bebebe;
}
.add_button {
padding: 20px 40px;
}
.table-container {
padding: 0 40px 20px 40px;
}
}
</style>
资料提取。。。。
链接: https://pan.baidu.com/s/1Xh2PI8B9GVGJdwtcbMIUMw 提取码: 8x7u