From 5fc384ef6fe977fee4cbf0347f4f96947b939b5e Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 11:34:30 +0800
Subject: [PATCH 01/12] feat(nimbus-icon): add nimbus icon
---
demo/components/nimbusIconDemo.vue | 51 ++++++++++++++++++++++++
demo/demo.vue | 4 ++
demo/index.js | 4 +-
index.js | 2 +
packages/nimbus/Icon/index.js | 8 ++++
packages/nimbus/Icon/src/icons/share.vue | 33 +++++++++++++++
packages/nimbus/Icon/src/main.vue | 49 +++++++++++++++++++++++
styles/NimbusIcon.scss | 8 ++++
styles/index.scss | 3 +-
9 files changed, 160 insertions(+), 2 deletions(-)
create mode 100644 demo/components/nimbusIconDemo.vue
create mode 100644 packages/nimbus/Icon/index.js
create mode 100644 packages/nimbus/Icon/src/icons/share.vue
create mode 100644 packages/nimbus/Icon/src/main.vue
create mode 100644 styles/NimbusIcon.scss
diff --git a/demo/components/nimbusIconDemo.vue b/demo/components/nimbusIconDemo.vue
new file mode 100644
index 000000000..7ef6e82cc
--- /dev/null
+++ b/demo/components/nimbusIconDemo.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
diff --git a/demo/demo.vue b/demo/demo.vue
index b69ebac33..9e7e923f5 100644
--- a/demo/demo.vue
+++ b/demo/demo.vue
@@ -41,6 +41,10 @@ export default {
{
name: 'Nimbus Confirm Card',
path: '/n-nimbus-confirm-card'
+ },
+ {
+ name: 'Nimbus Icon',
+ path: '/n-nimbus-icon'
}
]
},
diff --git a/demo/index.js b/demo/index.js
index 3a4b9395b..2538509b4 100644
--- a/demo/index.js
+++ b/demo/index.js
@@ -23,6 +23,7 @@ import popoverDemo from './components/popoverDemo'
import alertDemo from './components/alertDemo'
import datePickerDemo from './components/datePickerDemo'
import inputNumberDemo from './components/inputNumberDemo'
+import nimbusIconDemo from './components/nimbusIconDemo'
import notificationDemo from './components/notificationDemo'
import nimbusConfirmCardDemo from './components/nimbusConfirmCardDemo'
@@ -64,7 +65,8 @@ const routes = [
{ path: '/n-pagination', component: paginationDemo },
{ path: '/n-alert', component: alertDemo },
{ path: '/n-date-picker', component: datePickerDemo },
- { path: '/n-input-number', component: inputNumberDemo }
+ { path: '/n-input-number', component: inputNumberDemo },
+ { path: '/n-nimbus-icon', component: nimbusIconDemo }
]
},
{
diff --git a/index.js b/index.js
index fe8fd670a..881b733e4 100644
--- a/index.js
+++ b/index.js
@@ -29,6 +29,7 @@ import Navbar from './packages/nimbus/Navbar'
import ServiceLayout from './packages/nimbus/ServiceLayout'
import NimbusFormCard from './packages/nimbus/FormCard'
import NimbusConfirmCard from './packages/nimbus/ConfirmCard'
+import NimbusIcon from './packages/nimbus/Icon'
function install (Vue) {
Card.install(Vue)
@@ -61,6 +62,7 @@ function install (Vue) {
Alert.install(Vue)
DatePicker.install(Vue)
InputNumber.install(Vue)
+ NimbusIcon.install(Vue)
}
export default {
diff --git a/packages/nimbus/Icon/index.js b/packages/nimbus/Icon/index.js
new file mode 100644
index 000000000..63a079574
--- /dev/null
+++ b/packages/nimbus/Icon/index.js
@@ -0,0 +1,8 @@
+/* istanbul ignore file */
+import NimbusIcon from './src/main.vue'
+
+NimbusIcon.install = function (Vue) {
+ Vue.component(NimbusIcon.name, NimbusIcon)
+}
+
+export default NimbusIcon
diff --git a/packages/nimbus/Icon/src/icons/share.vue b/packages/nimbus/Icon/src/icons/share.vue
new file mode 100644
index 000000000..618dda57a
--- /dev/null
+++ b/packages/nimbus/Icon/src/icons/share.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
diff --git a/packages/nimbus/Icon/src/main.vue b/packages/nimbus/Icon/src/main.vue
new file mode 100644
index 000000000..45950142c
--- /dev/null
+++ b/packages/nimbus/Icon/src/main.vue
@@ -0,0 +1,49 @@
+
+
+
+ icon-type is invalid
+
+
+
diff --git a/styles/NimbusIcon.scss b/styles/NimbusIcon.scss
new file mode 100644
index 000000000..f2f60af82
--- /dev/null
+++ b/styles/NimbusIcon.scss
@@ -0,0 +1,8 @@
+.n-nimbus-icon {
+ height: 1em;
+ width: 1em;
+ line-height: 1em;
+ text-align: center;
+ display: inline-block;
+ position: relative;
+}
diff --git a/styles/index.scss b/styles/index.scss
index b0d0ac896..354e87ed2 100644
--- a/styles/index.scss
+++ b/styles/index.scss
@@ -23,4 +23,5 @@
@import "./NimbusServiceLayout.scss";
@import "./Popover.scss";
-@import "./AdvancedTable.scss"
\ No newline at end of file
+@import "./AdvancedTable.scss";
+@import "./NimbusIcon.scss";
\ No newline at end of file
From 85edd407470cb1a17a249f26059ac0b3022746f5 Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 11:34:54 +0800
Subject: [PATCH 02/12] doc: fix typo in doc
---
demo/components/tooltipDemo.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/demo/components/tooltipDemo.vue b/demo/components/tooltipDemo.vue
index 920bdd580..87b77b8bd 100644
--- a/demo/components/tooltipDemo.vue
+++ b/demo/components/tooltipDemo.vue
@@ -20,6 +20,7 @@
hello tooltip
+ This is the contextual help
From dfee7ce298d882ad40aaee123f1543fc401bd706 Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 11:35:57 +0800
Subject: [PATCH 03/12] release: 0.2.8
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index b76134b99..aa3979f09 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "naive-ui",
- "version": "0.2.7",
+ "version": "0.2.8",
"description": "",
"main": "index.js",
"scripts": {
From 6a4ec4bfcabe252f2e016294d127a974979b43d1 Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 11:36:30 +0800
Subject: [PATCH 04/12] release: 0.2.9
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index aa3979f09..dde63006f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "naive-ui",
- "version": "0.2.8",
+ "version": "0.2.9",
"description": "",
"main": "index.js",
"scripts": {
From 1ba5ba69de72cef11e1f98474a776dae1de4a3a4 Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 15:05:29 +0800
Subject: [PATCH 05/12] feat(nimbus-icon): new icon & docs & omit tooltip of
svg
---
demo/components/nimbusIconDemo.vue | 35 ++++++++++++++--
packages/nimbus/Icon/src/icons/ban.vue | 43 +++++++++++++++++++
packages/nimbus/Icon/src/icons/share.vue | 53 +++++++++++++++---------
packages/nimbus/Icon/src/main.vue | 19 ++++++++-
styles/NimbusIcon.scss | 3 ++
think.md | 4 +-
6 files changed, 132 insertions(+), 25 deletions(-)
create mode 100644 packages/nimbus/Icon/src/icons/ban.vue
diff --git a/demo/components/nimbusIconDemo.vue b/demo/components/nimbusIconDemo.vue
index 7ef6e82cc..c1af6c263 100644
--- a/demo/components/nimbusIconDemo.vue
+++ b/demo/components/nimbusIconDemo.vue
@@ -19,17 +19,35 @@
color="#63e2b7"
size="24"
/>
+
+/>
+
+
+
@@ -49,3 +67,14 @@ export default {
}
}
+
+
diff --git a/packages/nimbus/Icon/src/icons/ban.vue b/packages/nimbus/Icon/src/icons/ban.vue
new file mode 100644
index 000000000..536abd9c6
--- /dev/null
+++ b/packages/nimbus/Icon/src/icons/ban.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
diff --git a/packages/nimbus/Icon/src/icons/share.vue b/packages/nimbus/Icon/src/icons/share.vue
index 618dda57a..660885615 100644
--- a/packages/nimbus/Icon/src/icons/share.vue
+++ b/packages/nimbus/Icon/src/icons/share.vue
@@ -2,31 +2,46 @@
+ >
+ share
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/styles/NimbusIcon.scss b/styles/NimbusIcon.scss
index f2f60af82..48f9ed9ea 100644
--- a/styles/NimbusIcon.scss
+++ b/styles/NimbusIcon.scss
@@ -5,4 +5,7 @@
text-align: center;
display: inline-block;
position: relative;
+ svg {
+ pointer-events: none;
+ }
}
diff --git a/think.md b/think.md
index 272c6f3c8..11acf4ef7 100644
--- a/think.md
+++ b/think.md
@@ -7,4 +7,6 @@ npm run dev
# git problem...
我的锅...远程分支没设定好,推得哪个自己都不知道。
# test 时候 vue v-model 产生的效果必须在 $nextTick() 之后才会产生,虽然它声称自己是同步的...
-我的锅,忘了为啥了。确实是同步的,是我没有考虑到v-model这东西应该用什么方法测试。
\ No newline at end of file
+我的锅,忘了为啥了。确实是同步的,是我没有考虑到v-model这东西应该用什么方法测试。
+# Vue 的深度选择器出了问题
+a >>> b 被编译成了 a > > > b
\ No newline at end of file
From 32679a47a20c12ae614c69c303399f303395826d Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 15:05:56 +0800
Subject: [PATCH 06/12] feat(radio): add radio component(not done yet)
---
demo/components/radioDemo.vue | 45 ++++++++++++++
demo/demo.vue | 4 ++
demo/index.js | 4 +-
index.js | 2 +
packages/common/Radio/index.js | 10 ++++
packages/common/Radio/src/RadioGroup.vue | 9 +++
packages/common/Radio/src/main.vue | 58 +++++++++++++++++++
styles/Radio.scss | 74 ++++++++++++++++++++++++
styles/index.scss | 1 +
9 files changed, 206 insertions(+), 1 deletion(-)
create mode 100644 demo/components/radioDemo.vue
create mode 100644 packages/common/Radio/index.js
create mode 100644 packages/common/Radio/src/RadioGroup.vue
create mode 100644 packages/common/Radio/src/main.vue
create mode 100644 styles/Radio.scss
diff --git a/demo/components/radioDemo.vue b/demo/components/radioDemo.vue
new file mode 100644
index 000000000..1f3ca81ae
--- /dev/null
+++ b/demo/components/radioDemo.vue
@@ -0,0 +1,45 @@
+
+
+
+
+
diff --git a/demo/demo.vue b/demo/demo.vue
index 9e7e923f5..6d8a97e79 100644
--- a/demo/demo.vue
+++ b/demo/demo.vue
@@ -108,6 +108,10 @@ export default {
name: 'Popover',
path: '/n-popover'
},
+ {
+ name: 'Radio',
+ path: '/n-radio'
+ },
{
name: 'Select',
path: '/n-select'
diff --git a/demo/index.js b/demo/index.js
index 2538509b4..b07c5d261 100644
--- a/demo/index.js
+++ b/demo/index.js
@@ -24,6 +24,7 @@ import alertDemo from './components/alertDemo'
import datePickerDemo from './components/datePickerDemo'
import inputNumberDemo from './components/inputNumberDemo'
import nimbusIconDemo from './components/nimbusIconDemo'
+import radioDemo from './components/radioDemo'
import notificationDemo from './components/notificationDemo'
import nimbusConfirmCardDemo from './components/nimbusConfirmCardDemo'
@@ -66,7 +67,8 @@ const routes = [
{ path: '/n-alert', component: alertDemo },
{ path: '/n-date-picker', component: datePickerDemo },
{ path: '/n-input-number', component: inputNumberDemo },
- { path: '/n-nimbus-icon', component: nimbusIconDemo }
+ { path: '/n-nimbus-icon', component: nimbusIconDemo },
+ { path: '/n-radio', component: radioDemo }
]
},
{
diff --git a/index.js b/index.js
index 881b733e4..6ee53fb76 100644
--- a/index.js
+++ b/index.js
@@ -22,6 +22,7 @@ import Popup from './packages/common/Popover'
import Alert from './packages/common/Alert'
import DatePicker from './packages/common/DatePicker'
import InputNumber from './packages/common/InputNumber'
+import Radio from './packages/common/Radio'
import ServiceCard from './packages/nimbus/ServiceCard'
import HomeLayout from './packages/nimbus/HomeLayout'
@@ -63,6 +64,7 @@ function install (Vue) {
DatePicker.install(Vue)
InputNumber.install(Vue)
NimbusIcon.install(Vue)
+ Radio.install(Vue)
}
export default {
diff --git a/packages/common/Radio/index.js b/packages/common/Radio/index.js
new file mode 100644
index 000000000..31c33aa52
--- /dev/null
+++ b/packages/common/Radio/index.js
@@ -0,0 +1,10 @@
+/* istanbul ignore file */
+import Radio from './src/main.vue'
+import RadioGroup from './src/RadioGroup.vue'
+
+Radio.install = function (Vue) {
+ Vue.component(Radio.name, Radio)
+ Vue.component(RadioGroup.name, RadioGroup)
+}
+
+export default Radio
diff --git a/packages/common/Radio/src/RadioGroup.vue b/packages/common/Radio/src/RadioGroup.vue
new file mode 100644
index 000000000..e153da908
--- /dev/null
+++ b/packages/common/Radio/src/RadioGroup.vue
@@ -0,0 +1,9 @@
+
+ radio group
+
+
+
diff --git a/packages/common/Radio/src/main.vue b/packages/common/Radio/src/main.vue
new file mode 100644
index 000000000..fd8f925a4
--- /dev/null
+++ b/packages/common/Radio/src/main.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
diff --git a/styles/Radio.scss b/styles/Radio.scss
new file mode 100644
index 000000000..15a67a81f
--- /dev/null
+++ b/styles/Radio.scss
@@ -0,0 +1,74 @@
+@import './mixins/mixins.scss';
+@import './theme/default.scss';
+
+@include b(radio) {
+ position: relative;
+ user-select: none;
+ .n-radio__control {
+ box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
+ transition: box-shadow .2s $default-cubic-bezier;
+ vertical-align: middle;
+ display: inline-block;
+ height: 14px;
+ width: 14px;
+ border-radius: 7px;
+ margin-right: 12px;
+ position: relative;
+ &::before {
+ content: "";
+ position: absolute;
+ left: 3px;
+ top: 3px;
+ height: 8px;
+ width: 8px;
+ border-radius: 4px;
+ transform: scale(.8);
+ background-color: rgba(99, 226, 183, 1);
+ opacity: 0;
+ transition: opacity .15s $slow-out-cubic-bezier, transform .15s $slow-out-cubic-bezier;
+ }
+ &.n-radio__control--checked {
+ &::before {
+ opacity: 1;
+ transform: scale(1);
+ transition: opacity .15s $fast-in-cubic-bezier, transform .15s $fast-in-cubic-bezier;
+ }
+ }
+ }
+ .n-radio__label {
+ display: inline-block;
+ color: rgba(233,233,236,1);
+ }
+ &:not(.n-radio--disabled) {
+ cursor: pointer;
+ &:hover .n-radio__control {
+ box-shadow: inset 0 0 0 1px rgba(99, 226, 183, 1);
+ transition: box-shadow .2s $default-cubic-bezier;
+ }
+ &:active .n-radio__control {
+ box-shadow: inset 0 0 0 1px rgba(99, 226, 183, 1), 0px 0px 10px 1px rgba(99,226,183,0.3);
+ }
+ }
+ &.n-radio--disabled {
+ cursor: not-allowed;
+ .n-radio__control {
+ box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
+ transition: box-shadow .2s $default-cubic-bezier;
+ &::before {
+ transform: scale(.8);
+ transform-origin: center;
+ opacity: 0;
+ background-color: rgba(233,233,236,0.25);
+ }
+ &.n-radio__control--checked {
+ &::before {
+ transform: scale(1);
+ opacity: 1;
+ }
+ }
+ }
+ .n-radio__label {
+ color: rgba(233,233,236,0.25);
+ }
+ }
+}
\ No newline at end of file
diff --git a/styles/index.scss b/styles/index.scss
index 354e87ed2..42d45fb34 100644
--- a/styles/index.scss
+++ b/styles/index.scss
@@ -20,6 +20,7 @@
@import './Alert.scss';
@import './DatePicker.scss';
@import './InputNumber.scss';
+@import './Radio.scss';
@import "./NimbusServiceLayout.scss";
@import "./Popover.scss";
From b32acea3cd4262f1577eef0c19e6cd55f332d88f Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 15:06:26 +0800
Subject: [PATCH 07/12] release: 0.2.10
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index dde63006f..a1439412e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "naive-ui",
- "version": "0.2.9",
+ "version": "0.2.10",
"description": "",
"main": "index.js",
"scripts": {
From fd0abbc670e34c894ca94b774d181c0c4a63a6df Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 15:15:43 +0800
Subject: [PATCH 08/12] fix(nimbus-service-layout): item badge color gradient
---
styles/NimbusServiceLayout.scss | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/styles/NimbusServiceLayout.scss b/styles/NimbusServiceLayout.scss
index e7750f295..ee5e9eb73 100644
--- a/styles/NimbusServiceLayout.scss
+++ b/styles/NimbusServiceLayout.scss
@@ -110,15 +110,13 @@
.n-nimbus-service-layout-drawer-item__icon {
&::before {
content: '';
- width: 0;
- height: 0;
+ width: 10px;
+ height: 10px;
position: absolute;
- border-style: solid;
- border-color:#78CD68 transparent transparent transparent;
- border-width: 7px;
- transform: rotate(-45deg);
- top: 23px;
- left: 32px;
+ background-image:linear-gradient(47deg,rgba(120, 205, 104, 1) 0%,rgba(20, 166, 165, 1) 100%);
+ top: 20px;
+ left: 30px;
+ clip-path: polygon(100% 0, 100% 100%, 0% 100%);
}
}
span {
From 5b89855e316655abfbb94b58b5728b7574a30785 Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 15:15:59 +0800
Subject: [PATCH 09/12] release: 0.2.11
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index a1439412e..995a87c11 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "naive-ui",
- "version": "0.2.10",
+ "version": "0.2.11",
"description": "",
"main": "index.js",
"scripts": {
From 5f4ec07d0f1d3ceb144fb3751dca469430008d6d Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 17:41:56 +0800
Subject: [PATCH 10/12] feat(radio): radio is usable
---
demo/components/radioDemo.vue | 132 +++++++++++++++++++++--
demo/demo.vue | 8 ++
packages/common/Radio/src/RadioGroup.vue | 37 ++++++-
packages/common/Radio/src/main.vue | 3 +-
styles/Radio.scss | 19 +++-
5 files changed, 180 insertions(+), 19 deletions(-)
diff --git a/demo/components/radioDemo.vue b/demo/components/radioDemo.vue
index 1f3ca81ae..caef433f0 100644
--- a/demo/components/radioDemo.vue
+++ b/demo/components/radioDemo.vue
@@ -11,19 +11,111 @@
- good
+ Definitely Maybe
+
+
+ Be Here Now
+
value: {{ JSON.stringify(value1) }}
-
+
+
+
+
+
+
+
+
+ {{ song.label }}
+
+
+
+
value: {{ JSON.stringify(value2) }}
+
+
@@ -36,7 +128,33 @@ export default {
mixins: [docCodeEditorMixin],
data () {
return {
- v: '666'
+ value1: null,
+ value2: null,
+ songs: [
+ {
+ value: 'Rock\'n\'Roll Star',
+ label: 'Rock\'n\'Roll Star'
+ },
+ {
+ value: 'Shakermaker',
+ label: 'Shakermaker'
+ },
+ {
+ value: 'Live Forever',
+ label: 'Live Forever'
+ },
+ {
+ value: 'Up in the Sky',
+ label: 'Up in the Sky'
+ },
+ {
+ value: '...',
+ label: '...'
+ }
+ ].map(s => {
+ s.value = s.value.toLowerCase()
+ return s
+ })
}
},
methods: {
diff --git a/demo/demo.vue b/demo/demo.vue
index 6d8a97e79..ade4c9167 100644
--- a/demo/demo.vue
+++ b/demo/demo.vue
@@ -191,6 +191,14 @@ body {
margin-bottom: 12px;
flex-wrap: wrap;
}
+ .n-doc-section__inspect {
+ background: #5c657eff;
+ padding: 18px;
+ border-radius: 8px;
+ display: flex;
+ margin-bottom: 12px;
+ flex-wrap: wrap;
+ }
.n-doc-section__text-content {
font-size: 16px;
}
diff --git a/packages/common/Radio/src/RadioGroup.vue b/packages/common/Radio/src/RadioGroup.vue
index e153da908..8cf312264 100644
--- a/packages/common/Radio/src/RadioGroup.vue
+++ b/packages/common/Radio/src/RadioGroup.vue
@@ -1,9 +1,36 @@
-
- radio group
-
-
diff --git a/packages/common/Radio/src/main.vue b/packages/common/Radio/src/main.vue
index fd8f925a4..d27e13ba3 100644
--- a/packages/common/Radio/src/main.vue
+++ b/packages/common/Radio/src/main.vue
@@ -47,10 +47,9 @@ export default {
},
methods: {
handleClick () {
+ if (this.disabled) return
if (this.privateValue !== this.value) {
this.$emit('input', this.value)
- } else {
- this.$emit('input', null)
}
}
}
diff --git a/styles/Radio.scss b/styles/Radio.scss
index 15a67a81f..69bd12ead 100644
--- a/styles/Radio.scss
+++ b/styles/Radio.scss
@@ -4,15 +4,17 @@
@include b(radio) {
position: relative;
user-select: none;
+ display: inline-flex;
+ vertical-align: middle;
+ align-items: center;
+ margin-right: 18px;
.n-radio__control {
box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
transition: box-shadow .2s $default-cubic-bezier;
- vertical-align: middle;
- display: inline-block;
height: 14px;
width: 14px;
border-radius: 7px;
- margin-right: 12px;
+ margin-right: 9px;
position: relative;
&::before {
content: "";
@@ -28,9 +30,11 @@
transition: opacity .15s $slow-out-cubic-bezier, transform .15s $slow-out-cubic-bezier;
}
&.n-radio__control--checked {
+ box-shadow: inset 0 0 0 1px rgba(99, 226, 183, 1);
&::before {
opacity: 1;
transform: scale(1);
+
transition: opacity .15s $fast-in-cubic-bezier, transform .15s $fast-in-cubic-bezier;
}
}
@@ -55,9 +59,9 @@
box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
transition: box-shadow .2s $default-cubic-bezier;
&::before {
- transform: scale(.8);
+ transform: scale(1.5);
transform-origin: center;
- opacity: 0;
+ opacity: 1;
background-color: rgba(233,233,236,0.25);
}
&.n-radio__control--checked {
@@ -71,4 +75,9 @@
color: rgba(233,233,236,0.25);
}
}
+}
+
+@include b(radio-group) {
+ display: inline-block;
+ vertical-align: middle;
}
\ No newline at end of file
From 217fc7bb1c368ff7b2b650736399c94eb85926ba Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Mon, 15 Jul 2019 17:56:17 +0800
Subject: [PATCH 11/12] doc(radio): add disabled example
---
demo/components/radioDemo.vue | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/demo/components/radioDemo.vue b/demo/components/radioDemo.vue
index caef433f0..0671d808f 100644
--- a/demo/components/radioDemo.vue
+++ b/demo/components/radioDemo.vue
@@ -26,6 +26,13 @@
>
Be Here Now
+
+ Be Here Now
+
value: {{ JSON.stringify(value1) }}
@@ -41,6 +48,13 @@
>
Be Here Now
+
+ Be Here Now
+