This file contains hidden or 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
| <template> | |
| <Select v-model="value" multiple> | |
| <Option v-for="item in lists" :value="item.value" :key="item.value">{{ item.label }}</Option> | |
| </Select> | |
| </template> | |
| <script> | |
| /** | |
| * @script 结案方式 多选 区别单选 字符串类型值,一个value双向绑定 | |
| * | |
| * @Author: yejiang |
This file contains hidden or 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
| <template> | |
| <Select v-model="values" clearable style="width:200px"> | |
| <Option v-for="item in lists" :value="item.value" :key="item.value">{{ item.label }}</Option> | |
| </Select> | |
| </template> | |
| <script> | |
| /** | |
| * @script 性别 | |
| * | |
| * @Author: yejiang |
This file contains hidden or 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
| // 1 | |
| watch: { | |
| watchObj: { | |
| deep: true, | |
| handler(val) { | |
| console.log(val, 'watchVal'); | |
| } | |
| } | |
| } |
This file contains hidden or 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
| <template> | |
| <input type="text" v-model="value2"> | |
| </template> | |
| <script> | |
| /** | |
| * @script | |
| * | |
| * @Author: yejiang | |
| * @Date: 2017-10-25 | |
| */ |
This file contains hidden or 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
| ::-webkit-input-placeholder { | |
| /* WebKit browsers */ | |
| color: #ddd; | |
| } | |
| :-moz-placeholder { | |
| /* Mozilla Firefox 4 to 18 */ | |
| color: #ddd; | |
| } |
This file contains hidden or 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
| 场景: 一个盒子,盒子内有四个子盒子,子盒子基于父盒子等边距居中,子盒子内的内容再基于子盒子居中---》实现等边距内容居中 | |
| ------------------- | |
| 1. 假如等边距为16px;由于边框不会像margin一样出现合并。 | |
| 2. 给父盒子设置宽高,(UC浏览器获取不到flex布局的自适应的高度,可用定位0来得到高度:left:0,right:0,bottom:0,top:12rem;) | |
| 3. 给父盒子设置边框,边框宽度为目标距离的一半 | |
| 4. 给子盒子设置边框,边框宽度为目标距离的一半 (边框上下左右都设置) | |
| 5. 即可实现等边距效果,给边框设置边距自己的颜色即可实现 | |
| 6. 再用flex设置子盒子,使用flex属性可让子盒子内的内容居中 | |
| 7. 核心:父子同时设置目标距离的一半边框宽度,子盒子浮动 | |
| 8. 效果实现。 |
This file contains hidden or 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
| set SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ | |
| npm install node-sass | |
| yarn add node-sass |