ソースを参照

Merge branch 'v2' of https://github.com/jdf2e/nutui into v2

Frans 7 年 前
コミット
622eb0a4cb
4 ファイル変更15 行追加65 行削除
  1. 0 60
      README.md
  2. 1 1
      scripts/mdToVue.js
  3. 2 0
      sites/doc/asset/css/common.scss
  4. 12 4
      sites/doc/compents/hidden/hidden.vue

+ 0 - 60
README.md

@@ -1,60 +0,0 @@
-# NutUI 2
-![npm version](https://img.shields.io/npm/v/@nutui/nutui.svg)  [![Build Status](https://api.travis-ci.org/jdf2e/nutui.svg?branch=master)](https://github.com/jdf2e/nutui/) [![Coverage Status](https://coveralls.io/repos/github/jdf2e/nutui/badge.svg?branch=master)](https://coveralls.io/github/jdf2e/nutui?branch=master) ![license](https://img.shields.io/npm/l/@nutui/nutui.svg)
- 
-一套移动端轻量级Vue组件库
-    
-![NutUI](https://img11.360buyimg.com/uba/jfs/t1/11117/21/3608/18942/5c20ab52E35e5a500/02e3c1f89cd3dad1.png)
-
-
-## 特性
-
-* 跨平台,自动转微信小程序组件(稍后上线,敬请期待)
-* 全新的架构
-* 30+ 京东移动端项目正在使用
-* 参照京东APP 7.0 视觉规范
-* 支持按需加载
-* 详尽的文档和示例
-* 支持定制主题
-* 支持多语言(国际化)
-* 支持 TypeScript
-* 支持服务端渲染(Vue SSR)
-* 单元测试加持
-* 配套有基于Webpack的构建工具,可快速创建已内置本组件库的Vue工程 
-
-> 如需使用 1.x 版本,安装时请指定版本号,如: `npm i @nutui/nutui@1.3.2 -S`
-
-## 支持环境
-
-* Android 4.0+
-* iOS 8.0+
-* 支持 Vue 服务端渲染
-
-## 版本
-
-* 稳定版:[![npm](https://img.shields.io/npm/v/@nutui/nutui.svg)](https://www.npmjs.com/package/@nutui/nutui)
-
-> 你还可以订阅: https://github.com/jdf2e/nutui/releases.atom 来获得稳定版发布的通知。
-
-## 示例
-
-![NutUI Demo](https://img14.360buyimg.com/uba/s300x300_jfs/t1/32118/11/559/2782/5c3d81ecEbda0c0f1/5f2b637d11817204.png)
-
-## 安装使用
-
-具体安装使用方法请参考 NutUI 官网 
-
-https://nutui.jd.com
-
-文档:[2.X](https://nutui.jd.com/default.html#/start) | [1.X](https://nutui.jd.com/1x/index.html#/intro)
-
-## 链接
-* [意见反馈](https://github.com/jdf2e/nutui/issues)
-* [更新日志](https://github.com/jdf2e/nutui/releases)
-* [按需加载插件](https://www.npmjs.com/package/@nutui/babel-plugin-separate-import)
-* [模板工程命令行工具(Gaea-cli)](https://github.com/jdf2e/Gaea4)
-* 联系我们:nutui@jd.com
-
-
-## 开源协议
-
-本项目基于 **MIT** 协议

+ 1 - 1
scripts/mdToVue.js

@@ -185,7 +185,7 @@ function ismd(src,hasobj,callback){
  */
  */
 function checkIsexists (path,callback){  
 function checkIsexists (path,callback){  
     let pathFileName = path.replace(/[^a-zA-Z]/g,'');
     let pathFileName = path.replace(/[^a-zA-Z]/g,'');
-    let cacheName = './local'+pathFileName+'.cache';
+    let cacheName = './scripts/local'+pathFileName+'.cache';
     fs.exists(cacheName, res=>{
     fs.exists(cacheName, res=>{
         if(!res){
         if(!res){
             fs.writeFile(cacheName,'','utf8',()=>{
             fs.writeFile(cacheName,'','utf8',()=>{

+ 2 - 0
sites/doc/asset/css/common.scss

@@ -136,6 +136,7 @@ pre {
     position: relative;
     position: relative;
     max-width: 100%;
     max-width: 100%;
     overflow: auto;
     overflow: auto;
+    margin
     .code-wrapper{
     .code-wrapper{
         width:100%;
         width:100%;
         overflow:auto;
         overflow:auto;
@@ -183,6 +184,7 @@ pre {
     border-radius: 4px;
     border-radius: 4px;
     border: none;
     border: none;
     padding: 20px;
     padding: 20px;
+    margin: 0;
     &>span {
     &>span {
         position: absolute;
         position: absolute;
         right: 5px;
         right: 5px;

+ 12 - 4
sites/doc/compents/hidden/hidden.vue

@@ -1,5 +1,9 @@
 <template>
 <template>
-<div class="swap">
+<div class="swap"
+    :class="{
+        hasPadding:heightSlot>400
+    }"
+>
     <div 
     <div 
         class="eidt-box"
         class="eidt-box"
         :class="{
         :class="{
@@ -58,7 +62,7 @@ export default {
     mounted(){     
     mounted(){     
         this.heightSlot = this.$slots.default[0].elm.offsetHeight;
         this.heightSlot = this.$slots.default[0].elm.offsetHeight;
         if(this.heightSlot<400){
         if(this.heightSlot<400){
-            this.siteHeight = {height:this.heightSlot + 'px'};           
+            this.siteHeight = {height:''};           
         }else{
         }else{
             this.siteHeight = {height:'300px'};          
             this.siteHeight = {height:'300px'};          
         }
         }
@@ -68,8 +72,12 @@ export default {
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .swap{
 .swap{
     position: relative;
     position: relative;
-    padding-bottom:30px;
+   
     background: #F2F4F5;
     background: #F2F4F5;
+    margin: 16px 0;
+}
+.hasPadding{
+     padding-bottom:30px;
 }
 }
 .show{   
 .show{   
     overflow:hidden;
     overflow:hidden;
@@ -82,7 +90,7 @@ export default {
     height: 30px;
     height: 30px;
     width: 100%;
     width: 100%;
     bottom: 0;
     bottom: 0;
-    background: linear-gradient(rgba(255, 255, 255, 0.2),#fafafa);
+    background: linear-gradient(rgba(255, 255, 255, 0),#fafafa);
     position: absolute;
     position: absolute;
     z-index: 999 ;
     z-index: 999 ;
     text-align: center;
     text-align: center;