瀏覽代碼

feat: 优化采用公共选择组件

zhangyuhan 1 周之前
父節點
當前提交
23ac4ed9d5
共有 1 個文件被更改,包括 20 次插入11 次删除
  1. 20 11
      apps/bigmember_pc/src/views/subscribe/FreeConfig.vue

+ 20 - 11
apps/bigmember_pc/src/views/subscribe/FreeConfig.vue

@@ -5,14 +5,9 @@
       <h1>帮用户订阅(免费订阅)</h1>
       <div class='flex flex-(row items-center)'>
         <span>选择用户身份:</span>
-        <el-select v-model="checkUserKey" @change='doChangeUserKey' placeholder="请选择用户身份">
-          <el-option
-            v-for="item in userKeyList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
+        <div class='select-selector-fix-height'>
+          <select-selector type='select' :options='userKeyList' v-model='checkUserKey' @change='doChangeUserKey' placeholder='请选择用户身份'></select-selector>
+        </div>
       </div>
     </div>
 
@@ -59,7 +54,7 @@
 </template>
 
 <script>
-import { Dialog, Button, Select, Option } from 'element-ui'
+import { Dialog, Button } from 'element-ui'
 import FreeSubConfig from './components/key/FreeSubConfig'
 import FreeKeyConfig from './components/key/FreeKeyConfig'
 import KeyList from './components/key/List'
@@ -67,14 +62,14 @@ import { getFreeUserSubscribeList, setUserInfoVip, updateKey, getHelpFreeUserKey
 import $bus from '@/utils/bus'
 import { mixinNoOpenSetMessage } from '@/utils/mixins/subscribe-setting-prompt.js'
 import { getOneLevelNamesByValues } from '@/assets/js/selector'
+import SelectSelector from '@/components/filter-items/SelectSelector.vue'
 export default {
   name: 'free-config',
   mixins: [mixinNoOpenSetMessage],
   components: {
+    SelectSelector,
     [Dialog.name]: Dialog,
     [Button.name]: Button,
-    [Select.name]: Select,
-    [Option.name]: Option,
     KeyList,
     FreeSubConfig,
     FreeKeyConfig
@@ -411,6 +406,20 @@ export default {
   background: #fff;
   border-radius: 5px;
   box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
+
+  .select-selector-fix-height {
+    min-width: 200px;
+    .filter-layout.filter-input-layout,
+    .filter-layout.filter-input-layout .el-popper,
+    .el-dropdown {
+      width: 100%;
+    }
+    .filter-layout.filter-input-layout .el-popper {
+      margin-top: 12px;
+    }
+
+  }
+
   .config-title {
     padding-bottom: 12px;
     font-size: 18px;