Skip to content

Commit

Permalink
feat: defineOptions 支持
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Aug 14, 2022
1 parent fc09640 commit 82aaaf8
Show file tree
Hide file tree
Showing 9 changed files with 222 additions and 521 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
"prettier/prettier": "error",
// 禁止使用 var,而应该用 let 或 const
"no-var": "error"
},
"globals": {
"defineOptions": true
}
}
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
27. 环境变量配置支持
28. 统一的代码规范与风格支持
29. 生产环境自动移除开发日志
30. defineOptions 支持

<br />
<br />
Expand Down Expand Up @@ -1208,6 +1209,22 @@ export default defineComponent({
具体可见 👉 [vite-plugin-removelog](https://github.com/dishait/vite-plugin-removelog)
<br />
<br />
### 30. [defineOptions 支持](https://github.com/sxzz/unplugin-vue-macros/blob/main/README-zh-CN.md)
```html
<script setup lang="ts">
// 定义额外的 options
defineOptions({
name: 'Foo'
})
</script>
```
具体可见 👉 [unplugin-vue-macros](https://github.com/sxzz/unplugin-vue-macros/blob/main/README-zh-CN.md)
<br />
<br />
<br />
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"unplugin-auto-import": "^0.11.1",
"unplugin-icons": "^0.14.8",
"unplugin-vue-components": "^0.22.4",
"unplugin-vue-macros": "^0.8.6",
"unplugin-vue-router": "^0.1.1",
"vite": "^3.0.5",
"vite-plugin-compression": "^0.5.1",
Expand Down
Loading

0 comments on commit 82aaaf8

Please sign in to comment.