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

@realgrid/vue-realgrid

v0.2.2

Published

RealGrid JS Wraping Component for Vue.js

Downloads

77

Readme

Vue.Js 에서 RealGrid 사용하기

개요

본 문서는 Vue.Js에서 RealGrid를 사용하기 위한 가이드 입니다.

본 문서에는 vue-realgrid npm 패키지의 소스 코드를 포함 하고 있습니다. vue-realgrid는 RealGrid Js 라이브러리를 Vue.js에서 사용하기 위한 Helper 패키지 입니다. 본 소스 코드의 내용은 누구든 수정하여 사용하거나 재배포 할 수 있습니다.

아래 목차에 따라 Vue.Js에서 RealGrid를 사용하는 방법을 배워보시기 바랍니다.

RealGridJS 설치

리얼그리드 도움말의 RealGridJS 설치하기 에 보면 RealGrid를 설치하는 방법이 정리되어 있습니다.

Vue.js 에서 RealGrid를 사용하기 위해 동일한 방법으로 페이지에 <script> 태그를 사용하여 RealGrid 라이브러리 파일을 import 합니다.

sample index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script type="text/javascript" src="./realgridjs-lic.js"></script>
    <script type="text/javascript" src="./lib/realgridjs_eval.1.1.29.min.js"></script>
    <script type="text/javascript" src="./lib/realgridjs-api.1.1.29.js"></script>
    <title>sample1</title>
  </head>
  <body>
    <div id="app">
      <realgrid></realgrid>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="main.js"></script>
  </body>
</html>

위와 같이 RealGrid 파일들이 모두 import 되면 전역적 컨텍스트에 RealGridJS 라는 이름의 객체가 정의됩니다. 그러므로 JavaScript 코드의 어디에서든 RealGrid를 생성 할 수 있습니다.

아래 Vue 코드와 같이 RealGridJS 객체를 이용해 RealGrid를 직접 생성 할 수 있습니다. sample1 참조

sample main.js vue code

Vue.component('realgrid', {
    template: `
    <div>
        <div id="realgrid" style="width: 100%; height: 200px;"></div>
    </div>
    `,
    mounted() {
        RealGridJS.setRootContext("/lib");
        this.dataProvider = new RealGridJS.LocalDataProvider();
        this.gridView = new RealGridJS.GridView("realgrid");
        this.gridView.setDataSource(this.dataProvider);
    },
    data() {
        return {
            dataProvider: null,
            gridView: null,
        }
    }
})

var app = new Vue({
    el: '#app',
});

RealGrid 컴포넌트 이용하기

위와 같이 직접 RealGridJS 객체를 컨트롤 할 수도 있지만 편의를 위해 작성된 Vue.js 용 RealGrid Helper component 를 설치 하여 사용할 수도 있습니다.

npm install --save @realgrid/vue-realgrid