学习?学个屁 1 день назад
Родитель
Сommit
68c605ec18
1 измененных файлов с 9 добавлено и 27 удалено
  1. 9 27
      src/subPack/selectClass/index.vue

+ 9 - 27
src/subPack/selectClass/index.vue

@@ -2,27 +2,13 @@
   <view class="py20rpx" v-if="data">
     <wd-card title="选择到场的学生">
       <view class="mb20rpx">
-        <wd-checkbox
-          v-model="isCheckAll"
-          size="large"
-          shape="square"
-          v-if="data.length"
-          @change="handleCheckAllChange"
-          ><text class="font-semibold text-32rpx">全选</text>
+        <wd-checkbox v-model="isCheckAll" size="large" shape="square" v-if="data.length"
+          @change="handleCheckAllChange"><text class="font-semibold text-32rpx">全选</text>
         </wd-checkbox>
       </view>
-      <wd-checkbox-group
-        v-model="checkedAll"
-        inline
-        size="large"
-        shape="square"
-      >
-        <wd-checkbox
-          :modelValue="item.useUserId"
-          v-for="item in data"
-          :key="item.id"
-          >{{ item.useUserName }}</wd-checkbox
-        >
+      <wd-checkbox-group v-model="checkedAll" inline size="large" shape="square">
+        <wd-checkbox :modelValue="item.useUserId" v-for="item in data" :key="item.id">{{ item.useUserName
+          }}</wd-checkbox>
       </wd-checkbox-group>
 
       <view class="mt40rpx">
@@ -32,9 +18,7 @@
       <template #footer></template>
     </wd-card>
   </view>
-  <fixdbtn block size="large" @click="handleSubmit" :loading="loading"
-    >提交</fixdbtn
-  >
+  <fixdbtn block size="large" @click="handleSubmit" :loading="loading">提交</fixdbtn>
 </template>
 
 <script setup lang="ts">
@@ -72,7 +56,7 @@ onLoad(async (query: any) => {
 async function handleSubmit() {
   if (!checkedAll.value.length)
     return uni.showToast({ title: "请勾选到场学生", icon: "none" });
-  if (!img.value) return uni.showToast({ title: "请上传图片", icon: "none" });
+  // if (!img.value) return uni.showToast({ title: "请上传图片", icon: "none" });
   const form = checkedAll.value.map((it) => {
     return {
       id: it,
@@ -104,11 +88,9 @@ function handleGoCamera() {
 </script>
 
 <style scoped></style>
-<route lang="json">
-{
+<route lang="json">{
   "name": "selectClass",
   "style": {
     "navigationBarTitleText": "点名"
   }
-}
-</route>
+}</route>