mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +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('');
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,10 @@
|
|||||||
<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
|
||||||
|
class="relative flex items-center justify-end bg-white focus-within:bg-gray-200"
|
||||||
|
:class="inputClasses"
|
||||||
|
>
|
||||||
<select
|
<select
|
||||||
class="appearance-none bg-transparent focus:outline-none w-full"
|
class="appearance-none bg-transparent focus:outline-none w-full"
|
||||||
:class="isReadOnly && 'pointer-events-none'"
|
:class="isReadOnly && 'pointer-events-none'"
|
||||||
@ -11,12 +14,25 @@
|
|||||||
@change="e => triggerChange(e.target.value)"
|
@change="e => triggerChange(e.target.value)"
|
||||||
@focus="e => $emit('focus', e)"
|
@focus="e => $emit('focus', e)"
|
||||||
>
|
>
|
||||||
<option v-for="option in options" :value="option.value">{{ option.label }}</option>
|
<option
|
||||||
|
v-for="option in options"
|
||||||
|
:key="option.value"
|
||||||
|
:value="option.value"
|
||||||
|
>
|
||||||
|
{{ option.label }}
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="absolute left-0 pl-2 text-gray-600 pointer-events-none" v-if="!value">
|
<div
|
||||||
|
class="absolute left-0 pl-2 text-gray-600 pointer-events-none"
|
||||||
|
v-if="!value"
|
||||||
|
>
|
||||||
{{ inputPlaceholder }}
|
{{ inputPlaceholder }}
|
||||||
</div>
|
</div>
|
||||||
<svg class="w-3 h-3 absolute" viewBox="0 0 5 10" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
class="w-3 h-3 absolute"
|
||||||
|
viewBox="0 0 5 10"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M1 2.636L2.636 1l1.637 1.636M1 7.364L2.636 9l1.637-1.636"
|
d="M1 2.636L2.636 1l1.637 1.636M1 7.364L2.636 9l1.637-1.636"
|
||||||
stroke="#404040"
|
stroke="#404040"
|
||||||
|
@ -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)"
|
||||||
|
@ -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