简易智能 App Blanner - Vue 插件
用于 Vue 插件 智能 App 横幅。 。 。 .
安装
npm i -S @easy-smart-app-banner/vue-plugin
vue (单位:千美元)^3.5.0)是同级依赖关系。 你的应用程序提供了它.
使用量
// main.ts
import './assets/main.css';
import { createApp } from 'vue';
import App from './App.vue';
import createSmartAppBanner, {
type SmartBannerOptions,
} from '@easy-smart-app-banner/vue-plugin';
import '@easy-smart-app-banner/vue-plugin/style.css';
// or SCSS if you prefer
// import '@easy-smart-app-banner/vue-plugin/style.scss';
createApp(App)
.use(createSmartAppBanner, {
title: 'Hello world!',
author: 'Albert Ferguson',
// using the create-vue asset logo (any image is valid!)
icon: '/src/assets/logo.svg',
// optionally enable verbose logging - this is disabled by default
verbose: true,
googlePlayStoreUrl: 'https://play-store-application-url',
appStoreUrl: 'https://app-store-application-url',
} as SmartBannerOptions)
.mount('#app');
// App.vue
<script setup lang="ts">
import { useSmartAppBanner } from '@easy-smart-app-banner/vue-plugin';
const smartAppBanner = useSmartAppBanner();
try {
// mount the component
smartAppBanner.mount();
} catch (error) {
// catch any errors gracefully if there's any config or platform issues
console.error(error);
}
</script>
更多配置请参见 智能 App 横幅 仓库.
发展
要开始,拉回波 运行一个建筑.
别忘了跑
npm i来啊!
npm run build
您可以在 软件包.json。 。 。 .
下一步是启动依赖的项目, 因为你可能也想要编辑它。 见 这里。 。 。 .
发布版本
插件与核心一起发布,由 Publish Packages to npmjs GitHub 动作. 见 发布版本 在存储器 README 中。 通过撞击验证安装和版本 虚拟民主 之后的项目.
结束了