Browse Source

遗物更新

cm 5 months ago
parent
commit
aea82dc4b8
1 changed files with 27 additions and 6 deletions
  1. 27 6
      src/components/player/relicInfo/index.vue

+ 27 - 6
src/components/player/relicInfo/index.vue

@@ -271,11 +271,11 @@
                     :value="option.value"></el-option>
             </el-select>
         </el-form-item>
-        <el-form-item label="词条数值">
-            <el-input v-model="rdmVal" placeholder="请输入词条数值" :maxlength="5" style="width: 200px" />
+        <el-form-item label="词条数值 S:1,A:2,B:3,C:4,D:5">
+            <el-input v-model="rdmVal" placeholder="请输入词条数值" :maxlength="1" style="width: 200px" @input="handleInput" />
         </el-form-item>
         <el-form-item label="强化次数">
-            <el-input v-model="rdmsTs" placeholder="请输入强化次数" :maxlength="5" style="width: 200px" />
+            <el-input v-model="rdmsTs" placeholder="请输入强化次数" :maxlength="1" style="width: 200px" />
         </el-form-item>
 
         <span slot="footer" class="dialog-footer" style="position: absolute; right: 20px; bottom: 10px;">
@@ -419,6 +419,17 @@ const heroJson = {
     703: "消防员"
 };
 
+const quaS = {
+    2: 1,
+    3: 2,
+    4: 3,
+    5: 4,
+    6: 4,
+    31: 3,
+    32: 4,
+    33: 4
+};
+
 const tableData = () => {
     let rls: any = [];
     if (search.value == "") {
@@ -441,6 +452,16 @@ const tableData = () => {
     );
 };
 
+const handleInput = (event: Event) => {
+    let value = Number(event);
+
+    // 如果输入的值在允许的值列表中,则更新 v-model
+    if (value > 5) {
+        value = 5;
+    }
+    rdmVal.value = value;
+};
+
 const inputChange = (val) => {
     let data = {
         itemID: val + "",
@@ -628,15 +649,15 @@ const openRlsModal = () => {
         count++;
     }
 
-    if (count < rlsStar.value - 1) {
+    if (count < quaS[rlsqua.value + ""]) {
         rdmModal.value = true;
         rdmTyp.value = null;
         rdmVal.value = 0;
         rdmsTs.value = 0;
         rdmOpenType.value = 2;
     } else {
-        let rdmCount = rlsStar.value - 1
-        let msg = "该星级最大词条数" + rdmCount;
+        let rdmCount = quaS[rlsqua.value + ""]
+        let msg = "该品质最大词条数" + rdmCount;
         ElMessage({
             message: msg,
             type: 'error',