Migrate code to composition api.

This commit is contained in:
Kavin
2026-03-27 00:41:48 +05:30
parent 2448b8aa1d
commit fa5bbbd267
50 changed files with 4506 additions and 4418 deletions

View File

@@ -8,28 +8,23 @@
</ModalComponent>
</template>
<script>
<script setup>
import ModalComponent from "./ModalComponent.vue";
import { ref } from "vue";
export default {
components: { ModalComponent },
props: {
onCreateGroup: {
required: true,
type: Function,
},
const props = defineProps({
onCreateGroup: {
required: true,
type: Function,
},
emits: ["close"],
data() {
return {
groupName: "",
};
},
methods: {
createGroup() {
this.onCreateGroup(this.groupName);
this.$emit("close");
},
},
};
});
const emit = defineEmits(["close"]);
const groupName = ref("");
function createGroup() {
props.onCreateGroup(groupName.value);
emit("close");
}
</script>