glodrapay-cashier
v1.0.1
Published
```typescript <template> <Cashier :config="config" @success="handleSuccess" @error="handleError" /> </template> <script> import Cashier from 'glodrapay-cashier' import 'glodrapay-cashier/dist/glodrapay-cashier.css'
Readme
GlodraPay 收银台
使用示例
<template>
<Cashier
:config="config"
@success="handleSuccess"
@error="handleError"
/>
</template>
<script>
import Cashier from 'glodrapay-cashier'
import 'glodrapay-cashier/dist/glodrapay-cashier.css'
const config = {
amount: 2999,
orderId: 'ORDER_' + Date.now(),
description: 'VIP会员服务',
theme: {
primaryColor: '#9254de',
backgroundColor: '#1f1f1f',
borderRadius: '8',
fontSize: '14'
}
}
const handleSuccess = (data: any) => {
console.log('支付成功:', data)
}
const handleError = (error: string) => {
console.error('支付失败:', error)
}
</script>