JSPM

fine-mini

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q26699F
  • License ISC

page for miniprogram

Package Exports

  • fine-mini

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fine-mini) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fine-mini

改写小程序Page方法,注入一些生命周期钩子。内部集成了EventBus类,CreatePage

安装

npm install fine-mini

使用

import { CreatePage } from 'fine-mini'

const _page =  new CreatePage({
  data () {
    return {
      name: 'test'
    }
  },
  onShow () {
    console.log('page show')
  },
  onHide: {
    beforeHandler () {
      console.log('before onHide')
    },
    async: false
  }
})

_page({
  _name: 'TEST_PAGE',
  data: {
    host: ''
  }
})