feat: add copy demo
This commit is contained in:
parent
9a7aa81234
commit
7e232483f2
29
src/pages/demo/base/copy.vue
Normal file
29
src/pages/demo/base/copy.vue
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<route lang="json5" type="page">
|
||||||
|
{
|
||||||
|
style: { navigationBarTitleText: '复制' },
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<button @click="onCopy">复制</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
const onCopy = () => {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: '菲鸽,你最棒',
|
||||||
|
fail: (fail) => {
|
||||||
|
console.error('fail', fail)
|
||||||
|
},
|
||||||
|
success: (success) => {
|
||||||
|
console.log('success', success)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
//
|
||||||
|
</style>
|
@ -30,7 +30,7 @@ import { visualizer } from 'rollup-plugin-visualizer'
|
|||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default ({ command, mode }) => {
|
export default ({ command, mode }) => {
|
||||||
console.log(mode === process.env.NODE_ENV)
|
// console.log(mode === process.env.NODE_ENV) // true
|
||||||
|
|
||||||
// mode: 区分生产环境还是开发环境
|
// mode: 区分生产环境还是开发环境
|
||||||
console.log(command, mode)
|
console.log(command, mode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user