瀏覽代碼

style: altera dropdown icon

ebagabee 3 周之前
父節點
當前提交
5fcf4321ce
共有 1 個文件被更改,包括 43 次插入27 次删除
  1. 43 27
      src/components/defaults/DefaultSelect.vue

+ 43 - 27
src/components/defaults/DefaultSelect.vue

@@ -15,11 +15,16 @@
         :bg-color
         :class="inputClass"
         :popup-content-class="popupContentClass"
+        hide-dropdown-icon
         @update:model-value="error = null"
       >
         <template v-for="(_, slotName) in $slots" #[slotName]="scope">
           <slot :name="slotName" v-bind="scope" />
         </template>
+
+        <template #append>
+          <q-icon :name="dropdownIcon" color="secondary" />
+        </template>
       </q-select>
     </div>
   </div>
@@ -32,33 +37,44 @@ defineOptions({
   inheritAttrs: false,
 });
 
-const { label, inputClass, popupContentClass, rules, bgColor, outlined } =
-  defineProps({
-    label: {
-      type: String,
-      default: "",
-    },
-    rules: {
-      type: Array,
-      default: () => [],
-    },
-    inputClass: {
-      type: String,
-      default: null,
-    },
-    popupContentClass: {
-      type: String,
-      default: null,
-    },
-    bgColor: {
-      type: String,
-      default: "white",
-    },
-    outlined: {
-      type: Boolean,
-      default: false,
-    },
-  });
+const {
+  label,
+  inputClass,
+  popupContentClass,
+  rules,
+  bgColor,
+  outlined,
+  dropdownIcon,
+} = defineProps({
+  label: {
+    type: String,
+    default: "",
+  },
+  rules: {
+    type: Array,
+    default: () => [],
+  },
+  inputClass: {
+    type: String,
+    default: null,
+  },
+  popupContentClass: {
+    type: String,
+    default: null,
+  },
+  bgColor: {
+    type: String,
+    default: "white",
+  },
+  outlined: {
+    type: Boolean,
+    default: false,
+  },
+  dropdownIcon: {
+    type: String,
+    default: "mdi-chevron-down",
+  },
+});
 
 const attrs = useAttrs();