Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过命令自动生成的组件代码,不应该用到第三方组件库 #11

Open
seepine opened this issue Jul 17, 2023 · 0 comments

Comments

@seepine
Copy link
Contributor

seepine commented Jul 17, 2023

例如以下代码片段,都用到了 vant ,然而通用组件库模板的话,不可能大家都会依赖 vant,建议用到的一些方法将其抽到 utils 使其可以脱离 vant 应该好一点

import { withInstall } from 'vant/es/utils'
import _Form from './src/form.vue'

export const Form = withInstall(_Form)
export default Form

export * from './src/props'

import { makeStringProp } from 'vant/es/utils'
import type { ExtractPropTypes } from 'vue'

export const formProps = {
  /**
   * 类型定义
   */
  type: makeStringProp(''),
}

export type FormProps = ExtractPropTypes<typeof formProps>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant