1 Star 0 Fork 0

HePing/plasmo-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
popup copy.bak 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
HePing 提交于 2024-09-26 11:33 . feat
<template>
<div>
<h2 class="text-center">
Welcome to your
<a href="https://www.plasmo.com" target="_blank">Plasmo</a> Extension!
</h2>
<div class="container">
<button @click="decrement">-</button>
<p>
<b>{{ state.count }}</b>
</p>
<button @click="increment">+</button>
</div>
</div>
<p v-if="state.action" class="action text-center">
{{ state.action }}
</p>
<a href="https://docs.plasmo.com" target="_blank"> View Docs </a>
</template>
<style>
.container {
min-width: 470px;
display: flex;
align-items: center;
justify-content: center;
gap: 47px;
}
.text-center {
text-align: center;
}
.action {
color: #470;
font-weight: bold;
}
</style>
<script setup lang="ts">
import { reactive } from "vue"
import type { App } from "vue"
const state = reactive({ count: 0, action: null })
function increment() {
state.count++
state.action = "increment"
}
function decrement() {
state.count--
state.action = "decrement"
}
defineOptions({
prepare(app: App) {
// Use any plugins here:
// app.use
}
})
</script>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hepingmogul/plasmo-vue.git
git@gitee.com:hepingmogul/plasmo-vue.git
hepingmogul
plasmo-vue
plasmo-vue
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385