This commit is contained in:
XBing 2024-07-02 18:23:48 +08:00
parent 36c6570a6e
commit fa30fee27e
7 changed files with 26 additions and 24 deletions

View File

@ -1,9 +0,0 @@
import Input from './src'
// 为组件提供 install 安装方法,供按需引入
Input.install = function (Vue) {
Vue.component(Input.name, Input)
}
// 导出组件
export default Input

View File

@ -1,9 +0,0 @@
import Select from './src'
// 为组件提供 install 安装方法,供按需引入
Select.install = function (Vue) {
Vue.component(Select.name, Select)
}
// 导出组件
export default Select

View File

@ -0,0 +1,9 @@
import agInput from './src'
// 为组件提供 install 安装方法,供按需引入
agInput.install = function (Vue) {
Vue.component(agInput.name, agInput)
}
// 导出组件
export default agInput

View File

@ -20,7 +20,7 @@
* @desc 处理输入的输入框(转大写不能有中文空格等) * @desc 处理输入的输入框(转大写不能有中文空格等)
*/ */
export default { export default {
name: "AgInput", name: "agInput",
props: { props: {
width: { width: {
type: String, type: String,

View File

@ -0,0 +1,9 @@
import agSelect from './src'
// 为组件提供 install 安装方法,供按需引入
agSelect.install = function (Vue) {
Vue.component(agSelect.name, agSelect)
}
// 导出组件
export default agSelect

View File

@ -20,7 +20,7 @@
<script> <script>
import cloneDeep from "../../../src/utils/cloneDeep"; import cloneDeep from "../../../src/utils/cloneDeep";
export default { export default {
name: "AgSelect", name: "agSelect",
props: { props: {
width: { width: {
type: String, type: String,

View File

@ -1,9 +1,11 @@
// 导入button组件 // 导入button组件
import Input from './Input/src/index.vue' import agInput from './agInput/index'
import agSelect from './agSelect/index'
// 组件列表 // 组件列表
const components = [ const components = [
Input, agInput,
agSelect
] ]
// 定义 install 方法,接收 Vue 作为参数(使用 use 注册插件,那么所有的组件都会被注册) // 定义 install 方法,接收 Vue 作为参数(使用 use 注册插件,那么所有的组件都会被注册)
@ -24,7 +26,7 @@ export default {
install, install,
} }
export { export {
install,
// 以下是具体的组件列表 // 以下是具体的组件列表
Input, agInput,
agSelect
} }