Explorar el Código

部分vuetify2改为3写法

lifanagju_citu hace 2 semanas
padre
commit
b9ab112bc1
Se han modificado 1 ficheros con 28 adiciones y 30 borrados
  1. 28 30
      src/components/Knowledge/talk.vue

+ 28 - 30
src/components/Knowledge/talk.vue

@@ -1,22 +1,22 @@
 <template>
   <div class="d-flex flex-column" style="height: 100%">
-    <v-banner single-line>
+    <v-banner :single-line="true">
       <div class="my-3">
         {{ title }}
       </div>
-      <template #actions>
+      <template v-slot:actions>
         <slot name="title"></slot>
       </template>
     </v-banner>
     <div style="flex: 1; overflow: auto;" class="pa-3" ref="box">
       <div style="height: 100%;">
-        <v-list three-line>
+        <v-list lines="three">
           <!-- 欢迎语 -->
           <v-list-item>
             <v-list-item-content>
               <v-list-item-title class="d-flex align-center" :class="system.nameColor + '--text'">
-                <v-icon class="mr-3" :color="system.iconColor" >
-                {{ system.icon }}
+                <v-icon class="mr-3" :color="system.iconColor">
+                  {{ system.icon }}
                 </v-icon>
                 {{ system.name }}
               </v-list-item-title>
@@ -37,7 +37,7 @@
               >
                 {{ talk.type === 'question' ? formatName(baseInfo?.name ?? baseInfo?.phone) : '' }}
                 <template v-if="talk.type === 'question'">
-                  <v-chip v-for="tag in talk.tags" :key="tag" x-small class="ml-2">{{ tag }}</v-chip>
+                  <v-chip v-for="tag in talk.tags" :key="tag" size="x-small" class="ml-2">{{ tag }}</v-chip>
                 </template>
                 <v-icon
                   :class="talk.type === 'question' ? 'ml-3' : 'mr-3'"
@@ -47,31 +47,29 @@
                 </v-icon>
                 {{ talk.type === 'question' ? '' : system.name }}
                 <template v-if="talk.type !== 'question'">
-                  <v-chip v-for="tag in talk.tags" :key="tag" x-small class="ml-2">{{ tag }}</v-chip>
+                  <v-chip v-for="tag in talk.tags" :key="tag" size="x-small" class="ml-2">{{ tag }}</v-chip>
                 </template>
               </v-list-item-title>
               <v-list-item-subtitle class="d-flex" :class="{'justify-end': talk.type === 'question'}">
                 <div class="lighten-5 pa-3 round" :class=" talk.type === 'question' ? user.bgColor : system.bgColor">
                   <template v-if="talk.view === 'table'">
-                    <v-simple-table fixed-header dense height="350">
-                      <template v-slot:default>
-                        <thead>
-                          <tr>
-                            <th v-for="header in talk.content.headers" :key="header" class="text-left">
-                              {{header}}
-                            </th>
-                          </tr>
-                        </thead>
-                        <tbody>
-                          <tr
-                            v-for="(body, i) in talk.content.body"
-                            :key="i"
-                          >
-                            <td v-for="header in talk.content.headers" :key="header">{{ body[header] }}</td>
-                          </tr>
-                        </tbody>
-                      </template>
-                    </v-simple-table>
+                    <v-table fixed-header density="compact" height="350">
+                      <thead>
+                        <tr>
+                          <th v-for="header in talk.content.headers" :key="header" class="text-left">
+                            {{header}}
+                          </th>
+                        </tr>
+                      </thead>
+                      <tbody>
+                        <tr
+                          v-for="(body, i) in talk.content.body"
+                          :key="i"
+                        >
+                          <td v-for="header in talk.content.headers" :key="header">{{ body[header] }}</td>
+                        </tr>
+                      </tbody>
+                    </v-table>
                   </template>
                   <template v-else>
                     <div v-for="(content, index) in talk.content" :key="index + content">{{ content }}</div>
@@ -104,12 +102,12 @@
       <div class="send-box">
         <v-textarea
           v-model="question"
-          dense
+          density="compact"
           class="send-box-area"
           auto-grow
-          label="请输入您想问的内容,按 Ctrl+Enter 换行"
-          placeholder="请输入您想问的内容,按 Ctrl+Enter 换行"
-          solo
+          :label="'请输入您想问的内容,按 Ctrl+Enter 换行'"
+          :placeholder="'请输入您想问的内容,按 Ctrl+Enter 换行'"
+          variant="solo"
           hide-details
           no-resize
           rows="1"