fix: change the edit button
This commit is contained in:
@@ -159,9 +159,11 @@ watch(mode, async (newMode) => {
|
|||||||
<button
|
<button
|
||||||
class="action button is-text is-light"
|
class="action button is-text is-light"
|
||||||
:class="{ 'is-link': mode === 'edit' }"
|
:class="{ 'is-link': mode === 'edit' }"
|
||||||
|
:style="mode === 'edit' ? 'color: var(--color-primary)' : ''"
|
||||||
@click="toggleMode"
|
@click="toggleMode"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
v-if="mode === 'read'"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
class="icon icon-tabler icon-tabler-edit"
|
class="icon icon-tabler icon-tabler-edit"
|
||||||
width="24"
|
width="24"
|
||||||
@@ -182,37 +184,27 @@ watch(mode, async (newMode) => {
|
|||||||
/>
|
/>
|
||||||
<path d="M16 5l3 3" />
|
<path d="M16 5l3 3" />
|
||||||
</svg>
|
</svg>
|
||||||
|
<svg
|
||||||
|
v-else
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="icon icon-tabler icon-tabler-device-floppy"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke="currentColor"
|
||||||
|
fill="none"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2" />
|
||||||
|
<path d="M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||||
|
<path d="M14 4l0 4l-6 0l0 -4" />
|
||||||
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div v-if="mode === 'edit'" class="edit">
|
<div v-if="mode === 'edit'" class="edit">
|
||||||
<edit-note v-model="rawContent" />
|
<edit-note v-model="rawContent" />
|
||||||
|
|
||||||
<button
|
|
||||||
class="action button is-text is-light"
|
|
||||||
:class="{ 'is-link': mode === 'edit' }"
|
|
||||||
@click="toggleMode"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
class="icon icon-tabler icon-tabler-edit"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke-width="1.5"
|
|
||||||
stroke="currentColor"
|
|
||||||
fill="none"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
||||||
<path
|
|
||||||
d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z"
|
|
||||||
/>
|
|
||||||
<path d="M16 5l3 3" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="mode === 'read'" class="note-content" v-html="content"></div>
|
<div v-if="mode === 'read'" class="note-content" v-html="content"></div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user