12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view class="container">
- <u-divider text="其他登录方式" textSize="3.2vw" textColor="#fff" lineColor="#fff" />
- <view class="grid-box">
- <view class="item">
- 微信
- </view>
- <view class="item" @click="changeLoginMethod">
- {{ loginMethod == 'phone' ? '账号' : '手机' }}
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "OtherLogin",
- props: {
- "loginMethod": String,
- onChange: Function
- },
- methods: {
- /* 改变登录方式 */
- changeLoginMethod() {
- this.$emit("onChange", this.loginMethod == 'account' ? 'phone' : 'account')
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .container {
- width: 275px !important;
- margin: -20px auto 0;
- .grid-box {
- display: flex;
- width: 100%;
- justify-content: center;
- flex-wrap: wrap;
- .item {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background-color: red;
- flex-shrink: 0;
- margin: 0 7px 7px;
- text-align: center;
- line-height: 40px;
- color: #fff;
- }
- }
- }
- </style>
|