vue-remove-whitespace
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

vue-remove-whitespace

A reusable remove whitespace directive for reusable Vue.js components

Overview

英語では通常、単語は空白文字で区切られます。一方、中国語、日本語、タイ語などの言語では通常、単語間の区切り文字は一切使用されません。

spanやa、またそれらを内包したVue コンポーネントなどのinline要素内での改行は、意図しないWhitespaceを作ってしまいます。

vue-remove-whitespace はそれらの課題を解決します。

Requirements

  • vue: ^2.0.0

API

directives

import { removeWhitespace } from 'vue-remove-whitespace';

export default {
  directives: { removeWhitespace: removeWhitespace },
  template: `
    <p v-remove-whitespace>
      お問い合わせは
      <a href="#">こちらから</a>
      お願いします
    </p>
  `,
};

mixin

import { mixin as removeWhitespaceMixin } from 'vue-remove-whitespace';

export default {
  mixins: [ removeWhitespaceMixin ],
  template: `
    <p v-remove-whitespace>
      お問い合わせは
      <a href="#">こちらから</a>
      お願いします
    </p>
  `,
};

Notes

forked configuration vue-focus

License

MIT

Package Sidebar

Install

npm i vue-remove-whitespace

Weekly Downloads

2

Version

2.1.1

License

MIT

Unpacked Size

6.75 kB

Total Files

7

Last publish

Collaborators

  • ao_kiken