Browse Source

Merge pull request #2 from jdf2e/v2-dev

upd
zjyau 5 years ago
parent
commit
58b295f8ba
100 changed files with 175 additions and 5173 deletions
  1. 7 10
      .eslintrc.js
  2. 1 1
      .gitignore
  3. 5 5
      .postcssrc.js
  4. 1 0
      .prettierignore
  5. 8 8
      .prettierrc
  6. 2 2
      .travis.yml
  7. 57 7
      CHANGELOG.md
  8. 15 15
      babel.config.js
  9. 13 13
      commitlint.config.js
  10. 1 1
      docs/start.md
  11. 1 1
      docs/theme.md
  12. 64 64
      eslint-config.js
  13. 0 28
      lib/plugin/cli/CHANGELOG.md
  14. 0 45
      lib/plugin/cli/README.md
  15. 0 102
      lib/plugin/cli/package.json
  16. 0 106
      lib/plugin/cli/site/demo/app.js
  17. 0 55
      lib/plugin/cli/site/demo/app.vue
  18. 0 33
      lib/plugin/cli/site/demo/asset/css/common.scss
  19. 0 5
      lib/plugin/cli/site/demo/asset/css/custom.scss
  20. BIN
      lib/plugin/cli/site/demo/asset/img/favicon.ico
  21. BIN
      lib/plugin/cli/site/demo/asset/img/loading.gif
  22. BIN
      lib/plugin/cli/site/demo/asset/img/logo.png
  23. BIN
      lib/plugin/cli/site/demo/asset/img/logo_share.png
  24. BIN
      lib/plugin/cli/site/demo/asset/img/pwa_logo.png
  25. 0 12
      lib/plugin/cli/site/demo/asset/manifest.json
  26. 0 1
      lib/plugin/cli/site/demo/asset/share.min.js
  27. 0 59
      lib/plugin/cli/site/demo/index.html
  28. 0 19
      lib/plugin/cli/site/demo/lang/en-US.js
  29. 0 19
      lib/plugin/cli/site/demo/lang/zn-CH.js
  30. 0 50
      lib/plugin/cli/site/demo/router.js
  31. 0 106
      lib/plugin/cli/site/demo/view/demonav.vue
  32. 0 233
      lib/plugin/cli/site/demo/view/index.vue
  33. 0 21
      lib/plugin/cli/site/demo/view/mixin.js
  34. 0 30
      lib/plugin/cli/site/doc/app.js
  35. 0 566
      lib/plugin/cli/site/doc/app.vue
  36. 0 286
      lib/plugin/cli/site/doc/asset/css/common.scss
  37. BIN
      lib/plugin/cli/site/doc/asset/css/i/1_1.png
  38. BIN
      lib/plugin/cli/site/doc/asset/css/i/1_2.png
  39. BIN
      lib/plugin/cli/site/doc/asset/css/i/2_1.png
  40. BIN
      lib/plugin/cli/site/doc/asset/css/i/2_2.png
  41. BIN
      lib/plugin/cli/site/doc/asset/css/i/3_1.png
  42. BIN
      lib/plugin/cli/site/doc/asset/css/i/3_2.png
  43. BIN
      lib/plugin/cli/site/doc/asset/css/i/Shape.png
  44. BIN
      lib/plugin/cli/site/doc/asset/css/i/all.png
  45. BIN
      lib/plugin/cli/site/doc/asset/css/i/bg.png
  46. BIN
      lib/plugin/cli/site/doc/asset/css/i/close.png
  47. BIN
      lib/plugin/cli/site/doc/asset/css/i/cp.png
  48. BIN
      lib/plugin/cli/site/doc/asset/css/i/explor.png
  49. BIN
      lib/plugin/cli/site/doc/asset/css/i/fengche.png
  50. BIN
      lib/plugin/cli/site/doc/asset/css/i/flower.png
  51. BIN
      lib/plugin/cli/site/doc/asset/css/i/flowerpot.png
  52. BIN
      lib/plugin/cli/site/doc/asset/css/i/fly.png
  53. BIN
      lib/plugin/cli/site/doc/asset/css/i/github.png
  54. BIN
      lib/plugin/cli/site/doc/asset/css/i/goods.png
  55. BIN
      lib/plugin/cli/site/doc/asset/css/i/iframe_iphonex.png
  56. BIN
      lib/plugin/cli/site/doc/asset/css/i/jion_us.gif
  57. BIN
      lib/plugin/cli/site/doc/asset/css/i/kuang.png
  58. BIN
      lib/plugin/cli/site/doc/asset/css/i/leaf_1.png
  59. BIN
      lib/plugin/cli/site/doc/asset/css/i/leaf_2.png
  60. BIN
      lib/plugin/cli/site/doc/asset/css/i/leaf_3.png
  61. BIN
      lib/plugin/cli/site/doc/asset/css/i/leaf_4.png
  62. BIN
      lib/plugin/cli/site/doc/asset/css/i/logo.png
  63. BIN
      lib/plugin/cli/site/doc/asset/css/i/logo2.png
  64. BIN
      lib/plugin/cli/site/doc/asset/css/i/nut-icon.png
  65. BIN
      lib/plugin/cli/site/doc/asset/css/i/nut.png
  66. BIN
      lib/plugin/cli/site/doc/asset/css/i/people.png
  67. BIN
      lib/plugin/cli/site/doc/asset/css/i/phone.png
  68. BIN
      lib/plugin/cli/site/doc/asset/css/i/phtitle.png
  69. BIN
      lib/plugin/cli/site/doc/asset/css/i/qrcode.png
  70. BIN
      lib/plugin/cli/site/doc/asset/css/i/search.png
  71. BIN
      lib/plugin/cli/site/doc/asset/css/i/sreach.png
  72. 0 194
      lib/plugin/cli/site/doc/asset/css/style-blue.scss
  73. 0 86
      lib/plugin/cli/site/doc/asset/js/Detector.js
  74. 0 18
      lib/plugin/cli/site/doc/asset/js/bookmark.js
  75. 0 627
      lib/plugin/cli/site/doc/asset/js/code.js
  76. 0 7
      lib/plugin/cli/site/doc/asset/js/copy.js
  77. 0 55
      lib/plugin/cli/site/doc/asset/js/isVisibiliy.js
  78. 0 7
      lib/plugin/cli/site/doc/asset/js/utils.js
  79. 0 92
      lib/plugin/cli/site/doc/backup/fastStart.vue
  80. 0 92
      lib/plugin/cli/site/doc/backup/international.vue
  81. 0 92
      lib/plugin/cli/site/doc/backup/intr.vue
  82. 0 92
      lib/plugin/cli/site/doc/backup/theme.vue
  83. 0 92
      lib/plugin/cli/site/doc/backup/update.vue
  84. 0 52
      lib/plugin/cli/site/doc/code.vue
  85. 0 113
      lib/plugin/cli/site/doc/compents/hidden/hidden.vue
  86. 0 1
      lib/plugin/cli/site/doc/compents/vue-stickto/VueStickto.js
  87. 0 40
      lib/plugin/cli/site/doc/index.html
  88. 0 932
      lib/plugin/cli/site/doc/index.vue
  89. 0 280
      lib/plugin/cli/site/doc/info.vue
  90. 0 68
      lib/plugin/cli/site/doc/root.js
  91. 0 97
      lib/plugin/cli/site/doc/router.js
  92. 0 149
      lib/plugin/cli/site/doc/search.vue
  93. 0 37
      lib/plugin/cli/src/bin/index.ts
  94. 0 8
      lib/plugin/cli/src/commands/build-site.ts
  95. 0 19
      lib/plugin/cli/src/commands/build.ts
  96. 0 11
      lib/plugin/cli/src/commands/clean.ts
  97. 0 1
      lib/plugin/cli/src/commands/commitLint.ts
  98. 0 4
      lib/plugin/cli/src/commands/createComponent.ts
  99. 0 4
      lib/plugin/cli/src/commands/dev.ts
  100. 0 0
      lib/plugin/cli/src/commands/lint.ts

+ 7 - 10
.eslintrc.js

@@ -1,11 +1,8 @@
 module.exports = {
-    extends: [
-        'plugin:vue/essential'
-    ],
-    rules: {
-    },
-    parserOptions: {
-        parser: "babel-eslint",
-        ecmaVersion: 2017
-    }
-}
+  extends: ['plugin:vue/essential'],
+  rules: {},
+  parserOptions: {
+    parser: 'babel-eslint',
+    ecmaVersion: 2017
+  }
+};

+ 1 - 1
.gitignore

@@ -4,8 +4,8 @@ dist/
 npm-debug.log
 yarn-error.log
 .nyc_output/
-.vscode/
 coverage/
+.vscode/
 sites/doc/view
 sites/doc/page
 package-lock.json

+ 5 - 5
.postcssrc.js

@@ -1,7 +1,7 @@
 module.exports = {
-  "plugins": {
-    "postcss-import": {},
-    "postcss-url": {},
-    "autoprefixer": {}
+  plugins: {
+    'postcss-import': {},
+    'postcss-url': {},
+    autoprefixer: {}
   }
-}
+};

+ 1 - 0
.prettierignore

@@ -8,3 +8,4 @@
 package.json
 lib/plugin/cli/site/doc/page
 lib/plugin/cli/site/doc/view
+node_modules

+ 8 - 8
.prettierrc

@@ -1,9 +1,9 @@
 {
-	"singleQuote": true,
-	"semi": true,
-	"bracketSpacing": true,
-	"tabWidth": 4,
-	"printWidth": 150,
-	"useTabs": true,
-	"htmlWhitespaceSensitivity": "strict"
-}
+  "singleQuote": true,
+  "semi": true,
+  "bracketSpacing": true,
+  "tabWidth": 2,
+  "printWidth": 150,
+  "useTabs": false,
+  "htmlWhitespaceSensitivity": "strict"
+}

+ 2 - 2
.travis.yml

@@ -1,7 +1,7 @@
 sudo: required
 language: node_js
 node_js:
-  - '8'
+  - '10'
 script:
   - npm test
-  - npm run coveralls
+  - npm run coveralls

+ 57 - 7
CHANGELOG.md

@@ -1,3 +1,53 @@
+## 2.2.5
+
+`2020-05-25`
+
+* :sparkles: feat(Address):新增地址组件 @yangxiaolu1993
+* :sparkles: upd(Popup):优化内部代码、单元测试 @yangkaixuan
+* :sparkles: upd(LeftSlip):重构优化代码 #229 @vickyYE
+* :sparkles: upd(Video):修复自定义蒙层 @vickyYE
+* :sparkles: upd(Tab):优化内部代码,支持多页签滑动 @zhenyulei
+* :bug: fix(Range):stage 失效、控制器重叠问题 #242 @undo03
+* :bug: fix(CountDown):修复 startTime 异步更新问题 @undo03
+* :bug: fix(Icon):修复 url 异步更新问题 @richard1015
+* :bug: fix(Swiper):修复 cdn 模式下 event 事件失效问题 @richard1015
+* :bug: fix(Dialog):修复标签使用时,取消按钮无效 @guoxiao158
+* :zap: doc:nutui-demo、user-case jdf2e 地址库更换 @richard1015
+* :zap: doc:补充 rate js 文档 @richard1015
+* :zap: doc:补充 switch demo 文档 @zjyau
+
+## 2.2.4
+
+`2020-04-29`
+
+* :sparkles: upd(CircleProgress):新增环形进度条 @layman666
+* :sparkles: upd(Drag):新增拖拽组件 @zy19940510
+* :sparkles: upd(SideNavBar):新增侧边栏导航组件 @szg2008
+* :sparkles: upd(ButtonGroup):优化内部代码,文档优化 @shenqistart
+* :sparkles: upd(Icon):优化内部代码,文档优化 @linrufeng
+* :sparkles: upd(Uploader):调整 uploader 上传 form-data 键值顺序 @richard1015
+* :sparkles: upd(InfiniteLoading):新增 scrollChange、use-capture、use-window 参数,支持固定高度滚动加载 @richard1015
+* :sparkles: upd(Imgpicker):增加长按时间可配置 @szg2008
+* :sparkles: upd(Stepper):优化min参数监听问题 @yangxiaolu1993
+* :sparkles: upd(DatePicker):组件增加秒功能 @irisSong
+* :bug: fix(TabBar):重复点击一个TAB的时候会报错 #231 @zhenyulei
+* :bug: fix(TextBox):v-model问题修复 @guoxiao158
+* :bug: fix(Countdown):修复切换页面闪烁问题 #237 @undo03
+* :bug: fix(SearchBar):修复input获取焦点问题 @yangxiaolu1993
+* :bug: fix(Video):修复视频组件source 数据更新无法切换问题 #234 @vickyYE
+* :bug: fix(Popup):修复滑动锁定背景部分机型不生效问题 @yangkaixuan
+* :bug: fix(Scroller):修复组件横向滑动区域,不能上下滑动页面问题 #103 #62 @irisSong
+* :bug: fix(TabSelect):修复ios下样式问题、多选删除问题,增加isLockBgScroll是否锁定背景滚动配置 @zjyau @dushoujun
+* :zap: doc:新增开发者项目使用案例 @richard1015
+* :zap: doc:修改dialog和textbox文档 @guoxiao158
+
+## 2.2.3
+
+`2020-04-03`
+
+* :sparkles: upd(Uploader):新增 beforeUpload 回调钩子函数、新增selfData自定义增加上传的数据 @linrufeng
+* :bug: fix(Stepper):关于Tabbar的问题重复点击一个TAB的时候会报错 #231 @zhenyulei
+
 ## 2.2.2
 
 `2020-03-31`
@@ -13,13 +63,13 @@
 * :sparkles: upd(Toast):优化内部代码,文档优化 @zy19940510
 * :sparkles: upd(Progress):优化内部代码,文档优化 @layman666
 * :sparkles: upd(SearchBar、TextInput):组件优化 @yangxiaolu1993
-* :bug: upd(Range):绑定的值无法更新到组件 #227 @undo03
-* :bug: upd(Countdown):修复异步计算属性无法更新组件 #228 @undo03
-* :bug: upd(LuckDraw):抽奖组件图片链接修复 @Ymm0008
-* :bug: upd(Picker)优化自定义数据联动demo @irisSong
-* :bug: upd(Popup):按需加载icon修复 @yangkaixuan
-* :bug: upd(TabSelect):组件tabList数据改变内容不刷新问题修复 @dushoujun
-* :bug: upd(TabBar):更新数据 重新渲染的功能 @zhenyulei
+* :bug: fix(Range):绑定的值无法更新到组件 #227 @undo03
+* :bug: fix(Countdown):修复异步计算属性无法更新组件 #228 @undo03
+* :bug: fix(LuckDraw):抽奖组件图片链接修复 @Ymm0008
+* :bug: fix(Picker)优化自定义数据联动demo @irisSong
+* :bug: fix(Popup):按需加载icon修复 @yangkaixuan
+* :bug: fix(TabSelect):组件tabList数据改变内容不刷新问题修复 @dushoujun
+* :bug: fix(TabBar):更新数据 重新渲染的功能 @zhenyulei
 
 ## 2.2.1
 

+ 15 - 15
babel.config.js

@@ -1,22 +1,22 @@
 const presets = [
-	[
-		'@babel/preset-env',
-		{
-			loose: false,
-			modules: false,
-			targets: {
-				browsers: ['Android >= 4', 'iOS >= 8']
-			}
-		}
-	]
+  [
+    '@babel/preset-env',
+    {
+      loose: false,
+      modules: false,
+      targets: {
+        browsers: ['Android >= 4', 'iOS >= 8']
+      }
+    }
+  ]
 ];
 
 const plugins = [
-	'@babel/plugin-transform-runtime',
-	'@babel/plugin-syntax-dynamic-import',
-	'@babel/plugin-proposal-object-rest-spread',
-	'@babel/plugin-transform-object-assign',
-	'istanbul'
+  '@babel/plugin-transform-runtime',
+  '@babel/plugin-syntax-dynamic-import',
+  '@babel/plugin-proposal-object-rest-spread',
+  '@babel/plugin-transform-object-assign',
+  'istanbul'
 ];
 
 module.exports = { presets, plugins };

+ 13 - 13
commitlint.config.js

@@ -1,15 +1,15 @@
 module.exports = {
-	extends: ['@commitlint/config-conventional'],
-	rules: {
-		'body-leading-blank': [1, 'always'],
-		'footer-leading-blank': [1, 'always'],
-		'header-max-length': [2, 'always', 72],
-		'scope-case': [2, 'always', 'lower-case'],
-		'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
-		'subject-empty': [2, 'never'],
-		'subject-full-stop': [2, 'never', '.'],
-		'type-case': [2, 'always', 'lower-case'],
-		'type-empty': [2, 'never'],
-		'type-enum': [2, 'always', ['upd', 'chore', 'docs', 'feat', 'fix', 'test', 'refactor', 'revert', 'style']],
-	},
+  extends: ['@commitlint/config-conventional'],
+  rules: {
+    'body-leading-blank': [1, 'always'],
+    'footer-leading-blank': [1, 'always'],
+    'header-max-length': [2, 'always', 72],
+    'scope-case': [2, 'always', 'lower-case'],
+    'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
+    'subject-empty': [2, 'never'],
+    'subject-full-stop': [2, 'never', '.'],
+    'type-case': [2, 'always', 'lower-case'],
+    'type-empty': [2, 'never'],
+    'type-enum': [2, 'always', ['upd', 'chore', 'docs', 'feat', 'fix', 'test', 'refactor', 'revert', 'style']]
+  }
 };

+ 1 - 1
docs/start.md

@@ -204,7 +204,7 @@ module.exports = {
 }
 ```
 
-> VueCLI 3 相关Demo 请查看 [NutUI Demo](https://github.com/richard1015/nutui-demo)
+> VueCLI 3 相关Demo 请查看 [NutUI Demo](https://github.com/jdf2e/nutui-demo)
 
 ### 2. 手动引入
 

+ 1 - 1
docs/theme.md

@@ -101,4 +101,4 @@ import '@nutui/nutui/dist/packages/button/button.scss';
 }
 ```
 
-> VueCLI 3 相关Demo 请查看 [NutUI Demo](https://github.com/richard1015/nutui-demo)
+> VueCLI 3 相关Demo 请查看 [NutUI Demo](https://github.com/jdf2e/nutui-demo)

+ 64 - 64
eslint-config.js

@@ -1,71 +1,71 @@
 module.exports = {
-	extends: ['plugin:vue/recommended'],
+  extends: ['plugin:vue/recommended'],
 
-	parserOptions: {
-		parser: '@typescript-eslint/parser',
-		ecmaVersion: 2018,
-		sourceType: 'module',
-		extraFileExtensions: ['.vue'],
-	},
+  parserOptions: {
+    parser: '@typescript-eslint/parser',
+    ecmaVersion: 2018,
+    sourceType: 'module',
+    extraFileExtensions: ['.vue']
+  },
 
-	plugins: ['@typescript-eslint'],
+  plugins: ['@typescript-eslint'],
 
-	env: {
-		es6: true,
-		node: true,
-		jest: true,
-		browser: true,
-	},
+  env: {
+    es6: true,
+    node: true,
+    jest: true,
+    browser: true
+  },
 
-	globals: {
-		window: false,
-		document: false,
-		navigator: false,
-	},
+  globals: {
+    window: false,
+    document: false,
+    navigator: false
+  },
 
-	rules: {
-		'no-new': 0,
-		'no-shadow': 0,
-		camelcase: 1,
-		'no-bitwise': 0,
-		'func-names': 0,
-		'no-console': 0,
-		'no-plusplus': 0,
-		'arrow-parens': 0,
-		'comma-dangle': 0,
-		'default-case': 0,
-		'prefer-template': 0,
-		'consistent-return': 0,
-		'no-param-reassign': 0,
-		'no-nested-ternary': 0,
-		'operator-linebreak': 0,
-		'object-curly-newline': 0,
-		'no-underscore-dangle': 1,
-		'no-unused-expressions': 0,
-		'no-restricted-globals': 0,
-		'function-paren-newline': 0,
-		'class-methods-use-this': 0,
-		'implicit-arrow-linebreak': 0,
-		'space-before-function-paren': 0,
-		'max-len': ['error', { code: 150 }],
-		'prefer-destructuring': ['error', { object: true, array: false }],
-		'import/order': 0,
-		'import/extensions': 0,
-		'import/no-unresolved': 0,
-		'import/prefer-default-export': 0,
-		'import/no-extraneous-dependencies': 0,
-		'vue/no-v-html': 0,
-		'vue/attributes-order': 0,
-		'vue/require-v-for-key': 0,
-		'vue/require-default-prop': 0,
-		'vue/no-unused-components': 0,
-		'vue/max-attributes-per-line': 0,
-		'vue/singleline-html-element-content-newline': 0,
-		'vue/name-property-casing': ['error', 'kebab-case'],
-		'vue/component-name-in-template-casing': ['error', 'kebab-case'],
-		'vue/html-closing-bracket-newline': 2,
-		'@typescript-eslint/no-unused-vars': ['error'],
-		'vue/html-indent': 0,
-		'vue/html-self-closing': 0,
-	},
+  rules: {
+    'no-new': 0,
+    'no-shadow': 0,
+    camelcase: 1,
+    'no-bitwise': 0,
+    'func-names': 0,
+    'no-console': 0,
+    'no-plusplus': 0,
+    'arrow-parens': 0,
+    'comma-dangle': 0,
+    'default-case': 0,
+    'prefer-template': 0,
+    'consistent-return': 0,
+    'no-param-reassign': 0,
+    'no-nested-ternary': 0,
+    'operator-linebreak': 0,
+    'object-curly-newline': 0,
+    'no-underscore-dangle': 1,
+    'no-unused-expressions': 0,
+    'no-restricted-globals': 0,
+    'function-paren-newline': 0,
+    'class-methods-use-this': 0,
+    'implicit-arrow-linebreak': 0,
+    'space-before-function-paren': 0,
+    'max-len': ['error', { code: 150 }],
+    'prefer-destructuring': ['error', { object: true, array: false }],
+    'import/order': 0,
+    'import/extensions': 0,
+    'import/no-unresolved': 0,
+    'import/prefer-default-export': 0,
+    'import/no-extraneous-dependencies': 0,
+    'vue/no-v-html': 0,
+    'vue/attributes-order': 0,
+    'vue/require-v-for-key': 0,
+    'vue/require-default-prop': 0,
+    'vue/no-unused-components': 0,
+    'vue/max-attributes-per-line': 0,
+    'vue/singleline-html-element-content-newline': 0,
+    'vue/name-property-casing': ['error', 'kebab-case'],
+    'vue/component-name-in-template-casing': ['error', 'kebab-case'],
+    'vue/html-closing-bracket-newline': 2,
+    '@typescript-eslint/no-unused-vars': ['error'],
+    'vue/html-indent': 0,
+    'vue/html-self-closing': 0
+  }
 };

+ 0 - 28
lib/plugin/cli/CHANGELOG.md

@@ -1,28 +0,0 @@
-## 0.0.5
-
-`2020-2-24`
-- 测试cli test配置
-
-## 0.0.4
-
-`2020-2-20`
-- 测试cli test配置
-
-## 0.0.3
-
-`2020-2-20`
-- 测试cli test配置
-
-## 0.0.2
-
-`2020-1-20`
-
-- 版本测试
-
-## 0.0.1
-
-`2020-1-20`
-
-- WebPack4全新的架构
-
-

+ 0 - 45
lib/plugin/cli/README.md

@@ -1,45 +0,0 @@
-# NutUI CLI
-
-NutUI CLI 致力于将 Vue 生态中的工具基础标准化。它确保了各种构建工具能够基于智能的默认配置即可平稳衔接,这样你可以专注在撰写组件上,而不必花好几天去纠结配置的问题。
-
-
-## 命令
-
-### dev
-
-本地调试运行官网和Demo示例
-
-
-### add
-
-快速创建新增组件标准模板
-
-### build
-
-构建组件库,在`dist`目录下生成可用于生产环境的组件代码
-
-### build-site
-
-构建官网+Demo示例网站,输出到 `dist/site`
-
-
-### commit-lint
-
-校验 commit message 的格式是否符合规范,需要配合`husky`在提交 commit 时触发
-
-### lint
-
-运行stylelint和eslint 进行格式化代码,确保规范
-
-### test
-
-运行单元测试
-
-
-### clean
-
-清空打包目录
-
-
-
-

+ 0 - 102
lib/plugin/cli/package.json

@@ -1,102 +0,0 @@
-{
-  "name": "@nutui/cli",
-  "version": "0.1.4",
-  "description": "nutui cli",
-  "main": "./dist_cli/bin/index.js",
-  "files": [
-    "dist_cli",
-    "README.md",
-    "package.json",
-    "site",
-    "README.md"
-  ],
-  "bin": {
-    "nutui-cli": "./dist_cli/bin/index.js"
-  },
-  "scripts": {
-    "dev": "tsc --watch --incremental"
-  },
-  "keywords": [
-    "nutui/cli"
-  ],
-  "author": "richard1015",
-  "license": "ISC",
-  "dependencies": {
-    "@babel/cli": "^7.8.4",
-    "@babel/core": "^7.8.7",
-    "@babel/plugin-transform-object-assign": "^7.8.3",
-    "@babel/plugin-transform-runtime": "^7.8.3",
-    "@babel/preset-env": "^7.8.7",
-    "@commitlint/cli": "^8.0.0",
-    "@commitlint/config-conventional": "^8.0.0",
-    "@nutui/markdown-to-vue": "0.0.3",
-    "@types/node": "^13.1.1",
-    "@vue/test-utils": "1.0.0-beta.25",
-    "autoprefixer": "^9.7.3",
-    "babel-loader": "^8.0.6",
-    "cache-loader": "^4.1.0",
-    "clipboard": "^2.0.4",
-    "commander": "^4.0.1",
-    "copy": "^0.3.2",
-    "copy-webpack-plugin": "^5.1.1",
-    "coveralls": "^3.0.2",
-    "cross-env": "^5.2.0",
-    "css-loader": "^3.4.1",
-    "eslint": "^6.8.0",
-    "eslint-plugin-vue": "^6.1.2",
-    "expect": "23.6.0",
-    "file-loader": "^5.0.2",
-    "fs": "0.0.1-security",
-    "fs-extra": "^8.1.0",
-    "highlight.js": "^9.17.1",
-    "html-webpack-plugin": "^3.2.0",
-    "husky": "^3.0.0",
-    "inquirer": "^7.0.3",
-    "istanbul-instrumenter-loader": "3.0.1",
-    "jsdom": "13.0.0",
-    "jsdom-global": "3.0.2",
-    "mini-css-extract-plugin": "^0.9.0",
-    "mocha": "5.2.0",
-    "mocha-webpack": "2.0.0-beta.0",
-    "node-sass": "^4.13.0",
-    "nyc": "10.0.0",
-    "offline-plugin": "^5.0.7",
-    "optimize-css-assets-webpack-plugin": "^5.0.3",
-    "path": "^0.12.7",
-    "postcss-import": "^12.0.1",
-    "postcss-loader": "^3.0.0",
-    "postcss-url": "^8.0.0",
-    "qrcode": "^1.4.4",
-    "raw-loader": "^4.0.0",
-    "sass-loader": "^8.0.0",
-    "signale": "^1.4.0",
-    "style-loader": "^1.1.2",
-    "stylelint": "^13.0.0",
-    "stylelint-config-standard": "^19.0.0",
-    "stylelint-webpack-plugin": "^1.2.0",
-    "typescript": "^3.7.4",
-    "url-loader": "^3.0.0",
-    "vue": "^2.6.11",
-    "vue-lazyload": "^1.3.3",
-    "vue-loader": "^15.8.3",
-    "vue-router": "^3.1.3",
-    "vue-style-loader": "^4.1.2",
-    "vue-template-compiler": "^2.6.11",
-    "webpack": "^4.41.5",
-    "webpack-dev-server": "^3.10.1",
-    "webpack-merge": "^4.2.2",
-    "webpack-node-externals": "1.7.2",
-    "webpackbar": "^4.0.0"
-  },
-  "devDependencies": {
-    "@types/copy-webpack-plugin": "^5.0.0",
-    "@types/eslint": "^6.1.3",
-    "@types/html-webpack-plugin": "^3.2.1",
-    "@types/mini-css-extract-plugin": "^0.9.0",
-    "@types/optimize-css-assets-webpack-plugin": "^5.0.1",
-    "@types/stylelint": "^9.10.1",
-    "@types/vfile-message": "^2.0.0",
-    "@types/webpack": "^4.41.0",
-    "@types/webpack-merge": "^4.1.5"
-  }
-}

+ 0 - 106
lib/plugin/cli/site/demo/app.js

@@ -1,106 +0,0 @@
-import 'core-js/modules/es6.promise';
-import 'core-js/modules/es6.array.iterator';
-import Vue from 'vue';
-import App from './app.vue';
-import router from './router';
-import mixin from './view/mixin.js';
-import Conf from '@/config.json';
-
-import NutUI from '@/nutui';
-// import en from '../../src/locales/lang/en-US';
-// import demoEN from './lang/en-US';
-
-import * as OfflinePluginRuntime from 'offline-plugin/runtime';
-
-import './asset/css/common.scss';
-
-import './asset/img/logo_share.png';
-
-Vue.config.productionTip = false;
-
-// Object.assign(en, demoEN);
-
-// Vue.use(NutUI, {
-//   locale: 'en-US',
-//   lang: en
-// });
-
-NutUI.install(Vue);
-
-//Vue.locale = () => {};
-
-// const i18n = new VueI18n({
-//   locale: 'en-US',
-//   messages: {
-//     'en-US': en
-//   }
-// });
-
-// 兼容vue-i18n
-// Vue.locale = () => {};
-// const i18n = new VueI18n({
-//   locale: 'en-US',
-//   messages: {
-//     'en-US': en
-//   }
-// });
-// Vue.prototype.$i18n = i18n;
-// Vue.use(VueI18n);
-
-Vue.mixin(mixin);
-
-const app = new Vue({
-	el: '#demo',
-	router,
-	components: { App },
-	template: '<App/>'
-});
-
-OfflinePluginRuntime.install({
-	onUpdating: () => {
-		console.log('SW Event:', 'onUpdating');
-	},
-	onUpdateReady: () => {
-		console.log('SW Event:', 'onUpdateReady');
-		OfflinePluginRuntime.applyUpdate();
-	},
-	onUpdated: () => {
-		console.log('SW Event:', 'onUpdated');
-		console.log('PWA缓存有更新,需要刷新页面');
-
-		app.$dialog({
-			title: '当前页面有新版本,请刷新',
-			noCloseBtn: true,
-			noOkBtn: true,
-			cancelBtnTxt: '刷新页面',
-			closeOnClickModal: false,
-			lockBgScroll: true,
-			onCancelBtn() {
-				window.location.reload();
-			}
-		});
-
-		//window.location.reload();
-	},
-
-	onUpdateFailed: () => {
-		console.log('SW Event:', 'onUpdateFailed');
-	}
-});
-
-Vue.prototype.NUTCONF = Conf;
-
-let pageLoading = app.$toast.loading();
-
-router.beforeEach((to, from, next) => {
-	pageLoading.show();
-	next();
-});
-
-router.beforeResolve((to, from, next) => {
-	next();
-});
-
-router.afterEach((to, from) => {
-	pageLoading.hide();
-});

+ 0 - 55
lib/plugin/cli/site/demo/app.vue

@@ -1,55 +0,0 @@
-<template>
-	<div :class="['demo-wrapper', { 'in-iframe': inIframe }]">
-		<router-view class="demo-nav" name="demonav" v-if="!inIframe" v-transition></router-view>
-		<keep-alive include="index">
-			<router-view class="demo" name="main" v-transition></router-view>
-		</keep-alive>
-	</div>
-</template>
-<script>
-export default {
-	name: 'app',
-	data() {
-		return {
-			inIframe: false
-		};
-	},
-	mounted() {
-		if (window.self != window.top) {
-			this.inIframe = true;
-		}
-	}
-};
-</script>
-<style lang="scss">
-* {
-	-webkit-tap-highlight-color: transparent;
-}
-[v-cloak] {
-	display: none;
-}
-body {
-	font-size: 16px;
-	margin: 0;
-	color: #2e2d2d;
-	font-family: PingHei, 'Microsoft YaHei', 'Lucida Grande', 'Lucida Sans Unicode', STHeiti, Helvetica, Arial, Verdana, 'sans-serif', 'PingHei-light',
-		SimHei, 'Droid Sans';
-}
-.demo-wrapper {
-	width: 100%;
-	min-height: 100vh;
-	padding-top: 40px;
-	box-sizing: border-box;
-	background: #f6f6f6;
-	&.in-iframe {
-		padding-top: 0;
-	}
-}
-h4 {
-	padding: 0 8px;
-	box-sizing: border-box;
-}
-.demo {
-	padding: 0 8px 20px 8px;
-}
-</style>

+ 0 - 33
lib/plugin/cli/site/demo/asset/css/common.scss

@@ -1,33 +0,0 @@
-html,
-body {
-	width: 100%;
-}
-.fade-enter-active,
-.fade-leave-active {
-	transition: opacity 0.5s ease;
-}
-
-.fade-enter,
-.fade-leave-active {
-	opacity: 0;
-}
-
-h4 {
-	margin: 20px 0 10px;
-}
-
-.demo-list {
-	padding-left: 0;
-	padding-right: 0;
-	overflow: hidden;
-	h4 {
-		padding: 0 8px;
-		box-sizing: border-box;
-	}
-}
-
-p {
-	font-size: 12px;
-	margin: 5px 10px;
-	color: #666;
-}

+ 0 - 5
lib/plugin/cli/site/demo/asset/css/custom.scss

@@ -1,5 +0,0 @@
-// Color
-$primary-color: #4169e1;
-$gradient-start-color: mix($primary-color, #fff, 60%);
-$gradient-end-color: mix($primary-color, #fff, 80%);
-$btn-gradient-bg: linear-gradient(315deg, $gradient-start-color 0%, $gradient-end-color 100%);

BIN
lib/plugin/cli/site/demo/asset/img/favicon.ico


BIN
lib/plugin/cli/site/demo/asset/img/loading.gif


BIN
lib/plugin/cli/site/demo/asset/img/logo.png


BIN
lib/plugin/cli/site/demo/asset/img/logo_share.png


BIN
lib/plugin/cli/site/demo/asset/img/pwa_logo.png


+ 0 - 12
lib/plugin/cli/site/demo/asset/manifest.json

@@ -1,12 +0,0 @@
-{
-	"short_name": "NutUI",
-	"name": "一套京东风格的移动端Vue组件库",
-	"icons": [
-		{
-			"src": "/img/pwa_logo.png",
-			"type": "image/png",
-			"sizes": "144x144"
-		}
-	],
-	"start_url": "/demo.html"
-}

File diff suppressed because it is too large
+ 0 - 1
lib/plugin/cli/site/demo/asset/share.min.js


+ 0 - 59
lib/plugin/cli/site/demo/index.html

@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-  <meta charset="utf-8" />
-  <meta content="telephone=no" name="format-detection" />
-  <link rel="shortcut icon" href="/favicon.ico">
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <link rel="manifest" href="./demo/manifest.json">
-  <title>NutUI - 移动端Vue组件库</title>
-  <script src="https://h5.m.jd.com/babelDiy/Zeus/2846ykuM7PwipD9E2RzMj2BGEQpA/plugin/share.min.js"></script>
-  <style>
-    html {
-      background: #F6F6F6;
-    }
-
-    a[title=站长统计] {
-      display: none;
-    }
-  </style>
-</head>
-
-<body>
-  <script>
-    //分享配置
-    var shareOption = {
-      iconUrl: 'https://nutui.jd.com/img/logo_share.png',
-      url: 'https://nutui.jd.com/demo.html#/index',
-      title: '轻量级移动端Vue组件库 - NutUI 2.0',
-      desc: '京东风格的Vue组件库'
-    };
-
-    try {
-      /*初始化分享*/
-      share.shareInit(shareOption);
-    } catch (e) {
-      console.log(e);
-    }
-  </script>
-  <div id="demo">
-
-  </div>
-  <script type="text/javascript">
-    var jaq = jaq || [];
-    jaq.push(['account', 'JA2018_1831300']);
-    jaq.push(['domain', 'jd.com']);
-    (function () {
-      var ja = document.createElement('script');
-      ja.type = 'text/javascript';
-      ja.async = true;
-      ja.src = '//wl.jd.com/joya.js';
-      var s = document.getElementsByTagName('script')[0];
-      s.parentNode.insertBefore(ja, s);
-    })()
-  </script>
-  <script type="text/javascript" src="https://s23.cnzz.com/z_stat.php?id=1276268086&web_id=1276268086"></script>
-</body>
-
-</html>

+ 0 - 19
lib/plugin/cli/site/demo/lang/en-US.js

@@ -1,19 +0,0 @@
-const lang = {
-    demo: {
-        cell: {
-            h4_1: 'Base Usage[{subTitle}]',
-            h4_1title: 'I am a title',
-            h4_1subtitle: 'I am a subtitle',
-            h4_1sesc: 'description',
-            h4_1link: 'with link',
-            h4_1desc: 'show default ICON',
-            h4_2: 'Distributing content through Slot'
-        },
-        dialog:{
-            okBtnTxt:'aa1',
-            CancelBtnTxt:'aa2'
-        }
-    }
-}
-
-export default lang 

+ 0 - 19
lib/plugin/cli/site/demo/lang/zn-CH.js

@@ -1,19 +0,0 @@
-const lang = {
-    demo: {
-        cell: {
-            h4_1: '基本用法',
-            h4_1title: '我是标题',
-            h4_1subtitle: '我是副标题',
-            h4_1sesc: '描述文字',
-            h4_1link: '带链接',
-            h4_1desc: '展示默认ICON',
-            h4_2: '通过Slot插槽分发内容'
-        },
-        dialog: {
-            okBtnTxt: '确定1',
-            CancelBtnTxt: '取消1'
-        }
-    }
-}
-
-export default lang 

+ 0 - 50
lib/plugin/cli/site/demo/router.js

@@ -1,50 +0,0 @@
-import Vue from 'vue';
-import VueRouter from 'vue-router';
-import { packages } from '@/config.json';
-
-import Index from './view/index.vue';
-import DemoNav from './view/demonav.vue';
-
-Vue.use(VueRouter);
-
-const routes = [
-	{
-		path: '*',
-		redirect: '/index'
-	},
-	{
-		name: 'index',
-		path: '/index',
-		components: {
-			main: Index,
-			demonav: DemoNav
-		}
-	}
-];
-
-//组件示例页面
-packages.map(item => {
-	if (item.showDemo === false) return;
-	const pkgName = item.name.toLowerCase();
-	routes.push({
-		path: '/' + item.name,
-		components: {
-			main: () => import(`@/packages/${pkgName}/demo.vue`),
-			demonav: DemoNav
-		},
-		name: item.name
-	});
-});
-
-const router = new VueRouter({
-	routes,
-	scrollBehavior(to, from, savedPosition) {
-		if (to.path == '/index') {
-			return null;
-		} else {
-			return { x: 0, y: 0 };
-		}
-	}
-});
-
-export default router;

File diff suppressed because it is too large
+ 0 - 106
lib/plugin/cli/site/demo/view/demonav.vue


File diff suppressed because it is too large
+ 0 - 233
lib/plugin/cli/site/demo/view/index.vue


+ 0 - 21
lib/plugin/cli/site/demo/view/mixin.js

@@ -1,21 +0,0 @@
-export default {
-  data() {
-    return {
-      isMobile: false,
-      cacheHasNewVersion:false
-    };
-  },
-  methods: {
-    checkIsMob() {
-      if (window.navigator.userAgent.match(
-          /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|IEMobile|MQQBrowser|JUC|Windows Phone)/i)) {
-        return true;
-      } else {
-        return false;
-      }
-    }
-  },
-  mounted() {
-    this.isMobile = this.checkIsMob();
-  }
-};

+ 0 - 30
lib/plugin/cli/site/doc/app.js

@@ -1,30 +0,0 @@
-import 'core-js/modules/es6.promise';
-import 'core-js/modules/es6.array.iterator';
-import Vue from 'vue';
-import App from './App.vue';
-import router from './router';
-import copy from 'clipboard';
-// import backtop from './compents/backtop/backtop.js';
-// import './compents/backtop/backtop.css';
-// backtop.install(Vue);
-import 'highlight.js/styles/github.css';
-// import VueStickto from './compents/vue-stickto/VueStickto.js';
-// Vue.use(VueStickto);
-import codes from 'qrcode';
-import { isMobile } from './asset/js/utils.js';
-
-if (isMobile) {
-	location.replace('demo.html' + location.hash);
-}
-
-Vue.prototype.copy = copy;
-Vue.prototype.qrcode = codes;
-
-Vue.config.productionTip = false;
-
-new Vue({
-	el: '#doc',
-	router,
-	components: { App },
-	template: '<App/>'
-});

File diff suppressed because it is too large
+ 0 - 566
lib/plugin/cli/site/doc/app.vue


File diff suppressed because it is too large
+ 0 - 286
lib/plugin/cli/site/doc/asset/css/common.scss


BIN
lib/plugin/cli/site/doc/asset/css/i/1_1.png


BIN
lib/plugin/cli/site/doc/asset/css/i/1_2.png


BIN
lib/plugin/cli/site/doc/asset/css/i/2_1.png


BIN
lib/plugin/cli/site/doc/asset/css/i/2_2.png


BIN
lib/plugin/cli/site/doc/asset/css/i/3_1.png


BIN
lib/plugin/cli/site/doc/asset/css/i/3_2.png


BIN
lib/plugin/cli/site/doc/asset/css/i/Shape.png


BIN
lib/plugin/cli/site/doc/asset/css/i/all.png


BIN
lib/plugin/cli/site/doc/asset/css/i/bg.png


BIN
lib/plugin/cli/site/doc/asset/css/i/close.png


BIN
lib/plugin/cli/site/doc/asset/css/i/cp.png


BIN
lib/plugin/cli/site/doc/asset/css/i/explor.png


BIN
lib/plugin/cli/site/doc/asset/css/i/fengche.png


BIN
lib/plugin/cli/site/doc/asset/css/i/flower.png


BIN
lib/plugin/cli/site/doc/asset/css/i/flowerpot.png


BIN
lib/plugin/cli/site/doc/asset/css/i/fly.png


BIN
lib/plugin/cli/site/doc/asset/css/i/github.png


BIN
lib/plugin/cli/site/doc/asset/css/i/goods.png


BIN
lib/plugin/cli/site/doc/asset/css/i/iframe_iphonex.png


BIN
lib/plugin/cli/site/doc/asset/css/i/jion_us.gif


BIN
lib/plugin/cli/site/doc/asset/css/i/kuang.png


BIN
lib/plugin/cli/site/doc/asset/css/i/leaf_1.png


BIN
lib/plugin/cli/site/doc/asset/css/i/leaf_2.png


BIN
lib/plugin/cli/site/doc/asset/css/i/leaf_3.png


BIN
lib/plugin/cli/site/doc/asset/css/i/leaf_4.png


BIN
lib/plugin/cli/site/doc/asset/css/i/logo.png


BIN
lib/plugin/cli/site/doc/asset/css/i/logo2.png


BIN
lib/plugin/cli/site/doc/asset/css/i/nut-icon.png


BIN
lib/plugin/cli/site/doc/asset/css/i/nut.png


BIN
lib/plugin/cli/site/doc/asset/css/i/people.png


BIN
lib/plugin/cli/site/doc/asset/css/i/phone.png


BIN
lib/plugin/cli/site/doc/asset/css/i/phtitle.png


BIN
lib/plugin/cli/site/doc/asset/css/i/qrcode.png


BIN
lib/plugin/cli/site/doc/asset/css/i/search.png


BIN
lib/plugin/cli/site/doc/asset/css/i/sreach.png


+ 0 - 194
lib/plugin/cli/site/doc/asset/css/style-blue.scss

@@ -1,194 +0,0 @@
-.doc-cont {
-	margin: 0 0 0 60px;
-	position: relative;
-	h1 {
-		font-size: 30px;
-		font-weight: 700;
-		margin: 10px 0 20px;
-		color: #333333;
-	}
-	p {
-		font-size: 14px;
-		line-height: 1.8;
-		margin: 10px 0;
-	}
-	h1 + p,
-	h1 + p + p,
-	h1 + p + p {
-		color: #333333;
-	}
-	h2 {
-		margin: 30px 0 15px;
-		font-size: 22px;
-		font-weight: 400;
-		color: #333333;
-	}
-	h2 + p,
-	h2 + p + p {
-		color: #3f4449;
-	}
-	h3 {
-		margin: 20px 0 10px;
-		font-size: 18px;
-		font-weight: 400;
-		color: #333333;
-	}
-	h3 + p,
-	h3 + p + p {
-		color: #3f4449;
-	}
-	h4 {
-		font-size: 14px;
-		font-weight: normal;
-		margin: 15px 0;
-		color: #666666;
-	}
-	h4 + p,
-	h4 + p + p,
-	h4 + p + p + p {
-		color: #666666;
-	}
-	h4 + p::nth-child(n) {
-		color: #666666;
-	}
-	blockquote {
-		padding: 0;
-		margin: 0;
-		margin-top: 10px;
-		p {
-			margin: 0;
-			display: inline-block;
-			background: rgba(83, 150, 255, 0.14);
-			font-size: 14px;
-			color: #333333;
-			border-radius: 4px;
-			text-decoration-style: none;
-			border-left: 8px solid #5396ff;
-			padding: 15px 54px 15px 22px;
-			line-height: 1.5;
-			overflow: hidden;
-			font-style: normal;
-		}
-	}
-	ul {
-		border-radius: 3px;
-		padding: 5px 20px 5px 0;
-		list-style: none;
-		p {
-			margin: 0;
-		}
-		ul {
-			margin: 0;
-			padding: 0;
-		}
-		li {
-			font-size: 14px;
-			color: #455a64;
-			padding: 7px;
-			line-height: 20px;
-			display: flex;
-			align-items: center;
-		}
-		li:before {
-			content: '';
-			width: 6px;
-			height: 6px;
-			border: 1px solid #455a64;
-			border-radius: 14px;
-			margin-right: 12px;
-			display: inline-block;
-		}
-	}
-	ol {
-		background: #f2f4f5;
-		border-radius: 3px;
-		padding: 13px 40px;
-		li {
-			line-height: 20px;
-			padding: 7px 0 0 10px;
-			font-size: 14px;
-			color: #3f4449;
-		}
-	}
-	ul,
-	ol,
-	p,
-	table {
-		em {
-			color: #8cade9;
-			font-style: normal;
-			padding: 0 2px;
-		}
-		strong {
-			display: inline-block;
-			background: #f7f7f7;
-			border: 1px solid #ececec;
-			border-radius: 2px;
-			font-size: 13px;
-			line-height: 1;
-			color: #3f536e;
-			padding: 3px 5px;
-			margin: 0 5px;
-		}
-	}
-	table {
-		width: 100%;
-		border-collapse: collapse;
-		th {
-			background: #f7f7f7;
-			border: 1px solid #e9e9e9;
-			font-size: 14px;
-			line-height: 1.5;
-			color: #333333;
-			height: 40px;
-			padding: 0 20px 0 14px;
-		}
-		td {
-			border: 1px solid #e9e9e9;
-			font-size: 14px;
-			line-height: 1.5;
-			color: #3f4449;
-			height: 50px;
-			padding-left: 14px;
-		}
-	}
-	hr {
-		height: 1px;
-		border-width: 0;
-		background-color: #e7f0ff;
-	}
-	img[alt='full'] {
-		width: 100%;
-	}
-	img[alt='flex'] {
-		flex-shrink: 0;
-		width: 50%;
-		padding: 0 15px;
-		flex-basis: auto;
-		flex: 1;
-	}
-	p {
-		font-size: 14px;
-		white-space: unset;
-		word-break: break-all;
-	}
-	a {
-		color: #5396ff;
-		text-decoration: none;
-		&:hover {
-			text-decoration: underline;
-		}
-	}
-}
-
-// 书签样式
-.markList {
-	a {
-		color: #666;
-	}
-	.cur {
-		a {
-			color: #5396ff;
-		}
-	}
-}

+ 0 - 86
lib/plugin/cli/site/doc/asset/js/Detector.js

@@ -1,86 +0,0 @@
-/**
- * @author alteredq / http://alteredqualia.com/
- * @author mr.doob / http://mrdoob.com/
- */
-
-var Detector = {
-
-	canvas: !! window.CanvasRenderingContext2D,
-	webgl: ( function () {
-
-		try {
-
-			var canvas = document.createElement( 'canvas' ); return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) );
-
-		} catch ( e ) {
-
-			return false;
-
-		}
-
-	} )(),
-	webgl2: ( function () {
-
-		try {
-
-			var canvas = document.createElement( 'canvas' ); return !! ( window.WebGL2RenderingContext && ( canvas.getContext( 'webgl2' ) ) );
-
-		} catch ( e ) {
-
-			return false;
-
-		}
-
-	} )(),
-	workers: !! window.Worker,
-	fileapi: window.File && window.FileReader && window.FileList && window.Blob,
-
-	getWebGLErrorMessage: function () {
-
-		var element = document.createElement( 'div' );
-		element.id = 'webgl-error-message';
-		element.style.fontFamily = 'monospace';
-		element.style.fontSize = '13px';
-		element.style.fontWeight = 'normal';
-		element.style.textAlign = 'center';
-		element.style.background = '#fff';
-		element.style.color = '#000';
-		element.style.padding = '1.5em';
-		element.style.width = '400px';
-		element.style.margin = '5em auto 0';
-
-		if ( ! this.webgl ) {
-
-			element.innerHTML = window.WebGLRenderingContext ? [
-				'Your graphics card does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br />',
-				'Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'
-			].join( '\n' ) : [
-				'Your browser does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br/>',
-				'Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'
-			].join( '\n' );
-
-		}
-
-		return element;
-
-	},
-
-	addGetWebGLMessage: function ( parameters ) {
-
-		var parent, id, element;
-
-		parameters = parameters || {};
-
-		parent = parameters.parent !== undefined ? parameters.parent : document.body;
-		id = parameters.id !== undefined ? parameters.id : 'oldie';
-
-		// element = Detector.getWebGLErrorMessage();
-		// element.id = id;
-
-		// parent.appendChild( element );
-
-	}
-
-};
-
-module.exports = Detector;

+ 0 - 18
lib/plugin/cli/site/doc/asset/js/bookmark.js

@@ -1,18 +0,0 @@
-import vb from '../asset/js/isVisibiliy.js';
-import root from '../root.js';
-        export default {
-            mixins:[root],
-            mounted(){
-              let visb = vb('.visibility');
-              visb.then(res=>{
-               
-               
-                let id  = res.target.id;
-                let index =id.replace(/head/,'');                
-                let li = document.querySelector('.level'+index);
-                if(li){
-                  
-                }
-              })
-            }
-        }

File diff suppressed because it is too large
+ 0 - 627
lib/plugin/cli/site/doc/asset/js/code.js


File diff suppressed because it is too large
+ 0 - 7
lib/plugin/cli/site/doc/asset/js/copy.js


+ 0 - 55
lib/plugin/cli/site/doc/asset/js/isVisibiliy.js

@@ -1,55 +0,0 @@
-function isVisibility(param){
-    
-    let domLists = document.querySelectorAll(param);
-    //元素属性
-    this.domList = domLists;
-    this.showDom = null; //当前展示的节点 
-    this.io = null;   
-}
-isVisibility.prototype.IntersectionObserverRun = function(){  
-    let _that = this;
-    if(IntersectionObserver){
-        _that.io = new IntersectionObserver(
-           (res)=>{
-            _that.Intersections(res)
-           },{  
-            rootMargin:'10px 0px 0px 0px',       
-            threshold: [ 0, Number.MIN_VALUE, 0.01]        
-        });
-        setTimeout(()=>{
-            //对当前元素进行监听
-            _that.domList.forEach((item)=>{
-                    _that.io.observe(item);
-            })
-        })
-    }
-    
-        
-} 
-isVisibility.prototype.Intersections = function (entries){
-    let _that = this;
-    if(// 正在交叉
-        entries[0].isIntersecting ||
-        // 交叉率大于0
-        entries[0].intersectionRatio){
-          
-            let showDom = entries[0];
-            this.showDom = showDom;
-            if(this.callback)   {
-                this.callback(showDom)   
-            }
-       
-    }
-};
-isVisibility.prototype.then = function(callback){   
-    
-    if(callback){
-        this.callback = callback;
-    }   
-}
-function run (param){
-   let visib = new isVisibility(param);
-   visib.IntersectionObserverRun();
-   return visib;
-}
-module.exports = run;

+ 0 - 7
lib/plugin/cli/site/doc/asset/js/utils.js

@@ -1,7 +0,0 @@
-
-const ua = navigator.userAgent.toLowerCase();
-const isMobile = /ios|iphone|ipod|ipad|android/.test(ua);
-
-export {
-    isMobile
-}

+ 0 - 92
lib/plugin/cli/site/doc/backup/fastStart.vue

@@ -1,92 +0,0 @@
-<template>
-	<div class="wrapper">
-		快速上手
-		<p id="copy">这个用来实验按钮的好坏</p>
-		<button class="btncp" data-clipboard-target="#copy">点击复制</button>
-	</div>
-</template>
-<style>
-body {
-	background: #fff;
-}
-</style>
-
-<script>
-export default {
-	name: 'index',
-	data() {
-		return {
-			path: '',
-			packages: {},
-			sortedPackages: [],
-			version: '',
-		};
-	},
-	watch: {
-		packages() {
-			const compare = (obj1, obj2) => {
-				const val1 = obj1.name;
-				const val2 = obj2.name;
-				if (val1 < val2) {
-					return -1;
-				} else if (val1 > val2) {
-					return 1;
-				} else {
-					return 0;
-				}
-			};
-
-			this.sortedPackages = [...this.packages].sort(compare);
-		},
-	},
-	methods: {},
-	created() {
-		// copys.on('success', function(e) {
-		//     console.info('Action:', e.action);
-		//     console.info('Text:', e.text);
-		//     console.info('Trigger:', e.trigger);
-		//     e.clearSelection();
-		// });
-	},
-};
-</script>
-<style></style>
-
-<style lang="scss" scoped>
-.logo {
-	text-align: center;
-	padding: 16px 0;
-	img {
-		width: 240px;
-	}
-	div {
-		font-family: Roboto, Lato, sans-serif;
-		font-size: 24px;
-		letter-spacing: 0.14px;
-		line-height: 20px;
-		margin-top: 12px;
-	}
-}
-.l-s {
-	list-style: none;
-	margin: 0;
-	padding: 10px 0;
-	li {
-		line-height: 40px;
-
-		border-bottom: 1px solid rgba(204, 204, 204, 0.4);
-		&:first-child {
-			border-top: none;
-		}
-	}
-	a {
-		text-decoration: none;
-		color: #333;
-		display: inline-block;
-		width: 100%;
-		height: 100%;
-		padding-left: 20px;
-		box-sizing: border-box;
-	}
-}
-</style>

+ 0 - 92
lib/plugin/cli/site/doc/backup/international.vue

@@ -1,92 +0,0 @@
-<template>
-	<div class="wrapper">
-		国际化f
-		<p id="copy">这个用来实验按钮的好坏</p>
-		<button class="btncp" data-clipboard-target="#copy">点击复制</button>
-	</div>
-</template>
-<style>
-body {
-	background: #fff;
-}
-</style>
-
-<script>
-export default {
-	name: 'index',
-	data() {
-		return {
-			path: '',
-			packages: {},
-			sortedPackages: [],
-			version: '',
-		};
-	},
-	watch: {
-		packages() {
-			const compare = (obj1, obj2) => {
-				const val1 = obj1.name;
-				const val2 = obj2.name;
-				if (val1 < val2) {
-					return -1;
-				} else if (val1 > val2) {
-					return 1;
-				} else {
-					return 0;
-				}
-			};
-
-			this.sortedPackages = [...this.packages].sort(compare);
-		},
-	},
-	methods: {},
-	created() {
-		// copys.on('success', function(e) {
-		//     console.info('Action:', e.action);
-		//     console.info('Text:', e.text);
-		//     console.info('Trigger:', e.trigger);
-		//     e.clearSelection();
-		// });
-	},
-};
-</script>
-<style></style>
-
-<style lang="scss" scoped>
-.logo {
-	text-align: center;
-	padding: 16px 0;
-	img {
-		width: 240px;
-	}
-	div {
-		font-family: Roboto, Lato, sans-serif;
-		font-size: 24px;
-		letter-spacing: 0.14px;
-		line-height: 20px;
-		margin-top: 12px;
-	}
-}
-.l-s {
-	list-style: none;
-	margin: 0;
-	padding: 10px 0;
-	li {
-		line-height: 40px;
-
-		border-bottom: 1px solid rgba(204, 204, 204, 0.4);
-		&:first-child {
-			border-top: none;
-		}
-	}
-	a {
-		text-decoration: none;
-		color: #333;
-		display: inline-block;
-		width: 100%;
-		height: 100%;
-		padding-left: 20px;
-		box-sizing: border-box;
-	}
-}
-</style>

+ 0 - 92
lib/plugin/cli/site/doc/backup/intr.vue

@@ -1,92 +0,0 @@
-<template>
-	<div class="wrapper">
-		自我介绍页
-		<p id="copy">这个用来实验按钮的好坏</p>
-		<button class="btncp" data-clipboard-target="#copy">点击复制</button>
-	</div>
-</template>
-<style>
-body {
-	background: #fff;
-}
-</style>
-
-<script>
-export default {
-	name: 'index',
-	data() {
-		return {
-			path: '',
-			packages: {},
-			sortedPackages: [],
-			version: '',
-		};
-	},
-	watch: {
-		packages() {
-			const compare = (obj1, obj2) => {
-				const val1 = obj1.name;
-				const val2 = obj2.name;
-				if (val1 < val2) {
-					return -1;
-				} else if (val1 > val2) {
-					return 1;
-				} else {
-					return 0;
-				}
-			};
-
-			this.sortedPackages = [...this.packages].sort(compare);
-		},
-	},
-	methods: {},
-	created() {
-		// copys.on('success', function(e) {
-		//     console.info('Action:', e.action);
-		//     console.info('Text:', e.text);
-		//     console.info('Trigger:', e.trigger);
-		//     e.clearSelection();
-		// });
-	},
-};
-</script>
-<style></style>
-
-<style lang="scss" scoped>
-.logo {
-	text-align: center;
-	padding: 16px 0;
-	img {
-		width: 240px;
-	}
-	div {
-		font-family: Roboto, Lato, sans-serif;
-		font-size: 24px;
-		letter-spacing: 0.14px;
-		line-height: 20px;
-		margin-top: 12px;
-	}
-}
-.l-s {
-	list-style: none;
-	margin: 0;
-	padding: 10px 0;
-	li {
-		line-height: 40px;
-
-		border-bottom: 1px solid rgba(204, 204, 204, 0.4);
-		&:first-child {
-			border-top: none;
-		}
-	}
-	a {
-		text-decoration: none;
-		color: #333;
-		display: inline-block;
-		width: 100%;
-		height: 100%;
-		padding-left: 20px;
-		box-sizing: border-box;
-	}
-}
-</style>

+ 0 - 92
lib/plugin/cli/site/doc/backup/theme.vue

@@ -1,92 +0,0 @@
-<template>
-	<div class="wrapper">
-		主题
-		<p id="copy">这个用来实验按钮的好坏</p>
-		<button class="btncp" data-clipboard-target="#copy">点击复制</button>
-	</div>
-</template>
-<style>
-body {
-	background: #fff;
-}
-</style>
-
-<script>
-export default {
-	name: 'index',
-	data() {
-		return {
-			path: '',
-			packages: {},
-			sortedPackages: [],
-			version: '',
-		};
-	},
-	watch: {
-		packages() {
-			const compare = (obj1, obj2) => {
-				const val1 = obj1.name;
-				const val2 = obj2.name;
-				if (val1 < val2) {
-					return -1;
-				} else if (val1 > val2) {
-					return 1;
-				} else {
-					return 0;
-				}
-			};
-
-			this.sortedPackages = [...this.packages].sort(compare);
-		},
-	},
-	methods: {},
-	created() {
-		// copys.on('success', function(e) {
-		//     console.info('Action:', e.action);
-		//     console.info('Text:', e.text);
-		//     console.info('Trigger:', e.trigger);
-		//     e.clearSelection();
-		// });
-	},
-};
-</script>
-<style></style>
-
-<style lang="scss" scoped>
-.logo {
-	text-align: center;
-	padding: 16px 0;
-	img {
-		width: 240px;
-	}
-	div {
-		font-family: Roboto, Lato, sans-serif;
-		font-size: 24px;
-		letter-spacing: 0.14px;
-		line-height: 20px;
-		margin-top: 12px;
-	}
-}
-.l-s {
-	list-style: none;
-	margin: 0;
-	padding: 10px 0;
-	li {
-		line-height: 40px;
-
-		border-bottom: 1px solid rgba(204, 204, 204, 0.4);
-		&:first-child {
-			border-top: none;
-		}
-	}
-	a {
-		text-decoration: none;
-		color: #333;
-		display: inline-block;
-		width: 100%;
-		height: 100%;
-		padding-left: 20px;
-		box-sizing: border-box;
-	}
-}
-</style>

+ 0 - 92
lib/plugin/cli/site/doc/backup/update.vue

@@ -1,92 +0,0 @@
-<template>
-	<div class="wrapper">
-		更新
-		<p id="copy">这个用来实验按钮的好坏</p>
-		<button class="btncp" data-clipboard-target="#copy">点击复制</button>
-	</div>
-</template>
-<style>
-body {
-	background: #fff;
-}
-</style>
-
-<script>
-export default {
-	name: 'index',
-	data() {
-		return {
-			path: '',
-			packages: {},
-			sortedPackages: [],
-			version: '',
-		};
-	},
-	watch: {
-		packages() {
-			const compare = (obj1, obj2) => {
-				const val1 = obj1.name;
-				const val2 = obj2.name;
-				if (val1 < val2) {
-					return -1;
-				} else if (val1 > val2) {
-					return 1;
-				} else {
-					return 0;
-				}
-			};
-
-			this.sortedPackages = [...this.packages].sort(compare);
-		},
-	},
-	methods: {},
-	created() {
-		// copys.on('success', function(e) {
-		//     console.info('Action:', e.action);
-		//     console.info('Text:', e.text);
-		//     console.info('Trigger:', e.trigger);
-		//     e.clearSelection();
-		// });
-	},
-};
-</script>
-<style></style>
-
-<style lang="scss" scoped>
-.logo {
-	text-align: center;
-	padding: 16px 0;
-	img {
-		width: 240px;
-	}
-	div {
-		font-family: Roboto, Lato, sans-serif;
-		font-size: 24px;
-		letter-spacing: 0.14px;
-		line-height: 20px;
-		margin-top: 12px;
-	}
-}
-.l-s {
-	list-style: none;
-	margin: 0;
-	padding: 10px 0;
-	li {
-		line-height: 40px;
-
-		border-bottom: 1px solid rgba(204, 204, 204, 0.4);
-		&:first-child {
-			border-top: none;
-		}
-	}
-	a {
-		text-decoration: none;
-		color: #333;
-		display: inline-block;
-		width: 100%;
-		height: 100%;
-		padding-left: 20px;
-		box-sizing: border-box;
-	}
-}
-</style>

+ 0 - 52
lib/plugin/cli/site/doc/code.vue

@@ -1,52 +0,0 @@
-<template>
-	<div>
-		<div class="nut-qrcode" id="qrcode">二维码位置</div>
-	</div>
-</template>
-<script>
-import QRCode from './asset/js/code.js';
-export default {
-	name: 'nut-qrcode',
-	props: {
-		QCWidth: {
-			type: Number,
-			default: 160,
-		},
-		QCHeight: {
-			type: Number,
-			default: 160,
-		},
-		content: {
-			type: String,
-			required: true,
-		},
-		fontColor: {
-			type: String,
-			default: '#000',
-		},
-		backColor: {
-			type: String,
-			default: '#fff',
-		},
-	},
-	data() {
-		return {};
-	},
-	mounted() {
-		this.qrcode();
-	},
-	methods: {
-		qrcode() {
-			let qrcode = new QRCode('qrcode', {
-				width: this.QCWidth,
-				height: this.QCHeight, // 高度
-				text: this.content, // 二维码内容
-				colorDark: this.fontColor,
-				colorLight: this.backColor,
-				margin: 0,
-			});
-		},
-	},
-};
-</script>
-<style lang="scss"></style>

+ 0 - 113
lib/plugin/cli/site/doc/compents/hidden/hidden.vue

@@ -1,113 +0,0 @@
-<template>
-	<div
-		class="swap"
-		:class="{
-			hasPadding: heightSlot > 400,
-		}"
-	>
-		<div
-			class="eidt-box"
-			:class="{
-				show: isShow,
-				hide: isHide,
-			}"
-		>
-			<slot></slot>
-		</div>
-		<div :title="titleMsg" v-if="heightSlot > 400" class="bar" @click="showall">
-			<svg width="20" viewBox="0,0 20,10">
-				<path
-					v-if="isShow"
-					d="M 0,5 
-                            L10,10 
-                            L 20,5"
-					fill="none"
-					stroke="#000"
-				></path>
-				<path
-					v-if="!isShow"
-					d="M 0,5 
-                            L10,0 
-                            L 20,5"
-					fill="none"
-					stroke="#000"
-				></path>
-			</svg>
-		</div>
-	</div>
-</template>
-<script>
-export default {
-	data() {
-		return {
-			siteHeight: {
-				height: '',
-			},
-			isShow: true,
-			isHide: false,
-			//  盒子高度
-			heightSlot: 0,
-			titleMsg: '点击展开',
-		};
-	},
-	methods: {
-		showall() {
-			this.isShow = !this.isShow;
-			this.isHide = !this.isHide;
-			if (this.isHide) {
-				this.siteHeight = { height: this.heightSlot + 'px' };
-				this.titleMsg = '点击收起';
-			} else {
-				this.siteHeight = {
-					height: '400px',
-				};
-				this.titleMsg = '点击展开';
-			}
-		},
-	},
-	mounted() {
-		this.heightSlot = this.$slots.default[0].elm.offsetHeight;
-		if (this.heightSlot < 400) {
-			this.siteHeight = { height: '' };
-		} else {
-			this.siteHeight = { height: '300px' };
-		}
-	},
-};
-</script>
-<style lang="scss" scoped>
-.eidt-box {
-	transition: all 0.5s;
-}
-.swap {
-	position: relative;
-
-	background: #f2f4f5;
-	margin: 16px 0;
-}
-.hasPadding {
-	padding-bottom: 30px;
-}
-.show {
-	overflow: hidden;
-	position: relative;
-	max-height: 400px;
-}
-.hide {
-	position: relative;
-	max-height: 4000px;
-}
-.bar {
-	height: 30px;
-	width: 100%;
-	bottom: 0;
-	background: linear-gradient(rgba(255, 255, 255, 0), #fafafa);
-	position: absolute;
-	z-index: 1;
-	text-align: center;
-	cursor: pointer;
-	svg {
-		vertical-align: bottom;
-	}
-}
-</style>

File diff suppressed because it is too large
+ 0 - 1
lib/plugin/cli/site/doc/compents/vue-stickto/VueStickto.js


+ 0 - 40
lib/plugin/cli/site/doc/index.html

@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-  <meta charset="utf-8" />
-  <meta content="telephone=no" name="format-detection" />
-  <link rel="shortcut icon" href="/favicon.ico">
-  <title>NutUI - 移动端Vue组件库</title>
-  <meta name="description" content="移动端Vue组件库NutUI官网" />
-  <meta name="keywords" content="NutUI,NutUI 2.0,移动端Vue组件库,Vue移动端组件库,Vue组件库,Vue components,JDC,京东用户体验设计部" />
-  <script src="//misc.360buyimg.com/felibs/vue/2.5.16/vue.min.js"></script>
-  <style>
-    a[title=站长统计]{
-      display: none;
-    }
-  </style>
-</head>
-
-<body>
-  <div id="doc">
-
-  </div>
-
-  <script type="text/javascript">
-    var jaq = jaq || [];
-    jaq.push(['account', 'JA2018_1831300']);
-    jaq.push(['domain', 'jd.com']);
-    (function () {
-      var ja = document.createElement('script');
-      ja.type = 'text/javascript';
-      ja.async = true;
-      ja.src = '//wl.jd.com/joya.js';
-      var s = document.getElementsByTagName('script')[0];
-      s.parentNode.insertBefore(ja, s);
-    })()
-  </script>
-  <script type="text/javascript" src="https://s23.cnzz.com/z_stat.php?id=1276268086&web_id=1276268086"></script>
-</body>
-
-</html>

File diff suppressed because it is too large
+ 0 - 932
lib/plugin/cli/site/doc/index.vue


+ 0 - 280
lib/plugin/cli/site/doc/info.vue

@@ -1,280 +0,0 @@
-<template>
-	<div class="main-menu lt-nv">
-		<div class="left-nav-fixed">
-			<ol class="nav-l-1">
-				<dt>指南</dt>
-				<dd :class="curName == 'intr' ? 'l-1 curs' : 'l-1'">
-					<a href="#/intro">介绍</a>
-				</dd>
-				<dd :class="curName == 'fastStart' ? 'l-1 curs' : 'l-1'">
-					<a href="#/start">快速上手</a>
-				</dd>
-				<dd :class="curName == 'theme' ? 'l-1 curs' : 'l-1'">
-					<a href="#/theme">主题定制</a>
-				</dd>
-				<dd :class="curName == 'international' ? 'l-1 curs' : 'l-1'">
-					<a href="#/international">国际化</a>
-				</dd>
-				<dd :class="curName == 'update' ? 'l-1 curs' : 'l-1'">
-					<a href="https://github.com/jdf2e/nutui/releases" target="_blank">更新日志</a>
-				</dd>
-			</ol>
-			<ol class="cplist">
-				<dt>组件</dt>
-				<dd
-					class="l-1"
-					@click="selectNav(nameObj.name)"
-					:class="cur.indexOf(nameObj.name) > -1 && 'cur'"
-					v-for="(nameObj, index) in sortedPackages"
-					:key="index"
-				>
-					<div class="l-c-i">
-						<span>{{ nameObj.name }}</span>
-						<i class="pt"></i>
-					</div>
-					<ul class="l-2" v-if="cur.indexOf(nameObj.name) > -1">
-						<template v-for="cpt in nameObj.ary">
-							<li v-on:click.stop="listCheck(cpt)" :class="curName == cpt.name ? 'curs' : ''" :key="cpt.name" v-if="cpt.showDemo">
-								<router-link :to="{ name: cpt.name.toLowerCase() }">
-									{{ cpt.name }}
-									<span>{{ cpt.chnName }}</span>
-								</router-link>
-							</li>
-						</template>
-					</ul>
-				</dd>
-			</ol>
-		</div>
-	</div>
-</template>
-<script>
-import { sorts, packages } from '@/config.json';
-import { version } from '@/../package.json';
-export default {
-	name: 'index',
-	data() {
-		return {
-			path: '',
-			packages: {},
-			sortedPackages: [],
-			cur: [],
-			curName: '',
-			version: version
-		};
-	},
-
-	watch: {
-		packages() {
-			// const compare = (obj1, obj2) => {
-			//   const val1 = obj1.name;
-			//   const val2 = obj2.name;
-			//   if (val1 < val2) {
-			//     return -1;
-			//   } else if (val1 > val2) {
-			//     return 1;
-			//   } else {
-			//     return 0;
-			//   }
-			// };
-			let that = this;
-			let tempAry = [];
-			let temp = {};
-			let sorts = this.sorts;
-			let sortArys = [...this.packages];
-			sortArys.map(item => {
-				let name = sorts[item.sort];
-				if (!temp[name]) {
-					temp[name] = [];
-				}
-				temp[name].push(item);
-			});
-			for (let key in temp) {
-				tempAry.push({
-					name: key,
-					ary: temp[key]
-				});
-			}
-			let routeName = this.$route.name;
-			this.sortedPackages = tempAry;
-			tempAry.map(list => {
-				let showParentNode = false;
-				list.ary.map(ary => {
-					if (ary.name == routeName) {
-						showParentNode = true;
-					}
-				});
-				if (showParentNode) {
-					that.cur.push(list.name);
-				}
-			});
-		},
-		$route: 'fetchData'
-	},
-	methods: {
-		fetchData(obj) {
-			let that = this;
-			this.curName = obj.name;
-			let sortedPackages = this.sortedPackages;
-
-			this.selectNav(obj.name);
-		},
-		listCheck(obj) {
-			// this.curName = obj.name;
-		},
-		selectNav(val) {
-			let nowCur = this.cur;
-			let index = nowCur.indexOf(val);
-			if (index > -1) {
-				nowCur.splice(index, 1);
-			} else {
-				nowCur.push(val);
-			}
-			this.cur = nowCur;
-		}
-	},
-	created() {
-		let nameRt = this.$route.name;
-		let packgs = packages;
-
-		this.cur = sorts;
-		this.curName = nameRt;
-		this.packages = packgs;
-		this.sorts = sorts;
-	}
-};
-</script>
-<style lang="scss" scoped>
-.fade-enter-active,
-.fade-leave-active {
-	transition: all 1s;
-}
-.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
-	opacity: 0;
-	height: 0;
-}
-ul,
-ol {
-	margin: 0;
-	list-style: none;
-	padding: 0;
-}
-
-dt {
-	font-size: 16px;
-	font-weight: 500;
-	text-indent: 35px;
-	color: #5b657b;
-	margin: 10px 0;
-}
-
-dd {
-	margin: 0;
-	& > a {
-		display: block;
-		height: 100%;
-		cursor: pointer;
-	}
-}
-.cplist {
-	padding-bottom: 20px;
-}
-.left-nav-fixed {
-	margin-top: 115px;
-}
-.lt-nv {
-	font-size: 14px;
-	width: 295px;
-	border-right: 1px solid #d8d8d8;
-	a,
-	span {
-		text-decoration: none;
-		color: #666666;
-	}
-	.curs {
-		border-right: 4px solid #5396ff;
-		color: #5396ff;
-		background: rgba(83, 150, 255, 0.14);
-		a,
-		span {
-			color: #5396ff;
-		}
-	}
-	.pt {
-		width: 0;
-		height: 0;
-		vertical-align: middle;
-		border-width: 5px 5px 0;
-		border-style: solid;
-		border-color: #333 transparent transparent;
-		transform: rotate(-90deg);
-	}
-	.l-1 {
-		line-height: 40px;
-		a {
-			padding: 0 0 0 35px;
-		}
-	}
-	.l-c {
-		a {
-			padding: 0 0 0 35px;
-		}
-	}
-	.l-c-i {
-		cursor: pointer;
-		position: relative;
-		span {
-			padding: 0 0 0 35px;
-		}
-		.pt {
-			float: right;
-			margin: 20px 20px 0 0;
-		}
-	}
-	.l-2 {
-		overflow: hidden;
-		a {
-			font-size: 14px;
-			padding: 0 0 0 50px;
-			span {
-				font-size: 12px;
-				padding: 0 0 0 8px;
-			}
-		}
-	}
-	.cur {
-		.pt {
-			transition: all 0.5s;
-			transform: rotate(0deg);
-		}
-	}
-	.l-2 {
-		a {
-			display: inline-block;
-			box-sizing: border-box;
-			width: 100%;
-			border-right: 1px solid #fff;
-		}
-		li:hover {
-			transition: all 0.5;
-			background: rgba(83, 150, 255, 0.14);
-			border-right: 4px solid #5396ff;
-			color: #5396ff;
-			a,
-			span {
-				color: #5396ff;
-			}
-		}
-	}
-	.nav-l-1 {
-		dd:hover {
-			transition: all 0.5;
-			background: rgba(83, 150, 255, 0.14);
-			border-right: 4px solid #5396ff;
-			a,
-			span {
-				color: #5396ff;
-			}
-		}
-	}
-}
-</style>

+ 0 - 68
lib/plugin/cli/site/doc/root.js

@@ -1,68 +0,0 @@
-import hide from './compents/hidden/hidden.vue';
-import vb from './asset/js/isVisibiliy.js';
-const myMixin ={
-    data(){
-        return {
-          content:'',
-          codeurl:'',
-          demourl:'',
-          levalcur:1
-        }
-      },
-    components:{
-        hide
-    },
-    methods:{
-        leavelchose(index){
-          this.levalcur = index;
-        },
-        closelayer(){
-          this.content = '';
-        },
-        toast(e){
-          const options = {
-            noHeader:true,
-            noFooter:true,
-            content:e.target.parentElement.outerHTML
-          }        
-          this.content = options.content;
-          let copy = this.copy;
-          new copy('.copy',{
-              target:res => {         
-                return res.previousElementSibling
-              }
-          });   
-        },  
-        dsCode(e){
-            let tag = e.target;
-            if(tag.attributes.toast){
-                this.toast(e)  
-            }      
-        }
-  },
-  mounted(){  
-    let visb = vb('.visibility');
-    visb.then(res=>{
-      let id  = res.target.id;
-      let index =Number(id.replace(/head/,''));       
-      if(index>0){
-        this.levalcur = index
-      }
-    })
-    this.$nextTick(()=>{
-        let copy = this.copy;
-        new copy('.copy',{
-            target:res => {         
-            return res.previousElementSibling
-            }
-        });    
-        let demourl = 'https://nutui.jd.com/demo.html#'+this.$route.path;
-        this.demourl = demourl;
-        this.qrcode.toDataURL(demourl,{width:170},(err,url)=>{
-            this.codeurl = url
-        });
-    });
-  }
-}
-
-export default myMixin;

+ 0 - 97
lib/plugin/cli/site/doc/router.js

@@ -1,97 +0,0 @@
-import Vue from 'vue';
-import VueRouter from 'vue-router';
-import { packages } from '@/config.json';
-
-import frontCover from './index.vue';
-
-const Index = () => import(/* webpackPrefetch: true */ /* webpackChunkName: 'info' */ './info.vue');
-const Intro = () => import(/* webpackPrefetch: true */ /* webpackChunkName: 'intro' */ './page/intro.vue');
-const Start = () => import(/* webpackPrefetch: true */ /* webpackChunkName: 'start' */ './page/start.vue');
-const International = () => import(/* webpackPrefetch: true */ /* webpackChunkName: 'international' */ './page/international.vue');
-const Theme = () => import(/* webpackPrefetch: true */ /* webpackChunkName: 'theme' */ './page/theme.vue');
-const JoinUs = () => import(/* webpackPrefetch: true */ /* webpackChunkName: 'joinus' */ './page/joinus.vue');
-//const Update = () => import('./page/changelog.vue');
-
-Vue.use(VueRouter);
-
-const routes = [
-	{
-		path: '*',
-		redirect: '/index'
-	},
-	{
-		path: '/',
-		redirect: '/index'
-	},
-	{
-		path: '/index',
-		name: 'frontcover',
-		component: frontCover
-	},
-	{
-		path: '/intro',
-		name: 'intr',
-		components: {
-			default: Index,
-			main: Intro
-		}
-	},
-	{
-		path: '/international',
-		name: 'international',
-		components: {
-			default: Index,
-			main: International
-		}
-	},
-	{
-		path: '/start',
-		name: 'start',
-		components: {
-			default: Index,
-			main: Start
-		}
-	},
-	{
-		path: '/theme',
-		name: 'theme',
-		components: {
-			default: Index,
-			main: Theme
-		}
-	},
-	{
-		path: '/joinus',
-		name: 'joinus',
-		components: {
-			default: Index,
-			main: JoinUs
-		}
-	}
-];
-//组件md文件展示
-packages.map(item => {
-	if (item.showDemo === false) return;
-	const pkgName = item.name.toLowerCase();
-	routes.push({
-		path: '/' + item.name,
-		components: {
-			default: Index,
-			main: () => import('./view/' + pkgName + '.vue')
-		},
-		name: item.name
-	});
-});
-
-const router = new VueRouter({
-	routes,
-	scrollBehavior(to, from, savedPosition) {
-		if (to.path == '/index') {
-			return null;
-		} else {
-			return { x: 0, y: 0 };
-		}
-	}
-});
-
-export default router;

