Socket
Book a DemoInstallSign in
Socket

valaxy-addon-components

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valaxy-addon-components

Common Components for Valaxy

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
0
Created
Source

valaxy-addon-components

valaxy-addon-components is a plugin that provides general-purpose Vue components for Valaxy.

NPM version

  • English | 简体中文

Installation

pnpm add valaxy-addon-components
Common Components

You can enable common components of the plugin as follows. For a full list of common components, see Common Components.

import { defineValaxyConfig } from 'valaxy'
import { addonComponents } from 'valaxy-addon-components'

export default defineValaxyConfig({
  addons: [
    addonComponents(),
  ],
})


Theme Components

You can also extend unplugin-vue-components using the plugin's ValaxyThemesResolver to introduce third-party themes. Here is an example using the Yun theme:

import { defineValaxyConfig } from 'valaxy'
import { ValaxyThemesResolver } from 'valaxy-addon-components'

export default defineValaxyConfig({
  components: {
    resolvers: [ValaxyThemesResolver({ themes: ['yun'] })],
  },
})
PropertyTypeDefaultDescription
themesstring[]---Third-party themes to import components from

[!TIP] By default, the system will automatically recognize components under the components folder. To manually specify the component path relationships, theme support is required. Create a components.json file in the root directory of the theme, and specify the component names and their paths relative to the components folder, as shown below:

{
  "YunCollectionItem": "collection/YunCollectionItem.vue"
}


Usage

Most users may want to mount the components to the footer of the theme. You can create a new file in the components folder, such as MyFooter.vue, and use it as follows:

<template>
  <YunFooter>
    <VCLiveTime start-time="2022-01-01">
      <template #live-time-before>
        <span>This site has been running for</span>
      </template>
      <template #live-time-after>
        <span>suffix</span>
      </template>
    </VCLiveTime>
  </YunFooter>
</template>

Common Components

Namespace starting with VC

VCLiveTime

Used to display the site's uptime.

PropertyTypeDefaultDescription
startTimestring---The time from which the site starts counting

Third-Party Components

Encapsulates third-party services and follows general naming rules.

Codepen

Keywords

valaxy

FAQs

Package last updated on 19 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.