-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:新增TSelectIcon elemnt-plus图标选择组件
- Loading branch information
Showing
12 changed files
with
343 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# TSelectIcon elemnt-plus图标选择组件 | ||
|
||
### 基本使用 | ||
|
||
:::demo | ||
TSelectIcon/base | ||
::: | ||
|
||
### 是否显示弹窗搜索框 | ||
|
||
:::demo | ||
TSelectIcon/isShowSearch | ||
::: | ||
|
||
### 是否显示选中后的图标 | ||
|
||
:::demo | ||
TSelectIcon/isShowIcon | ||
::: | ||
|
||
### selectBind属性配置 | ||
|
||
:::demo | ||
TSelectIcon/selectBind | ||
::: | ||
|
||
### TSelectIcon Attributes | ||
|
||
--- | ||
|
||
### 1、代码示例 | ||
|
||
```html | ||
<t-select-icon v-model="selectVlaue" /> | ||
``` | ||
|
||
### 2、配置参数(Attributes)继承 el-input Attributes | ||
|
||
| 参数 | 说明 | 类型 | 默认值 | | ||
| :----------- | :------------------- | :--------- | :----------------------------------------------------------------------------------------------------------------- | | ||
| v-model | 绑定值 | string | - | | ||
| prefixIcon | 输入框前缀icon | string | Search | | ||
| isShowSearch | 是否显示搜索图标 | Boolean | true | | ||
| isShowIcon | 是否显示选中后的图标 | Boolean | true | | ||
| selectBind | Attributes | selectBind | `"prefix-icon": props.prefixIcon, placeholder: "请选择图标",dialogTitle:'请选择图标',clearable: true,width: "50%"` | | ||
|
||
### 3、事件(events)继承 el-input 属事件 | ||
|
||
| 事件名 | 说明 | 回调参数 | | ||
| :----- | :--------- | :----------------- | | ||
| select | 选择完图标 | 返回选中的图标name | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<t-layout-page> | ||
<t-layout-page-item> | ||
<t-select-icon v-model="iconValue" @select="changeSelect" /> | ||
</t-layout-page-item> | ||
</t-layout-page> | ||
</template> | ||
<script setup lang="ts"> | ||
import { ref } from "vue" | ||
const iconValue = ref("") | ||
const changeSelect = (val: string) => { | ||
console.log(`选择的值:${val};v-model值:${iconValue.value}`) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<t-layout-page> | ||
<t-layout-page-item> | ||
<t-select-icon v-model="iconValue" @select="changeSelect" :isShowIcon="false" /> | ||
</t-layout-page-item> | ||
</t-layout-page> | ||
</template> | ||
<script setup lang="ts"> | ||
import { ref } from "vue" | ||
const iconValue = ref("") | ||
const changeSelect = (val: string) => { | ||
console.log(`选择的值:${val};v-model值:${iconValue.value}`) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<t-layout-page> | ||
<t-layout-page-item> | ||
<t-select-icon v-model="iconValue" @select="changeSelect" :isShowSearch="false" /> | ||
</t-layout-page-item> | ||
</t-layout-page> | ||
</template> | ||
<script setup lang="ts"> | ||
import { ref } from "vue" | ||
const iconValue = ref("") | ||
const changeSelect = (val: string) => { | ||
console.log(`选择的值:${val};v-model值:${iconValue.value}`) | ||
} | ||
</script> |
Oops, something went wrong.