-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
106 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# 代码提交规范 | ||
|
||
* fork本项目, 在自己的仓库下修改代码, 然后发起 pull request | ||
* 如果已经fork过, 每次功能开发之前, 记得定期同步源仓库. 具体做法可以看 [这里](https://help.github.com/articles/syncing-a-fork/) | ||
* commit信息请注明修复了哪个issues, 用 ``#issues_id`` 的方式标注 | ||
|
||
|
||
比如认领了任务 https://github.com/idle-dog/upup/issues/4 , issues的id就是4, 提交的信息可以标注为: | ||
|
||
``` | ||
完成新功能 #4 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
<div class="p-index"> | ||
<div class="p-index_display"> | ||
<w-display></w-display> | ||
<w-display | ||
:color="color" | ||
:content="content" | ||
:scale.sync="scale"> | ||
</w-display> | ||
</div> | ||
<div class="p-index_bgcolor"> | ||
<w-bgcolor color="#E50012"></w-bgcolor> | ||
<w-bgcolor :color.sync="color"></w-bgcolor> | ||
</div> | ||
<div class="p-index_textarea"> | ||
<w-textarea></w-textarea> | ||
<w-textarea :content.sync="content" placeholder=""></w-textarea> | ||
</div> | ||
<div class="p-index_toolbar"> | ||
<w-toolbar></w-toolbar> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.w-display { | ||
height: 200px; | ||
background: #ccc; | ||
background: #fff; | ||
position: relative; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,54 @@ | ||
.w-textarea { | ||
min-height: 200px; | ||
min-height: 100px; | ||
position: relative; | ||
} | ||
|
||
.w-textarea_inner textarea, .w-textarea_inner pre { | ||
margin: 0; | ||
padding: 0; | ||
outline: 0; | ||
border: 0; | ||
min-height: 100px; | ||
} | ||
|
||
.w-textarea_inner { | ||
position: absolute; | ||
top: 5px; | ||
left: 5px; | ||
right: 5px; | ||
bottom: 5px; | ||
display: block; | ||
position: relative; | ||
border: 1px solid #888; | ||
background: #fff; | ||
} | ||
|
||
.w-textarea_editor { | ||
.w-textarea_inner > textarea, | ||
.w-textarea_inner > pre { | ||
padding: 5px; | ||
background: transparent; | ||
font: 400 13px/16px helvetica, arial, sans-serif; | ||
white-space: pre-wrap; | ||
word-wrap: break-word; | ||
} | ||
|
||
.w-textarea_inner > textarea { | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
-ms-box-sizing: border-box; | ||
box-sizing: border-box; | ||
width: 100%; | ||
height: 100px; | ||
} | ||
|
||
.w-textarea_inner.active > textarea { | ||
overflow: hidden; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
height: 100%; | ||
padding: 0; | ||
border: 0; | ||
resize: none; | ||
outline: none; | ||
} | ||
} | ||
|
||
.w-textarea_inner > pre { | ||
display: none; | ||
} | ||
|
||
.w-textarea_inner.active > pre { | ||
display: block; | ||
visibility: hidden; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<div class="w-textarea"> | ||
<div class="w-textarea_inner"> | ||
<textarea class="w-textarea_editor" placeholder="输入举牌文字"></textarea> | ||
<div class="w-textarea_inner active"> | ||
<pre><span>{{content}}</span><br></pre> | ||
<textarea class="w-textarea_editor" v-bind:placeholder="placeholder" v-model="content"></textarea> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
// 文本输入组件 | ||
// TODO | ||
/** | ||
* 文本输入组件 | ||
* | ||
* 功能描述: | ||
* 这里是一个textarea输入框 | ||
* 无边框,有 1px 线条底纹 | ||
* 有 placeholder 占位提示 | ||
* 高度自适应 | ||
* vue组件接收 外部参数 content 表示文本内容 | ||
* 也支持外部传参定义 placeholder | ||
*/ | ||
|
||
module.exports = Vue.extend({ | ||
template: __inline('textarea.html') | ||
}); | ||
template: __inline('textarea.html'), | ||
props: ['content', 'placeholder'], | ||
created: function () { | ||
!this.placeholder && (this.placeholder = '输入举牌文字') | ||
} | ||
}); |