1.3.0 • Published 3 years ago

@backrunner/vue-titlebar v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vue-titlebar

This is a fork version of wuild's vue-titlebar.

Here's the difference:

  1. Change menu to a slot.
  2. Bundled with rollup.
  3. Icon will not show by default and change default icon to electron.
  4. Add lint to the project.
  5. Add restore button and related event.

Installation

Install with npm:

npm install --save @backrunner/vue-titlebar
const VueTitlebar = require('@wuild/vue-titlebar');

Vue.use(VueTitlebar);

Usage

Themes / Platform

windows dark

windows light

osx dark

osx light

Properties

Nametypedefaultdescription
themeStringlighttheme (dark, light)
platformString--(required) specify current platform (win32, darwin, linux)
isMinimizableBooleantrueshow minimize button
isMaximizableBooleantrueshow maximize button
isMaximizedBooleantrueif window is maximized
isClosableBooleantrueshow close button
onMinimizeFunction--if minimize button is clicked
onMaximizeFunction--if maximize button is clicked
onRestoreFunction--if restore button is clicked
onCloseFunction--if close button is clicked
showIconBooleanfalsetheme (dark, light)
showTitleBooleantruetheme (dark, light)

Example

full example

<v-titlebar
  :theme="theme"
  :platform="platform"
  :on-close="close"
  :on-maximize="maximize"
  :on-restore="restore"
  :on-minimize="minimize"
  :is-maximizable="isMaximizable"
  :is-maximized="isMaximized"
  :is-closable="isClosable"
  :is-minimizable="isMinimizable"
  :show-icon="showIcon"
  :show-title="showTitle"
>
  <template slot="icon">
    <img src="image.png" alt="icon" />
  </template>
  <template slot="title">
    App Name
  </template>
</v-titlebar>

License

MIT

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago