pjts-suggestion-box
v0.0.5
Published
Suggestion box for Project Trans
Downloads
4
Readme
Suggestion box
Suggestion box for Project Trans's website.
Usage
# Or npm, yarn, bun, etc.
pnpm add pjts-suggestion-box
pnpm add @iconify-json/octicon -D # Suggestion Box uses octicon.
In your Vue component:
<template>
<SuggestionBox target-url="https://example.com" send-text="发送" text-content-placeholder="114514" contact-content-placeholder="1919810" />
</template>
<script>
import SuggestionBox from 'pjts-suggestion-box';
</script>
In uno.config.ts
:
import presetSBox from 'pjts-suggestion-box/dist/preset';
import { defineConfig, presetUno, presetIcons } from 'unocss';
export default defineConfig({
// ...
content: {
pipeline: {
include: [
// Default match pattern of UnoCSS
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
// Match suggestion-box
/.*pjts-suggestion-box.*\.js/,
],
},
},
presets: [
// SuggestionBox uses presetUno
presetUno(),
// SuggestionBox uses presetIcons
presetIcons(),
// SuggestionBox's own rules
presetSBox(),
],
});
Development
corepack enable
pnpm i
pnpm dev