npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@qingbing/ts-v3-page-head

v2.0.2

Published

以 vue3 + element-plus 为基础封装的用于页头的组件

Downloads

3

Readme

PageHead 插件介绍

1. 概要说明

1.1 地址

https://gitee.com/duqingbing/ts-v3-package/tree/ts-v3-page-head

1.2 插件描述

以 vue3 + element-plus 为基础封装的用于页头的组件

1.3 重要依赖

  • @qingbing/ts-v3-operate-button
  • element-plus
  • vue
  • vue-router

1.4 插件安装

# yarn 安装
yarn add @qingbing/ts-v3-page-head

# npm 安装
npm i @qingbing/ts-v3-page-head

2. 包说明

2.1 属性说明

| 属性名 | 类型 | 是否必需 | 默认值 | 意义 | | :------------- | :------------------------ | :------- | :------------------- | :--------------------------------------------------------------------------------------------------- | | conf | TPageHeadConf | 是 | {} | pageHeader 配置,参考 https://element-plus.org/zh-CN/component/page-header.html#attributes | | classNames | string[] | 否 | [] | 设置顶级类名 | | hideGoBackBtn | boolean | 否 | false | 是否隐藏 go back 按钮 | | breadcrumbConf | TPageHeadBreadcrumb | 否 | { "separator": '/' } | 面包屑, 参考 https://element-plus.org/zh-CN/component/breadcrumb.html#breadcrumb-attributes | | breadcrumbs | TPageHeadBreadcrumbItem[] | 否 | [] | 面包屑项目, 参考 https://element-plus.org/zh-CN/component/breadcrumb.html#breadcrumbitem-attributes | | buttons | TOperateButtonButton[] | 否 | [] | 操作按钮, 参考: https://gitee.com/duqingbing/ts-v3-package/tree/ts-v3-operate-button/ | | goBack | () => void | 否 | - | 自定义回退函数 |

3. 示例

3.1 全局注册使用

  • 一旦注册, PageHead 作为组件全局通用
  • 使用方法参考 3.2 模板组件使用, 去掉组件导入的语句即可
// main.ts
import { PageHeadPlugin } from '@qingbing/ts-v3-page-head'
app.use(PageHeadPlugin, {
  name: 'PageHead',
  options: {}
})

3.2 模板组件使用

<template>
    <PageHead :breadcrumbs="breadcrumbs" :classNames="['test', 'test2']" :breadcrumbConf="breadcrumbConf"
        :conf="pageHeadConf" :buttons="buttons" />
    <PageHead :hideGoBackBtn="false" :breadcrumbs="breadcrumbs" :classNames="['test', 'test2']"
        :breadcrumbConf="breadcrumbConf" :conf="{ title: '测试面板' }" :buttons="buttons" />
    <div>今天是个好天气 00001</div>
    <div>今天是个好天气 00002</div>
    <div>今天是个好天气 00003</div>
    <div>今天是个好天气 00004</div>
    <div>今天是个好天气 00005</div>
</template>

<script lang="ts" setup>
import "@qingbing/ts-v3-page-head/dist/style.css" // page-head 组件样式

import type { TPageHeadBreadcrumb, TPageHeadBreadcrumbItem, TPageHeadConf } from "@qingbing/ts-v3-page-head"
import type { TOperateButtonButton } from "@qingbing/ts-v3-operate-button"
import { PageHead } from "@qingbing/ts-v3-page-head"

const breadcrumbConf: TPageHeadBreadcrumb = {
    // "separator": "|"
}

const breadcrumbs: TPageHeadBreadcrumbItem[] = [
    {
        label: "Home",
        to: '/'
    }, {
        label: "Support",
        link: "http://www.qiyezhu.net",
        target: "_blank"
    }, {
        label: "Test",
        to: '/test'
    }, {
        label: "Current",
    }
]

const pageHeadConf: TPageHeadConf = {
    title: "控制面板",
    content: "这个是控制面板"
}

const buttons: TOperateButtonButton[] = [
    {
        label: 'Add',
        linkType: "primary",
        handle: () => {
            console.log("Add Function");
        }
    }, {
        label: 'Print',
        handle: () => {
            console.log("Print Function");
        }
    },
]
</script>