Conversation
--bug=1052403 --user=刘瑞斌 【函数库】-创建函数失败 https://www.tapd.cn/57709429/s/1658691 --bug=1052404 --user=刘瑞斌 【函数库】新建函数,无法添加参数 https://www.tapd.cn/57709429/s/1658693
shaohuzhang1
commented
Feb 25, 2025
| <div class="card-add-button flex align-center cursor p-8" @click="openCreateDialog()"> | ||
| <AppIcon iconName="app-add-application" class="mr-8"></AppIcon> | ||
| {{ $t('views.functionLib.createFunction') }} | ||
| </div> |
Contributor
Author
There was a problem hiding this comment.
Your code appears to be mostly correct with no significant issues. Here's a few minor improvements you might want to consider:
-
Parentheses: It’s generally better practice to add parentheses after function calls in Vue.js, even if they are empty parentheses
(). This improves readability and prevents accidental misinterpretation. -
Spacing: Ensure consistent spacing around the colon (
:) and equals sign (=) for cleaner syntax.
Here is the revised version of your code snippet with these changes applied:
<template>
<el-row :gutter="15">
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" class="mb-16">
<el-card shadow="hover" class="application-card-add" style="--el-card-padding: 8px">
<div class="card-add-button flex align-center cursor p-8" @click="openCreateDialog()">
<AppIcon iconName="app-add-application" class="mr-8"></AppIcon>
{{ $t('views.functionLib.createFunction') }}
</div>
</el-card>
</el-col>
</el-row>
</template>
<script>
export default {
methods: {
openCreateDialog() {
// Implementation details here
}
}
}
</script>
<style scoped>
/* Add styles as needed */
</style>In summary, ensure that parenthetical notation (() when calling functions) and proper spacing are used consistently throughout your template, which maintains clean and readable code quality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: Fix add function lib error --bug=1052403 --user=刘瑞斌 【函数库】-创建函数失败 https://www.tapd.cn/57709429/s/1658691 --bug=1052404 --user=刘瑞斌 【函数库】新建函数,无法添加参数 https://www.tapd.cn/57709429/s/1658693