diff --git a/src/address-edit/index.js b/src/address-edit/index.js index ea24c2f07..ba0b117b4 100644 --- a/src/address-edit/index.js +++ b/src/address-edit/index.js @@ -4,13 +4,14 @@ import { isMobile } from '../utils/validate/mobile'; // Components import Area from '../area'; +import Cell from '../cell'; import Field from '../field'; import Popup from '../popup'; import Toast from '../toast'; import Button from '../button'; import Dialog from '../dialog'; import Detail from './Detail'; -import SwitchCell from '../switch-cell'; +import Switch from '../switch'; const [createComponent, bem, t] = createNamespace('address-edit'); @@ -258,6 +259,34 @@ export default createComponent({ this.detailFocused = false; }); }, + + genSetDefaultCell(h) { + if (this.showSetDefault) { + const slots = { + 'right-icon': () => ( + { + this.$emit('change-default', event); + }} + /> + ), + }; + + return ( + + ); + } + + return h(); + }, }, render(h) { @@ -334,19 +363,7 @@ export default createComponent({ )} {this.slots()} - {this.showSetDefault ? ( - { - this.$emit('change-default', event); - }} - /> - ) : ( - h() - )} + {this.genSetDefaultCell(h)}
-
+
设为默认收货地址
-
-
-
-
+
+
-
+
设为默认收货地址
-
-
-
-
+
+
-
+
设为默认收货地址
-
-
-
-
+
+
-
+
设为默认收货地址
-
-
-
-
+
+
-
+
设为默认收货地址
-
-
-
-
+
+