mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-12-24 08:12:55 +08:00
部分兼容小程序样式
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -17,15 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
defineModel,
|
||||
|
||||
onMounted,
|
||||
computed,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { ref, onMounted, computed, watch } from "vue";
|
||||
const props = defineProps({
|
||||
columns: {
|
||||
type: Array,
|
||||
@@ -55,13 +47,13 @@ function openPicker() {
|
||||
}
|
||||
function handleConfirm(e) {
|
||||
// debugger;
|
||||
if (e.value[0]!==undefined) {
|
||||
if (e.value[0] !== undefined) {
|
||||
model.value = e.value[0][props.valueKey];
|
||||
selectItem.value = e.value[0];
|
||||
}else{
|
||||
} else {
|
||||
model.value = null;
|
||||
selectItem.value = {};
|
||||
console.log('handleConfirm没有数据',e);
|
||||
console.log("handleConfirm没有数据", e);
|
||||
}
|
||||
}
|
||||
function updateSelectItem() {
|
||||
@@ -71,22 +63,22 @@ function updateSelectItem() {
|
||||
selectItem.value = {};
|
||||
return;
|
||||
}
|
||||
if(props.columns.length==0){
|
||||
if (props.columns.length == 0) {
|
||||
pickerIndex.value = [0];
|
||||
selectItem.value = {};
|
||||
return;
|
||||
}
|
||||
let find=false
|
||||
let find = false;
|
||||
for (let index = 0; index < props.columns.length; index++) {
|
||||
const item = props.columns[index];
|
||||
if (model.value == item[props.valueKey]) {
|
||||
selectItem.value = item;
|
||||
pickerIndex.value = [index];
|
||||
find=true
|
||||
find = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!find){
|
||||
if (!find) {
|
||||
selectItem.value = {};
|
||||
pickerIndex.value = [0];
|
||||
model.value = null;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<view>
|
||||
<uv-form class="form" ref="form" labelWidth="60" labelAlign="right" :model="model" :rules="rules">
|
||||
<uv-form-item class="hide">
|
||||
<uv-input class="hide" v-model="model.username" placeholder="请输入账号"
|
||||
<view class="form">
|
||||
<uv-form ref="form" labelWidth="60" labelAlign="right" :model="model" :rules="rules">
|
||||
<uv-form-item :customStyle="hide">
|
||||
<uv-input v-model="model.username" placeholder="请输入账号"
|
||||
:rules="[{ required: true, message: '请填写账号' }]" />
|
||||
</uv-form-item>
|
||||
<uv-form-item class="hide">
|
||||
<uv-form-item :customStyle="hide">
|
||||
<uv-input type="password" v-model="model.password" placeholder="请输入密码"
|
||||
:rules="[{ required: true, message: '请填写密码' }]" />
|
||||
</uv-form-item>
|
||||
@@ -21,10 +21,9 @@
|
||||
<Verify :mode="'pop'" :captchaType="'blockPuzzle'" ref="verifyRef"
|
||||
:imgSize="{ width: '310px', height: '155px' }" @success="VerifySuccess"></Verify>
|
||||
|
||||
<view class="footer">
|
||||
<!-- -->
|
||||
|
||||
<wd-button class="btn" size="large" @click="VerifyShow" block>登录</wd-button>
|
||||
<view class="footer">
|
||||
<uv-button type="primary" text="登录" @click="VerifyShow"></uv-button>
|
||||
|
||||
</view>
|
||||
</uv-form>
|
||||
</view>
|
||||
@@ -41,7 +40,13 @@
|
||||
// import appicon from "@/static/appicon.png";
|
||||
|
||||
import { useUserStore } from "@/stores/user";
|
||||
|
||||
const hide = {
|
||||
overflow: "hidden",
|
||||
// visibility: 'hidden',
|
||||
height:0,
|
||||
padding:0,
|
||||
border:0,
|
||||
}
|
||||
const userStore = useUserStore();
|
||||
|
||||
const model = reactive({
|
||||
@@ -112,14 +117,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.hide {
|
||||
height: 0 !important;
|
||||
padding: 0 !important;
|
||||
|
||||
border: 0 !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.form {
|
||||
margin: 200rpx 20rpx;
|
||||
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
<view class="my">
|
||||
<uv-sticky offsetTop="-1" bgColor="#ffffff">
|
||||
<view style="background: #fff">
|
||||
<uv-cell :title="userStore?.username" :label="userStore?.nickname" isLink>
|
||||
<uv-cell
|
||||
:title="userStore?.username"
|
||||
:label="userStore?.nickname"
|
||||
isLink
|
||||
>
|
||||
<!-- -->
|
||||
<template v-slot:icon>
|
||||
<button class="avatar-wrapper" open-type="chooseAvatar" @click.stop>
|
||||
<uv-avatar
|
||||
width="100%"
|
||||
height="100%"
|
||||
shape="circle"
|
||||
height="80rpx"
|
||||
width="80rpx"
|
||||
shape="square"
|
||||
:src="$filePath(userStore.avatar)"
|
||||
mode="widthFix"
|
||||
mode="aspectFill"
|
||||
></uv-avatar>
|
||||
</button>
|
||||
</template>
|
||||
</uv-cell>
|
||||
</view>
|
||||
</uv-sticky>
|
||||
<uv-button
|
||||
class="btn"
|
||||
type="primary"
|
||||
text="登录"
|
||||
@click="toLogin"
|
||||
></uv-button>
|
||||
<view class="btn">
|
||||
<uv-button type="primary" text="登录" @click="toLogin"></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -49,9 +49,9 @@ function toLogin() {
|
||||
}
|
||||
|
||||
.avatar-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 7px;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
padding: 0px;
|
||||
background-color: white;
|
||||
border: 0;
|
||||
outline: none;
|
||||
|
||||
Reference in New Issue
Block a user