mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 05:34:53 +08:00
809aaa8aa3
- Created new checklist component. - updated the functionality of the select-search component. - Name field. - Text fields. - Numeric fields. - List fields. - Status fields. - Checklist fields.
39 lines
903 B
Vue
39 lines
903 B
Vue
<template>
|
|
<inline-edit
|
|
v-if="editable"
|
|
class="item-name my-auto text-xl font-semibold"
|
|
:value="name"
|
|
:characterLimit="255"
|
|
:characterMinLimit="0"
|
|
:allowBlank="false"
|
|
:smartAnnotation="false"
|
|
:attributeName="`${i18n.t('Repository_row')} ${i18n.t('Name')} `"
|
|
:singleLine="true"
|
|
@editingEnabled="editingName = true"
|
|
@editingDisabled="editingName = false"
|
|
@update="updateName"
|
|
></inline-edit>
|
|
<h4 v-else class="item-name my-auto truncate text-xl" :title="name">
|
|
{{ name }}
|
|
</h4>
|
|
</template>
|
|
|
|
<script>
|
|
import InlineEdit from "../shared/inline_edit.vue";
|
|
|
|
export default {
|
|
name: "RepositoryItemSidebarTitle",
|
|
components: {
|
|
"inline-edit": InlineEdit
|
|
},
|
|
props: {
|
|
editable: Boolean,
|
|
name: String,
|
|
},
|
|
methods: {
|
|
updateName(name) {
|
|
this.$emit('update', { 'repository_row': { name: name } });
|
|
},
|
|
},
|
|
};
|
|
</script>
|