| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <view :class="classes" @click="handleClick">
- <view>{{ name }}</view>
- <view>{{ txt }}</view>
- </view>
- </template>
- <script lang="ts">
- import { toRefs } from 'vue';
- import { createComponent } from '@/utils/create';
- const { componentName, create } = createComponent('infiniteloading');
- export default create({
- props: {
- name: {
- type: String,
- default: ''
- },
- txt: {
- type: String,
- default: ''
- }
- },
- components: {},
- emits: ['click'],
- setup(props, { emit }) {
- console.log('componentName', componentName);
- const { name, txt } = toRefs(props);
- const handleClick = (event: Event) => {
- emit('click', event);
- };
- return { name, txt, handleClick };
- }
- });
- </script>
- <style lang="scss">
- @import 'index.scss';
- </style>
|