+ 0 - 149
lib/plugin/cli/site/doc/search.vue

@@ -1,149 +0,0 @@
-<template>
-	<div class="search-box">
-		<input @focus="onfocus" @keyup="choseList" v-model="searchVal" class="search" type="text" placeholder="搜索组件..." />
-		<!-- <transition name="fade"> -->
-		<ul class="search-list" v-if="searchList.length > 0">
-			<li :class="searchCurName == item.name ? 'cur' : ''" @click="checklist(item)" v-for="(item, index) in searchList" :key="index">
-				<router-link :to="{ name: item.name.toLowerCase() }">
-					{{ item.name }}
-					<span>{{ item.chnName }}</span>
-				</router-link>
-			</li>
-		</ul>
-		<!-- </transition> -->
-	</div>
-</template>
-<script>
-import { packages } from '@/config.json';
-export default {
-	data() {
-		return {
-			packages,
-			searchVal: '',
-			searchList: [],
-			searchCurName: '',
-			searchIndex: 0
-		};
-	},
-	watch: {
-		searchVal(sVal) {
-			if (sVal) {
-				this.searchList = this.packages.filter(item => {
-					if (item.showDemo === false) return false;
-					const rx = new RegExp(sVal, 'gi');
-					return rx.test(item.name + ' ' + item.chnName + '' + item.desc);
-				});
-			} else {
-				this.searchCurName = '';
-				this.searchIndex = 0;
-				this.searchList = [];
-			}
-		}
-	},
-	mounted() {
-		document.documentElement.addEventListener('click', this.closelist);
-	},
-	methods: {
-		closelist() {
-			this.searchVal = '';
-			this.searchCurName = '';
-			this.searchIndex = 0;
-		},
-		onfocus(e) {
-			e.target.select();
-		},
-		checklist() {
-			this.searchVal = '';
-			this.searchCurName = '';
-			this.searchIndex = 0;
-		},
-		choseList(e) {
-			let searchIndex = this.searchIndex;
-			if (e.keyCode == 40) {
-				searchIndex++;
-			}
-			if (e.keyCode == 38) {
-				searchIndex--;
-			}
-			if (searchIndex < 0) {
-				searchIndex = 0;
-			}
-			let searchList = this.searchList;
-			if (searchList.length > 0) {
-				let chnName = searchList[searchIndex] && searchList[searchIndex].name;
-
-				if (chnName) {
-					this.searchCurName = chnName;
-					this.searchIndex = searchIndex;
-					if (e.keyCode == 13) {
-						this.$router.push({
-							path: '/' + searchList[searchIndex].name
-						});
-						this.searchCurName = '';
-						this.searchIndex = 0;
-						this.searchVal = '';
-					}
-				}
-			}
-		}
-	}
-};
-</script>
-<style lang="scss" scoped>
-.search-box {
-	height: 22px;
-	min-width: 300px;
-	position: relative;
-	input {
-		width: 100%;
-	}
-}
-.search {
-	height: 22px;
-	font-size: 14px;
-	color: #666;
-	border: none;
-	background: url(./asset/css/i/sreach.png) no-repeat left center;
-	padding-left: 45px;
-	&:focus {
-		outline: none;
-	}
-}
-.search-list {
-	background: #fff;
-	position: absolute;
-	width: 300px;
-	list-style: none;
-	border: 1px solid #f2f2f2;
-	z-index: 99999;
-	top: 27px;
-	padding: 0;
-	li {
-		height: 40px;
-		line-height: 40px;
-		font-size: 12px;
-		a {
-			display: inline-block;
-			box-sizing: border-box;
-			width: 100%;
-			padding-left: 40px;
-			text-decoration: none;
-			color: #666;
-		}
-		&:hover {
-			background: #6096ff;
-			color: #fff;
-			a {
-				color: #fff;
-			}
-		}
-	}
-	.cur {
-		background: #6096ff;
-		color: #fff;
-		a {
-			color: #fff;
-		}
-	}
-}
-</style>

