
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
@52css/weapp-vue3
Advanced tools
创建微信小程序支持hooks(vue3版本)
# npm
npm install @52css/weapp-vue3 --save
# yarn
yarn add @52css/weapp-vue3
# pnpm
pnpm install @52css/weapp-vue3 --save

import { Page } from '@52css/weapp-vue3'
Page(() => {
// 里面使用hooks方法
})
import { Component } from '@52css/weapp-vue3'
// 方式一,直接是hooks方法
Component(() => {
// 里面使用hooks方法
})
// 方式二,传递options
Component({
props: {
type: String
},
setup(props, ctx) {
// 这里是hooks方法
}
})
js
import { Page } from '@52css/weapp-vue3'
Page(() => {
const text = 'hello weapp vue3'
const handleClick = () => {
console.log('text', text)
}
// 所有定义必须返回
return { text, handleClick }
})
wxml
<view bind:tap="handleClick">
text:{{text}}
</view>
效果

js
import { Page, ref } from '@52css/weapp-vue3'
Page(() => {
const count = ref(0)
const handleClick = () => {
count.value ++
}
// 所有定义必须返回
return { count, handleClick }
})
wxml
<view bind:tap="handleClick">
count: {{count}}
</view>
效果

js
import { Page, reactive, toRefs } from '@52css/weapp-vue3'
Page(() => {
const state = reactive({loading: false})
const handleClick = () => {
state.loading = !state.loading
}
// 所有定义必须返回
return { ...toRefs(state), handleClick }
})
wxml
<view bind:tap="handleClick">
loading:{{loading}}
</view>
效果

js
import { Page, ref, computed } from '@52css/weapp-vue3'
Page(() => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
const handleClick = () => {
count.value ++
}
// 所有定义必须返回
return { count, doubleCount, handleClick }
})
wxml
<view bind:tap="handleClick">
<view>count: {{count}}</view>
<view>doubleCount: {{doubleCount}}</view>
</view>
效果

js
import { Page, ref, watch } from '@52css/weapp-vue3'
Page(() => {
const count = ref(0)
const handleClick = () => {
count.value ++
}
watch(count, (newVal, oldVal) => {
console.log('newVal', newVal, 'oldVal', oldVal)
})
// 所有定义必须返回
return { count, handleClick }
})
xml
<view bind:tap="handleClick">
count: {{count}}
</view>
效果

FAQs
创建微信小程序支持hooks(vue3版本)
The npm package @52css/weapp-vue3 receives a total of 0 weekly downloads. As such, @52css/weapp-vue3 popularity was classified as not popular.
We found that @52css/weapp-vue3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.