mirror of
https://github.com/frappe/books.git
synced 2024-12-23 19:39:07 +00:00
style: Format with prettier
This commit is contained in:
parent
a779c91679
commit
2d2f5eb57e
@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="rounded-full overflow-hidden" :class="sizeClasses">
|
<div class="rounded-full overflow-hidden" :class="sizeClasses">
|
||||||
<img v-if="imageURL" :src="imageURL" class="object-cover" :class="sizeClasses" />
|
<img
|
||||||
|
v-if="imageURL"
|
||||||
|
:src="imageURL"
|
||||||
|
class="object-cover"
|
||||||
|
:class="sizeClasses"
|
||||||
|
/>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
class="bg-gray-500 flex h-full items-center justify-center text-white w-full text-base uppercase"
|
class="bg-gray-500 flex h-full items-center justify-center text-white w-full text-base uppercase"
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="inline-block rounded-md px-2 py-1 truncate" :class="getColorClass">
|
<div
|
||||||
|
class="inline-block rounded-md px-2 py-1 truncate"
|
||||||
|
:class="getColorClass"
|
||||||
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -20,7 +23,7 @@ export default {
|
|||||||
yellow: 'bg-yellow-100 text-yellow-600',
|
yellow: 'bg-yellow-100 text-yellow-600',
|
||||||
orange: 'bg-orange-100 text-orange-600',
|
orange: 'bg-orange-100 text-orange-600',
|
||||||
blue: 'bg-blue-100 text-blue-600',
|
blue: 'bg-blue-100 text-blue-600',
|
||||||
green: 'bg-green-100 text-green-600',
|
green: 'bg-green-100 text-green-600'
|
||||||
}[this.color];
|
}[this.color];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,8 @@ export default {
|
|||||||
props: ['target'],
|
props: ['target'],
|
||||||
extends: Link,
|
extends: Link,
|
||||||
created() {
|
created() {
|
||||||
this.targetWatcher = this.$watch(`doc.${this.df.references}`, function(newTarget, oldTarget) {
|
let watchKey = `doc.${this.df.references}`;
|
||||||
|
this.targetWatcher = this.$watch(watchKey, function(newTarget, oldTarget) {
|
||||||
if (oldTarget && newTarget !== oldTarget) {
|
if (oldTarget && newTarget !== oldTarget) {
|
||||||
this.triggerChange('');
|
this.triggerChange('');
|
||||||
}
|
}
|
||||||
|
@ -1,33 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="text-gray-600 text-sm mb-1" v-if="showLabel">
|
<div class="text-gray-600 text-sm mb-1" v-if="showLabel">
|
||||||
{{ df.label }}
|
{{ df.label }}
|
||||||
</div>
|
</div>
|
||||||
<div class="relative flex items-center justify-end bg-white focus-within:bg-gray-200" :class="inputClasses">
|
<div
|
||||||
<select
|
class="relative flex items-center justify-end bg-white focus-within:bg-gray-200"
|
||||||
class="appearance-none bg-transparent focus:outline-none w-full"
|
:class="inputClasses"
|
||||||
:class="isReadOnly && 'pointer-events-none'"
|
>
|
||||||
:value="value"
|
<select
|
||||||
@change="e => triggerChange(e.target.value)"
|
class="appearance-none bg-transparent focus:outline-none w-full"
|
||||||
@focus="e => $emit('focus', e)"
|
:class="isReadOnly && 'pointer-events-none'"
|
||||||
>
|
:value="value"
|
||||||
<option v-for="option in options" :value="option.value">{{ option.label }}</option>
|
@change="e => triggerChange(e.target.value)"
|
||||||
</select>
|
@focus="e => $emit('focus', e)"
|
||||||
<div class="absolute left-0 pl-2 text-gray-600 pointer-events-none" v-if="!value">
|
>
|
||||||
{{ inputPlaceholder }}
|
<option
|
||||||
|
v-for="option in options"
|
||||||
|
:key="option.value"
|
||||||
|
:value="option.value"
|
||||||
|
>
|
||||||
|
{{ option.label }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<div
|
||||||
|
class="absolute left-0 pl-2 text-gray-600 pointer-events-none"
|
||||||
|
v-if="!value"
|
||||||
|
>
|
||||||
|
{{ inputPlaceholder }}
|
||||||
|
</div>
|
||||||
|
<svg
|
||||||
|
class="w-3 h-3 absolute"
|
||||||
|
viewBox="0 0 5 10"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M1 2.636L2.636 1l1.637 1.636M1 7.364L2.636 9l1.637-1.636"
|
||||||
|
stroke="#404040"
|
||||||
|
fill="none"
|
||||||
|
fill-rule="evenodd"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<svg class="w-3 h-3 absolute" viewBox="0 0 5 10" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path
|
|
||||||
d="M1 2.636L2.636 1l1.637 1.636M1 7.364L2.636 9l1.637-1.636"
|
|
||||||
stroke="#404040"
|
|
||||||
fill="none"
|
|
||||||
fill-rule="evenodd"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Row
|
<Row :ratio="ratio" class="border-b px-2 w-full">
|
||||||
:ratio="ratio"
|
|
||||||
class="border-b px-2 w-full"
|
|
||||||
>
|
|
||||||
<div class="flex items-center pl-2 text-gray-600">{{ row.idx + 1 }}</div>
|
<div class="flex items-center pl-2 text-gray-600">{{ row.idx + 1 }}</div>
|
||||||
<FormControl
|
<FormControl
|
||||||
:size="size"
|
:size="size"
|
||||||
@ -35,7 +32,7 @@ export default {
|
|||||||
doctype: this.row.doctype,
|
doctype: this.row.doctype,
|
||||||
name: this.row.name,
|
name: this.row.name,
|
||||||
doc: this.row
|
doc: this.row
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<g
|
<g
|
||||||
fill="none"
|
fill="none"
|
||||||
fill-rule="evenodd"
|
fill-rule="evenodd"
|
||||||
|
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
transform="translate(0 1)"
|
transform="translate(0 1)"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 12">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 12">
|
||||||
<g fill="none" fill-rule="evenodd" transform="translate(.5 -1.5)">
|
<g fill="none" fill-rule="evenodd" transform="translate(.5 -1.5)">
|
||||||
<path
|
<path
|
||||||
d="M.5 5.5L.5 10.4361148C.5 11.1734491.553979991 11.4529804.708039303 11.7410463.835746496 11.979838 1.02016204 12.1642535 1.25895373 12.2919607 1.54701959 12.44602 1.82655093 12.5 2.5638852 12.5L10.4361148 12.5C11.1734491 12.5 11.4529804 12.44602 11.7410463 12.2919607 11.979838 12.1642535 12.1642535 11.979838 12.2919607 11.7410463 12.44602 11.4529804 12.5 11.1734491 12.5 10.4361148L12.5 5.5.5 5.5zM.5 5.5L12.5 5.5 12.5 4.5638852C12.5 3.82655093 12.44602 3.54701959 12.2919607 3.25895373 12.1642535 3.02016204 11.979838 2.8357465 11.7410463 2.7080393 11.4529804 2.55397999 11.1734491 2.5 10.4361148 2.5L2.5638852 2.5C1.82655093 2.5 1.54701959 2.55397999 1.25895373 2.7080393 1.02016204 2.8357465.835746496 3.02016204.708039303 3.25895373.553979991 3.54701959.5 3.82655093.5 4.5638852L.5 5.5z"
|
d="M.5 5.5L.5 10.4361148C.5 11.1734491.553979991 11.4529804.708039303 11.7410463.835746496 11.979838 1.02016204 12.1642535 1.25895373 12.2919607 1.54701959 12.44602 1.82655093 12.5 2.5638852 12.5L10.4361148 12.5C11.1734491 12.5 11.4529804 12.44602 11.7410463 12.2919607 11.979838 12.1642535 12.1642535 11.979838 12.2919607 11.7410463 12.44602 11.4529804 12.5 11.1734491 12.5 10.4361148L12.5 5.5.5 5.5zM.5 5.5L12.5 5.5 12.5 4.5638852C12.5 3.82655093 12.44602 3.54701959 12.2919607 3.25895373 12.1642535 3.02016204 11.979838 2.8357465 11.7410463 2.7080393 11.4529804 2.55397999 11.1734491 2.5 10.4361148 2.5L2.5638852 2.5C1.82655093 2.5 1.54701959 2.55397999 1.25895373 2.7080393 1.02016204 2.8357465.835746496 3.02016204.708039303 3.25895373.553979991 3.54701959.5 3.82655093.5 4.5638852L.5 5.5z"
|
||||||
/>
|
/>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
|
||||||
<circle cx="8" cy="8" r="3.5" fill="none" transform="translate(-4 -4)" />
|
<circle cx="8" cy="8" r="3.5" fill="none" transform="translate(-4 -4)" />
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 4">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 4">
|
||||||
<polyline
|
<polyline
|
||||||
fill="none"
|
fill="none"
|
||||||
|
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
points="4 6 8 10 12 6"
|
points="4 6 8 10 12 6"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 9">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 9">
|
||||||
<polyline
|
<polyline
|
||||||
fill="none"
|
fill="none"
|
||||||
|
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
stroke-width="1.5"
|
stroke-width="1.5"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 15">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 15">
|
||||||
<path
|
<path
|
||||||
fill="none"
|
fill="none"
|
||||||
|
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
d="M7,13 C10.3137085,13 13,10.3137085 13,7 C13,3.6862915 10.3137085,1 7,1 C3.6862915,1 1,3.6862915 1,7 C1,10.3137085 3.6862915,13 7,13 Z M15,15 L11.242,11.242"
|
d="M7,13 C10.3137085,13 13,10.3137085 13,7 C13,3.6862915 10.3137085,1 7,1 C3.6862915,1 1,3.6862915 1,7 C1,10.3137085 3.6862915,13 7,13 Z M15,15 L11.242,11.242"
|
||||||
|
@ -29,6 +29,7 @@ export default {
|
|||||||
style() {
|
style() {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
if (this.columnCount) {
|
if (this.columnCount) {
|
||||||
|
// prettier-ignore
|
||||||
obj['grid-template-columns'] = `repeat(${this.columnCount}, ${this.columnWidth})`;
|
obj['grid-template-columns'] = `repeat(${this.columnCount}, ${this.columnWidth})`;
|
||||||
}
|
}
|
||||||
if (this.ratio.length) {
|
if (this.ratio.length) {
|
||||||
|
@ -1,36 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- <div class="bg-blue-500 px-6 py-5 rounded-lg flex justify-between items-center">
|
|
||||||
<div class="flex items-center">
|
|
||||||
<div class="bg-white rounded-full w-16 h-16 flex-center">
|
|
||||||
<svg class="w-6 h-6" viewBox="0 0 24 21" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path
|
|
||||||
d="M21 3h-4l-2-3H9L7 3H3a3 3 0 00-3 3v12a3 3 0 003 3h18a3 3 0 003-3V6a3 3 0 00-3-3zm-9 14a5 5 0 110-10 5 5 0 010 10z"
|
|
||||||
fill="#B7BFC6"
|
|
||||||
fill-rule="nonzero"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
<div class="flex flex-col text-white ml-4">
|
|
||||||
<span class="text-lg font-semibold">Company Name</span>
|
|
||||||
<span class="text-sm">Email</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Button class="text-xs">Edit</Button>
|
|
||||||
</div> -->
|
|
||||||
<TwoColumnForm v-if="doc" :doc="doc" :fields="fields" :autosave="true" />
|
<TwoColumnForm v-if="doc" :doc="doc" :fields="fields" :autosave="true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import frappe from 'frappejs';
|
import frappe from 'frappejs';
|
||||||
import Button from '@/components/Button';
|
|
||||||
import TwoColumnForm from '@/components/TwoColumnForm';
|
import TwoColumnForm from '@/components/TwoColumnForm';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TabGeneral',
|
name: 'TabGeneral',
|
||||||
components: {
|
components: {
|
||||||
Button,
|
|
||||||
TwoColumnForm
|
TwoColumnForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -58,4 +38,3 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user