1 Star 0 Fork 0

谢森林 / vue_template_cms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

这是一VUE结合webpack的项目

​ 项目运行记得初始化 npm init

制作首页App组件

  1. 完成 Header 区域,使用的是 Mint-UI 中的Header组件
  2. 制作底部的 Tabbar 区域,使用的是 MUI 的 Tabbar.html
  • 在制作 购物车 小图标的时候,操作会相对多一些:
  • 先把 扩展图标的 css 样式,拷贝到 项目中
  • 拷贝 扩展字体库 ttf 文件,到项目中
  • 为 购物车 小图标 ,添加 如下样式 mui-icon mui-icon-extra mui-icon-extra-cart
  1. 要在 中间区域放置一个 router-view 来展示路由匹配到的组件

改造 tabbar 为 router-link

设置新闻资讯

1. 添加news组件
    1. 新闻列表
        使用mui中的mui-table-view的代码块
        cnpm install moment --save-dev 时间格式插件
       
        添加vue过滤器
        Vue.filter('formart',function(date,pattern="YYYY-MM-DD HH:mm:ss"){
                return moment(date).format(pattern)
        }) 


    2. 新闻详情
        传递文章的id加载到路由路由的值的传递
        根据路由调用接口查找数据
        /HomeContainer/newinfo/2 传递id值
        {path:'/HomeContainer/newinfo/:id',component:newinfo}  //接受参数
        this.id=this.$route.params.id; //设置id值

    3. 留言子模块
        编写页面
        接收id值接收数据,以及渲染页面
        点击更多查询数据
            默认查询第一页数据
            点击更多,第一页的数据还在
        点击提交评论
            发送请求,提交数据,渲染页面

        操作步骤:
        添加子模块
        <comment-box :id="this.id"></comment-box>  //引用子模块,给子模块传递数据
         import subcommnet from '../subcomment/comment.vue';//导入子模块
            export default{
                data(){
                    return {
                        id:'',
                        data:new Date(),
                        count:0
                    }
                },
                created(){
                this.show();
                },
                methods:{
                    show(){
                        this.id=this.$route.params.id;
                    }
                },
                components:{      //添加子模块
                    "comment-box": subcommnet
                }
            }  
            props:["id"]//子模块声明变量,接受父传过来的数据


4.图片分享 分类滑动栏:使用mui中组件 tab-top-webview-main 又兼任性问题 1.导入js port mui from '../../../lib/mui/js/mui.min.js' 在 组件的 mounted 事件钩子中,注册 mui 的滚动事件: mounted() { // 需要在组件的 mounted 事件钩子中,注册 mui 的 scroll 滚动事件 mui('.mui-scroll-wrapper').scroll({ deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006 }); } 移除严格模式 安装 babel-plugin-transform-remove-strict-mode 配置 "plugins": ["transform-remove-strict-mode"]

    图片的缩略图 插件 vue-preview


5.编写商品页面


The MIT License (MIT) Copyright (c) 2014 connors and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Vue 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/forestxie/vue_template_cms.git
git@gitee.com:forestxie/vue_template_cms.git
forestxie
vue_template_cms
vue_template_cms
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891