Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

vue-fill

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-fill

used by text filled and image filled on vue.js2.x

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

vue开发前期 文本填充 图片占位

介绍

vue-fill 是一款 基于 vue 2.X 的自定义指令,可以实现开发前期 图片 以及文本的填充。

安装

方式一. 通过 npm 安装 (推荐)

支持使用 npm 安装第三方包,

# 通过 npm 安装
npm i vue-fill

方式二. 下载代码

直接通过 git 下载源代码

git clone https://github.com/HunterXing/vue-fill.git

使用

main.js

import vueFill from 'vue-fill';
Vue.use(vueFill);

template

 <p v-fill></p>
 <p v-fill="text"></p>
 <img v-fill="[100,200]" />
data() {
    return {
      text: '自定义文本'
    }
}

上面第一种方式,将生成随机字符串

第二种方式,将生成自定义的文本

第三种方式,将生成图片占位,大小自定义

Keywords

directive

FAQs

Package last updated on 28 Mar 2020

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