Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ektx/v-macos

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ektx/v-macos - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

package.json
{
"name": "@ektx/v-macos",
"version": "0.0.2",
"version": "0.0.3",
"description": "系统主框架",

@@ -15,3 +15,4 @@ "main": "index.js",

"dependencies": {
"@ektx/v-menubar": "0.0.2"
"@ektx/v-menubar": "0.0.2",
"@ektx/v-contextmenu": "^0.2.6"
},

@@ -18,0 +19,0 @@ "author": "ektx",

35

parts/desktop/main.js

@@ -8,2 +8,8 @@ // 右键菜单组件

name: 'VMacOSDesktop',
props: {
hasRootNav: {
type: Boolean,
default: false
}
},
components: {

@@ -17,16 +23,22 @@ VContextmenu,

}),
beforeCreate () {
// 在 vuex 上设置默认值
this.$set(this.$store.state, 'MacOSTopbar', {
// 主菜单
created () {
let options = {
mainNav: {},
// 右边菜单
asideNav: {},
root: [
root: []
}
if (this.hasRootNav) {
options.root = [
{
title: '🔺',
title: '主页',
children: [
{
title: '主页',
to: '/'
title: '最近访问',
children: [
{
title: '主页',
to: '/'
}
]
}

@@ -36,4 +48,7 @@ ]

]
})
}
// 在 vuex 上设置默认值
this.$set(this.$store.state, 'MacOSTopbar', options)
}
}

@@ -28,3 +28,3 @@ # v-macos

<template>
<VMacOSDesktop/>
<VMacOSDesktop hasRootNav />
</template>

@@ -34,3 +34,2 @@ ```

import { VMacOSDesktop } from '@ektx/v-macos'
import { mapMutations } from 'vuex'

@@ -45,1 +44,14 @@ export default {

- hasRootNav `[boolean]` 是否启用组件自定义菜单
### store.js 配置
```js
// 引用对主菜单 mutation
import { MutaionMacOSTopbar } from '@ektx/v-macos'
export default new Vuex.Store({
mutations: {
MutaionMacOSTopbar
}
})
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc