@fox-js/vite-plugin-encrypt
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

Fox vite-plugin-model-name

用于给设置了v-model的组件,自动加上name属性,name属性为v-model对应的字面名称

原数据

<fox-input-item v-model="account"></fox-input-item>

格式化后, 自定加上name属性

<fox-input-item v-model="account" name="account"></fox-input-item>

Install

NPM

npm i @fox-js/vite-plugin-model-name -D

YARN

yarn add @fox-js/vite-plugin-model-name --dev

使用指南

import { UserConfigExport, ConfigEnv, loadEnv } from 'vite'
import modelName from '@fox-js/vite-plugin-model-name'
import { join } from 'path'

export default ({ command, mode }: ConfigEnv): UserConfigExport => {
  return {
    plugins: [
      modelName({
        include: join(__dirname, '../src/page')
      })
    ]
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @fox-js/vite-plugin-encrypt

Weekly Downloads

4

Version

4.0.0

License

none

Unpacked Size

9.98 kB

Total Files

6

Last publish

Collaborators

  • archlizz
  • jiangcheng316