Socket
Book a DemoInstallSign in
Socket

valaxy-addon-components

Package Overview
Dependencies
Maintainers
1
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

Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

valaxy-addon-waline

NPM version

TODO: English Docs

valaxy-addon-components 是可以提供通用 Vue 组件 的一个 Valaxy 插件。

主题开发者可以通过将其作为依赖使用,以快速使用内置组件。

组件列表

命名空间以 VC 开头。

  • VCLiveTime: 生存时间

如何使用

安装依赖

npm i valaxy-addon-components

加载插件

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

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

在任意地方使用并设置你的参数

大部分人可能希望挂在主题页脚 这里以主题 valaxy-theme-yun 为例:

  • start-time: 代表站点成立开始计时的时间
<!-- 新建 components/YunFooter.vue -->
<script lang="ts" setup>
import YunFooter from 'valaxy-theme-yun/components/YunFooter.vue'
</script>

<template>
  <YunFooter>
    <VCLiveTime start-time="2022-01-01">
      <template #live-time-before>
        <span>本站已运行</span>
      </template>
      <template #live-time-after>
        <span>后缀</span>
      </template>
    </VCLiveTime>
  </YunFooter>
</template>

Keywords

valaxy

FAQs

Package last updated on 22 Jan 2023

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