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

@ahcui/vue3-components-url-loader

v1.0.0

Published

VUE3组件-可载入url页面的vue组件

Downloads

43

Readme

一个可以加载html页面的vue3组件

组织:ahcui
@ahcui/vue3-components-url-loader 是一个可加载页面的vue组件。

当前版本: 1.0.0 (支持 Vue 3)

[ 在线演示 | 使用示例 ]

特性

  • 加载html页面
  • 通过props传入url参数
  • 可监听页面中url参数
  • 无边框
  • 样式重写与覆盖

入门指南

安装

npm

# 使用 npm    
npm install @ahcui/vue3-components-url-loader --save

引入

  • npm方式引入
    import UrlLoader from '@ahcui/vue3-components-url-loader';

加入到 Vue 组件

   export default {
       components: {
          UrlLoader,
      },
   }
   

使用


    <url-loader :url="url" :watchQuery="watchQuery" style="height:100%" frameborder="1" @frameloaded="frameloadedHandle" @framemounted="framemountedHandle"  >
    </url-loader>
	
    import UrlLoader from '@ahcui/vue3-components-url-loader';
	
	export default {
		name: "PageLoader",
		components:{UrlLoader},
		props: {
			url:{
				type: String,
				default:""
				},
			watchQuery:{
				type:Boolean,
				default:true
				},
		},
		setup(){
			const frameloadedHandle = () => {
				console.log("frameloadedHandle");
			}
			const framemountedHandle = () => {
				console.log("framemountedHandle");
			}
			return {
				frameloadedHandle,
				framemountedHandle,
			}
		}
	}

文档

属性

  • 要加载的url

    url { type:String, default:"", },

  • 是否自动监听页面地址中的url参数切换页面

    watchQuery:{ type:Boolean, default:true }

    如组件所在的当前页面地址为:

    http://localhost:8888/a/b/loadsrc?url=http%3A%2F%2Fnodejs.cn%2Fapi%2F

    若此值设为true,则自动监听url参数的值

事件

布局事件

  • framemounted

    对应Vue生命周期 Vue的mounted事件

    framemounted: function(iframe){
      console.log("Vue组件PageLoader构建完成")
    }
  • frameloaded

    组件要加载的url页面加载完成事件iframe的load事件

    frameloaded: function(iframe){
      console.log("页面加载完成,同域的前提下您可以向iframe对象内部注入脚本处理")
    }