+ 0 - 37
lib/plugin/cli/src/bin/index.ts

@@ -1,37 +0,0 @@
-#!/usr/bin/env node
-import { setNodeEnv } from '../util';
-process.argv[2] === 'dev' ? setNodeEnv('development') : setNodeEnv('production');
-import program from 'commander';
-import { dev } from '../commands/dev';
-import { build } from '../commands/build';
-import { lint } from '../commands/lint';
-import { buildSite } from '../commands/build-site';
-import { clean } from '../commands/clean';
-import { createComponent } from '../commands/createComponent';
-import { commitLint } from '../commands/commitLint';
-import { test } from '../commands/test';
-import { release } from '../commands/npmPublish';
-import { ROOT_CLI_PATH } from '../util/dic';
-
-const config = require(ROOT_CLI_PATH('package.json'));
-program.version(`@nutui/cli ${config.version}`, '-v', '--version');
-
-program.command('dev').description('本地调试运行官网和Demo示例').action(dev);
-
-program.command('build').description('构建完整版nutui和各个组件可发布到npm的静态资源包').action(build);
-
-program.command('build-site').description('构建官网和Demo示例,进行官网发布').action(buildSite);
-
-program.command('clean').description('清空打包目录').action(clean);
-
-program.command('add').description('新增组件使用该命令').action(createComponent);
-
-program.command('commit-lint').description('获取校验commit message 的配置文件').action(commitLint);
-
-program.command('test').description('运行单元测试').action(test);
-
-program.command('lint').description('运行stylelint和eslint').action(lint);
-
-program.command('release').description('发布版本...待开发').action(release);
-
-program.parse(process.argv);

+ 0 - 8
lib/plugin/cli/src/commands/build-site.ts

@@ -1,8 +0,0 @@
-import { emptyDir } from 'fs-extra';
-import { compileSite } from '../compiler/site';
-import { DIST_DIR } from '../util/dic';
-export async function buildSite() {
-	await emptyDir(DIST_DIR);
-	await compileSite(true);
-	process.exit();
-}

+ 0 - 19
lib/plugin/cli/src/commands/build.ts

@@ -1,19 +0,0 @@
-import { emptyDir } from 'fs-extra';
-import { compilePackage } from '../compiler/package';
-import { DIST_DIR } from '../util/dic';
-import logger from '../util/logger';
-import { compilePackageDisperse } from '../compiler/package.disperse';
-export async function build() {
-	try {
-		await emptyDir(DIST_DIR);
-		await compilePackage(false);
-		logger.success(`build compilePackage false package success!`);
-		await compilePackage(true);
-		logger.success(`build compilePackage true package success!`);
-		await compilePackageDisperse();
-		logger.success(`build compilePackageDisperse package success!`);
-		process.exit();
-	} catch (error) {
-		logger.error(error);
-	}
-}

+ 0 - 11
lib/plugin/cli/src/commands/clean.ts

@@ -1,11 +0,0 @@
-import { emptyDir } from 'fs-extra';
-import { DIST_DIR, CACHE_DIR } from '../util/dic';
-import logger from '../util/logger';
-
-export async function clean() {
-	await emptyDir(DIST_DIR);
-	logger.success(`clean ${DIST_DIR} success!`);
-	await emptyDir(CACHE_DIR);
-	logger.success(`clean ${CACHE_DIR} success!`);
-	process.exit();
-}

+ 0 - 1
lib/plugin/cli/src/commands/commitLint.ts

@@ -1 +0,0 @@
-export async function commitLint() {}

+ 0 - 4
lib/plugin/cli/src/commands/createComponent.ts

@@ -1,4 +0,0 @@
-import init from '../script/createCptTpl';
-export async function createComponent() {
-	await init();
-}

+ 0 - 4
lib/plugin/cli/src/commands/dev.ts

@@ -1,4 +0,0 @@
-import { compileSite } from '../compiler/site';
-export async function dev() {
-	await compileSite();
-}

+ 0 - 0
lib/plugin/cli/src/commands/lint.ts


Some files were not shown because too many files changed in this diff