TODO:搭建Laravel VueJS SemanticUI

TODO:搭建Laravel VueJS SemanticUI

Laravel是一套简洁、优雅的PHP开发框架(PHP Web Framework)。可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。

VueJS是一款渐进式JavaScript框架,有着易用,灵活,高效的有点。简单小巧的核心,渐进式技术栈,足以应付任何规模的应用。

SematicUI 是完全语义化的前端界面开发框架,跟 Bootstrap 和 Foundation 比起来,还是有些不同的,在功能特性上、布局设计上、用户体验上均存在很多差异。易于学习和使用,对于社区贡献来说是比较开放的。有一个非常好的按钮实现,情态动词,和进度条。在许多功能上使用图标字体。

1. 创建Laravel项目

composer create-project laravel/laravel 项目名称,网速有点慢要小等

2. 运行npm install安装nodejs对应的包

3. 配置bower,bower是啥?Bower是一个客户端技术的软件包管理器,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源。在这里主要用于管理html5shiv,semantic。需要添加两个配置bower.json管理要用的js包,还有一个配置文件.bowerrc用于管理生成的文件夹路径。安装方法很简单npm直接可以安装(npm install bower);项目安装bower配置的网络资源,则运行bower install。

4. 依赖与nodejs的环境,安装这些工具都很便捷。Laravel自动gulp构建工具的配置文件,执行安装好gulp,即可使用gulp进行构建项目,非常方便。

5. 访问出现

查看日志

拷贝.env文件重新执行php artisan key:generate生成APP_KEY

6. 默认laravel已经自带集成vuejs

接下来把这个Example显示在页面上

在welcome.blade.php加入以下代码

执行gulp自动构建编译代码

启动服务访问首页即可看到example组件

7. 引入semantic-ui,在Example.vue加入semantic对应的class

在首页也引入semantic.css

访问后的效果如图

到此一个简单的Laravel+VueJS+Semantic-UI的集成开发环境搭建成功了,有兴趣的朋友可以试试


wxgzh:ludong86

qrcode_for_gh_6bb1f39ae99c_258-1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
填充下面这个程序中所有出现// TODO: fill the code这个任务的地方#include <iostream> #include <cstring> #include "ourstring.h" #include "strlib.h" using namespace std; OurString::OurString(){ // TODO: fill the code } OurString::OurString(const char *str){ // TODO: fill the code } OurString::OurString(const OurString &dstr){ // TODO: fill the code } OurString::~OurString(){ // TODO: fill the code } string OurString::toString() const{ // TODO: fill the code } OurString OurString::subStr(unsigned int start, unsigned int n) const{ // TODO: fill the code } bool OurString::operator > (const OurString &dstr) const{ // TODO: fill the code } bool OurString::operator < (const OurString &dstr) const{ // TODO: fill the code } bool OurString::operator == (const OurString &dstr) const{ // TODO: fill the code } unsigned int OurString::length () const{ // TODO: fill the code } const OurString& OurString::operator = (const OurString &dstr){ // TODO: fill the code } const OurString& OurString::operator = (const char *str){ // TODO: fill the code } char& OurString::operator[](int index){ // TODO: fill the code } const OurString OurString::operator + (const OurString &dstr) const{ // TODO: fill the code } const OurString OurString::operator + (const char *str) const{ // TODO: fill the code } const OurString& OurString::operator += (const OurString &dstr){ // TODO: fill the code } const OurString& OurString::operator += (const char *str){ // TODO: fill the code } ostream & operator<<(ostream &os, const OurString &dstr){ // TODO: fill the code } istream & operator>>(istream &is, OurString &dstr){ // TODO: fill the code }
最新发布
05-29
好的,下面是填充后的代码,每个 TODO 已经被替换成相应的实现: ```c++ #include <iostream> #include <cstring> #include "ourstring.h" #include "strlib.h" using namespace std; OurString::OurString(){ str = new char[1]; str[0] = '\0'; } OurString::OurString(const char *str){ this->str = new char[strlen(str)+1]; strcpy(this->str, str); } OurString::OurString(const OurString &dstr){ this->str = new char[dstr.length()+1]; strcpy(this->str, dstr.str); } OurString::~OurString(){ delete [] str; } string OurString::toString() const{ return string(str); } OurString OurString::subStr(unsigned int start, unsigned int n) const{ if (start >= length()) return OurString(); n = (n > length() - start) ? length() - start : n; return OurString(str + start, str + start + n); } bool OurString::operator > (const OurString &dstr) const{ return strcmp(str, dstr.str) > 0; } bool OurString::operator < (const OurString &dstr) const{ return strcmp(str, dstr.str) < 0; } bool OurString::operator == (const OurString &dstr) const{ return strcmp(str, dstr.str) == 0; } unsigned int OurString::length () const{ return strlen(str); } const OurString& OurString::operator = (const OurString &dstr){ if (this != &dstr) { delete [] str; str = new char[dstr.length()+1]; strcpy(str, dstr.str); } return *this; } const OurString& OurString::operator = (const char *str){ if (this->str != str) { delete [] this->str; this->str = new char[strlen(str)+1]; strcpy(this->str, str); } return *this; } char& OurString::operator[](int index){ return str[index]; } const OurString OurString::operator + (const OurString &dstr) const{ OurString s; s.str = new char[length() + dstr.length() + 1]; strcpy(s.str, str); strcat(s.str, dstr.str); return s; } const OurString OurString::operator + (const char *str) const{ OurString s; s.str = new char[length() + strlen(str) + 1]; strcpy(s.str, this->str); strcat(s.str, str); return s; } const OurString& OurString::operator += (const OurString &dstr){ *this = *this + dstr; return *this; } const OurString& OurString::operator += (const char *str){ *this = *this + str; return *this; } ostream & operator<<(ostream &os, const OurString &dstr){ os << dstr.str; return os; } istream & operator>>(istream &is, OurString &dstr){ string s; is >> s; dstr = s.c_str(); return is; } ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值