cbma_expert/ce_app/pages/library/deepClone/index.vue

38 lines
600 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="u-demo">
<view class="u-demo-wrap">
<view class="u-demo-title">演示效果</view>
<view class="u-demo-area">
<view class="u-no-demo-here">
源对象为"{info: {name: 'mary'}}"
</view>
<view class="u-demo-result-line">
{{result}}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
obj: {
info: {
name: 'mary'
}
},
result: ''
}
},
onLoad() {
this.result = this.$u.deepClone(this.obj);
}
}
</script>
<style lang="scss" scoped>
.u-demo {}
</style>