0.0.5 • Published 9 months ago

unplugin-vue-armor v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

unplugin-vue-armor

🛸Vue macros that provide additional attributes to vue elements.🛸为Vue标签提供更多属性的宏插件

📦Installation

#npm
npm i unplugin-vue-armor -D

#yarn
yarn add unplugin-vue-armor -D

#pnpm
pnpm i unplugin-vue-armor -D
// vite.config.ts
import Armor from 'unplugin-vue-armor/vite'

export default defineConfig({
  plugins: [
    Armor(),
  ],
})

// rollup.config.js
import Armor from 'unplugin-vue-armor/rollup'

export default {
  plugins: [
    Armor(),
  ],
}

// webpack.config.js
module.exports = {
  plugins: [
    require('unplugin-vue-armor/webpack')(),
  ],
}

🔮Usage

name:

  • If you just need create component name in set up, you can try to use name to replace defineOptions,only can be used in Vue >= 3.3.

    It will automatically turn this

    <script setup name="VueArmor"></script>

    into this

    <script setup>
    defineOptions({
      name: "VueArmor"
    })
    </script>

    style:

  • Use style to import your scoped css, make your code more concise.

    It will automatically turn this

    <script setup style="./styles/index.css"></script>

    into this

    <script setup></script>
    
    <style scoped src="./styles/index.css"></style>
0.0.5

9 months ago

0.0.4

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago