+
-
+
+
+
-
+
+
diff --git a/packages/field/src/field.vue b/packages/field/src/field.vue
index ca9543abe..4c26b3db0 100644
--- a/packages/field/src/field.vue
+++ b/packages/field/src/field.vue
@@ -1,11 +1,79 @@
-
-
-
+
+
+
+
diff --git a/packages/sample/CHANGELOG.md b/packages/icon/CHANGELOG.md
similarity index 100%
rename from packages/sample/CHANGELOG.md
rename to packages/icon/CHANGELOG.md
diff --git a/packages/sample/README.md b/packages/icon/README.md
similarity index 100%
rename from packages/sample/README.md
rename to packages/icon/README.md
diff --git a/packages/icon/index.js b/packages/icon/index.js
new file mode 100644
index 000000000..cf234f6f0
--- /dev/null
+++ b/packages/icon/index.js
@@ -0,0 +1,3 @@
+import Icon from './src/icon';
+
+export default Icon;
diff --git a/packages/icon/package.json b/packages/icon/package.json
new file mode 100644
index 000000000..775e75514
--- /dev/null
+++ b/packages/icon/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "o2-icon",
+ "version": "0.0.1",
+ "description": "o2-icon",
+ "main": "index.js",
+ "author": "zhangmin
",
+ "devDependencies": {},
+ "dependencies": {}
+}
diff --git a/packages/icon/src/icon.vue b/packages/icon/src/icon.vue
new file mode 100644
index 000000000..7969ad3df
--- /dev/null
+++ b/packages/icon/src/icon.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/packages/radio/src/radio-group.vue b/packages/radio/src/radio-group.vue
new file mode 100644
index 000000000..1e8417089
--- /dev/null
+++ b/packages/radio/src/radio-group.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/packages/radio/src/radio.vue b/packages/radio/src/radio.vue
index 789b41ee4..642e1e5a6 100644
--- a/packages/radio/src/radio.vue
+++ b/packages/radio/src/radio.vue
@@ -1,11 +1,28 @@
-
-
-
+
+
diff --git a/packages/sample/index.js b/packages/sample/index.js
deleted file mode 100644
index 59bd195b2..000000000
--- a/packages/sample/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import SampleComponent from './src/main';
-
-export default SampleComponent;
diff --git a/packages/sample/package.json b/packages/sample/package.json
deleted file mode 100644
index 87ec1b163..000000000
--- a/packages/sample/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "@youzan/your-component-name",
- "version": "0.0.1",
- "description": "vue component",
- "main": "./lib/index.js",
- "author": "who r u",
- "license": "MIT",
- "devDependencies": {},
- "dependencies": {}
-}
diff --git a/packages/sample/src/main.vue b/packages/sample/src/main.vue
deleted file mode 100644
index 0d2c38ebd..000000000
--- a/packages/sample/src/main.vue
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
author: {{ author }}
-
Hello {{ name }}
-
-
-
-
diff --git a/packages/switch/index.pcss b/packages/switch/index.pcss
deleted file mode 100644
index 617bc489f..000000000
--- a/packages/switch/index.pcss
+++ /dev/null
@@ -1 +0,0 @@
-@import "./src/switch.pcss";
diff --git a/packages/zenui/README.md b/packages/zanui/README.md
similarity index 100%
rename from packages/zenui/README.md
rename to packages/zanui/README.md
diff --git a/packages/zenui/package.json b/packages/zanui/package.json
similarity index 100%
rename from packages/zenui/package.json
rename to packages/zanui/package.json
diff --git a/packages/button/src/button.pcss b/packages/zanui/src/button.pcss
similarity index 96%
rename from packages/button/src/button.pcss
rename to packages/zanui/src/button.pcss
index 2549e72ac..e701524f0 100644
--- a/packages/button/src/button.pcss
+++ b/packages/zanui/src/button.pcss
@@ -1,4 +1,4 @@
-@import "../../zenui/src/common/var.pcss";
+@import "./common/var.pcss";
@component-namespace o2 {
@component button {
diff --git a/packages/zanui/src/cell.pcss b/packages/zanui/src/cell.pcss
new file mode 100644
index 000000000..42812f194
--- /dev/null
+++ b/packages/zanui/src/cell.pcss
@@ -0,0 +1,66 @@
+@import "./common/var.pcss";
+@import "./mixins/border_retina.pcss";
+
+@component-namespace o2 {
+ @component cell-group {
+ padding-left: 10px;
+ position: relative;
+
+ &::after {
+ @mixin border-retina (top, bottom);
+ }
+ }
+
+ @component cell {
+ display: block;
+ overflow: hidden;
+ position: relative;
+ padding: 10px 10px 10px 0;
+ box-sizing: border-box;
+ line-height: 22px;
+ background-color: $c-white;
+ color: #333;
+ font-size: 14px;
+ text-decoration: none;
+
+ &::after {
+ @mixin border-retina (bottom);
+ }
+
+ &:last-child {
+ &::after {
+ border-bottom: 0;
+ }
+ }
+
+ @descendent title {
+ float: left;
+ overflow: hidden;
+ }
+
+ @descendent label {
+ display: block;
+ font-size: 12px;
+ line-height: 1.2;
+ color: #666;
+ }
+
+ @descendent value {
+ float: right;
+ overflow: hidden;
+
+ @when link {
+ margin-right: 20px;
+ }
+ }
+
+ .zui-icon-arrow {
+ position: absolute;
+ top: 50%;
+ right: 10px;
+ transform: translateY(-50%);
+ color: #999;
+ font-size: 12px;
+ }
+ }
+}
diff --git a/packages/zenui/src/common/var.pcss b/packages/zanui/src/common/var.pcss
similarity index 100%
rename from packages/zenui/src/common/var.pcss
rename to packages/zanui/src/common/var.pcss
diff --git a/packages/zanui/src/field.pcss b/packages/zanui/src/field.pcss
new file mode 100644
index 000000000..cc09b9943
--- /dev/null
+++ b/packages/zanui/src/field.pcss
@@ -0,0 +1,54 @@
+@import "./common/var.pcss";
+@import "./mixins/border_retina.pcss";
+
+@component-namespace o2 {
+ @component field {
+ width: 100%;
+ overflow: hidden;
+
+ @when textarea {
+ .o2-field-control {
+ min-height: 60px;
+ }
+ }
+
+ @when nolabel {
+ .o2-cell-title {
+ display: none;
+ }
+
+ .o2-cell-value {
+ width: 100%;
+ padding-left: 0;
+ }
+ }
+
+ .o2-cell-title,
+ .o2-cell-value {
+ float: none;
+ box-sizing: border-box;
+ }
+
+ .o2-cell-title {
+ width: 90px;
+ position: absolute;
+ top: 10px;
+ left: 0;
+ }
+
+ .o2-cell-value {
+ width: 100%;
+ padding-left: 90px;
+ }
+
+ @descendent control {
+ border: 0;
+ font-size: 14px;
+ line-height: 22px;
+ display: block;
+ width: 100%;
+ resize: none;
+ outline: 0;
+ }
+ }
+}
diff --git a/packages/zanui/src/icon.pcss b/packages/zanui/src/icon.pcss
new file mode 100644
index 000000000..afdc91bc2
--- /dev/null
+++ b/packages/zanui/src/icon.pcss
@@ -0,0 +1,66 @@
+/* DO NOT EDIT! Generated by fount */
+
+@font-face {
+ font-family: 'zuiicon';
+ src: url('https://b.yzcdn.cn/zui/font/zuiicon-b37948cf5d.eot');
+ src: url('https://b.yzcdn.cn/zui/font/zuiicon-b37948cf5d.eot?#iefix') format('embedded-opentype'),
+ url('https://b.yzcdn.cn/zui/font/zuiicon-b37948cf5d.woff2') format('woff2'),
+ url('https://b.yzcdn.cn/zui/font/zuiicon-b37948cf5d.woff') format('woff'),
+ url('https://b.yzcdn.cn/zui/font/zuiicon-b37948cf5d.ttf') format('truetype')
+}
+
+.zui-icon {
+ display: inline-block;
+}
+.zui-icon::before {
+ font-family: "zuiicon" !important;
+ font-style: normal;
+ font-weight: normal;
+ speak: none;
+
+ display: inline-block;
+ text-decoration: inherit;
+ width: 1em;
+ text-align: center;
+
+ /* For safety - reset parent styles, that can break glyph codes*/
+ font-variant: normal;
+ text-transform: none;
+
+ /* fix buttons height, for twitter bootstrap */
+ line-height: 1em;
+
+ /* Animation center compensation - margins should be symmetric */
+ /* remove if not needed */
+ /* margin-left: .2em; */
+
+ /* you can be more comfortable with increased icons size */
+ /* font-size: 120%; */
+
+ /* Font smoothing. That was taken from TWBS */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+ /* Uncomment for 3D effect */
+ /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
+}
+/* DO NOT EDIT! Generated by fount */
+
+
+.zui-icon-album:before { content: '\e800'; } /* '' */
+.zui-icon-arrow:before { content: '\e801'; } /* '' */
+.zui-icon-camera:before { content: '\e802'; } /* '' */
+.zui-icon-certificate:before { content: '\e803'; } /* '' */
+.zui-icon-check:before { content: '\e804'; } /* '' */
+.zui-icon-checked:before { content: '\e805'; } /* '' */
+.zui-icon-close:before { content: '\e806'; } /* '' */
+.zui-icon-gift:before { content: '\e807'; } /* '' */
+.zui-icon-home:before { content: '\e808'; } /* '' */
+.zui-icon-location:before { content: '\e809'; } /* '' */
+.zui-icon-message:before { content: '\e80a'; } /* '' */
+.zui-icon-send:before { content: '\e80b'; } /* '' */
+.zui-icon-shopping-cart:before { content: '\e80c'; } /* '' */
+.zui-icon-sign:before { content: '\e80d'; } /* '' */
+.zui-icon-store:before { content: '\e80e'; } /* '' */
+.zui-icon-topay:before { content: '\e80f'; } /* '' */
+.zui-icon-tosend:before { content: '\e810'; } /* '' */
\ No newline at end of file
diff --git a/packages/zanui/src/index.pcss b/packages/zanui/src/index.pcss
new file mode 100644
index 000000000..469e089fc
--- /dev/null
+++ b/packages/zanui/src/index.pcss
@@ -0,0 +1,8 @@
+/**
+ css组件库入口,组装成css组件库
+ */
+@import './button.pcss';
+@import './cell.pcss';
+@import './field.pcss';
+@import './icon.pcss';
+@import './switch.pcss';
diff --git a/packages/zanui/src/mixins/border_retina.pcss b/packages/zanui/src/mixins/border_retina.pcss
new file mode 100644
index 000000000..404c323e5
--- /dev/null
+++ b/packages/zanui/src/mixins/border_retina.pcss
@@ -0,0 +1,20 @@
+$border-poses: top, right, bottom, left;
+
+@define-mixin border-retina $poses: $border-poses, $border-retina-color: #e5e5e5 {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ box-sizing: border-box;
+ width: 200%;
+ height: 200%;
+ transform: scale(.5);
+ transform-origin: left top;
+ -webkit-perspective: 1000;
+ -webkit-backface-visibility: hidden;
+ pointer-events: none;
+
+ @each $pos in $poses {
+ border-$(pos): 1px solid $border-retina-color;
+ }
+}
\ No newline at end of file
diff --git a/packages/switch/src/switch.pcss b/packages/zanui/src/switch.pcss
similarity index 96%
rename from packages/switch/src/switch.pcss
rename to packages/zanui/src/switch.pcss
index 0ac3f03e4..3ed604d34 100644
--- a/packages/switch/src/switch.pcss
+++ b/packages/zanui/src/switch.pcss
@@ -1,5 +1,4 @@
-
-@component-namespace o2{
+@component-namespace o2 {
@component switch {
height: 29px;
width: 49px;
@@ -45,4 +44,4 @@
border-color: rgba(0, 0, 0, .1);
}
}
-}
\ No newline at end of file
+}
diff --git a/packages/zenui/src/index.pcss b/packages/zenui/src/index.pcss
deleted file mode 100644
index 15f7ab28b..000000000
--- a/packages/zenui/src/index.pcss
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
- css组件库 入口,从各个地方拿css文件,组装成css组件库
- */
-@import '../../button/index.pcss';
-@import '../../switch/index.pcss';
diff --git a/src/index.js b/src/index.js
index fa6aedd6a..3ffa774fd 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,21 +1,23 @@
-import Sample from '../packages/sample/index.js';
import Button from '../packages/button/index.js';
import Switch from '../packages/switch/index.js';
import Field from '../packages/field/index.js';
import Radio from '../packages/radio/index.js';
import Cell from '../packages/cell/index.js';
-// zenui
-import '../packages/zenui/src/index.pcss';
+import Icon from '../packages/icon/index.js';
+import CellGroup from '../packages/cell-group/index.js';
+// zanui
+import '../packages/zanui/src/index.pcss';
const install = function(Vue) {
if (install.installed) return;
- Vue.component(Sample.name, Sample);
Vue.component(Button.name, Button);
Vue.component(Switch.name, Switch);
Vue.component(Field.name, Field);
Vue.component(Radio.name, Radio);
Vue.component(Cell.name, Cell);
+ Vue.component(Icon.name, Icon);
+ Vue.component(CellGroup.name, CellGroup);
};
// auto install
@@ -26,10 +28,11 @@ if (typeof window !== 'undefined' && window.Vue) {
module.exports = {
install,
version: '0.0.1',
- Sample,
Button,
Switch,
Field,
Radio,
- Cell
+ Cell,
+ Icon,
+ CellGroup
};