1405/02/09-dev configuration
This commit is contained in:
@@ -12,21 +12,20 @@
|
||||
size="24"
|
||||
/>
|
||||
</div>
|
||||
<BasicTextArea v-model:value="content" />
|
||||
|
||||
<!-- <QuillEditor-->
|
||||
<!-- placeholder="متن قانون"-->
|
||||
<!-- v-model:content="content"-->
|
||||
<!-- toolbar="full"-->
|
||||
<!-- theme="snow"-->
|
||||
<!-- content-type="html"-->
|
||||
<!-- class="editor-box"-->
|
||||
<!-- />-->
|
||||
<QuillEditor
|
||||
placeholder="متن قانون"
|
||||
v-model:content="content"
|
||||
toolbar="full"
|
||||
theme="snow"
|
||||
content-type="html"
|
||||
class="editor-box"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {loading} from '@/utils'
|
||||
// import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
import {QuillEditor} from '@vueup/vue-quill'
|
||||
import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
import {getConfiguration, setConfiguration} from '@/api/configuration'
|
||||
import {message} from 'ant-design-vue'
|
||||
import type { TagItem } from '@/components/BasicTags/model'
|
||||
@@ -45,7 +44,11 @@ async function ok() {
|
||||
id: props.item.id,
|
||||
key: props.item.key,
|
||||
value: content.value,
|
||||
description: props.item.description
|
||||
title_fa:props.item.name,
|
||||
type:props.item.type,
|
||||
description: props.item.description,
|
||||
is_active: props.item.is_active
|
||||
|
||||
}
|
||||
try {
|
||||
loading.value = true
|
||||
|
||||
@@ -7,24 +7,24 @@
|
||||
|
||||
<div class="flex">
|
||||
<a-switch
|
||||
checked-children="فعال"
|
||||
un-checked-children="غیرفعال"
|
||||
v-model:checked="value"
|
||||
@change="ok"
|
||||
checked-children="فعال"
|
||||
un-checked-children="غیرفعال"
|
||||
v-model:checked="value"
|
||||
@change="ok"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Order } from '@/model/order'
|
||||
import { loading } from '@/utils'
|
||||
import { setConfiguration } from '@/api/configuration'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { onMounted } from 'vue'
|
||||
import {loading} from '@/utils'
|
||||
import {setConfiguration} from '@/api/configuration'
|
||||
import {message} from 'ant-design-vue'
|
||||
import {onMounted} from 'vue'
|
||||
import type {TagItem} from "@/components/BasicTags/model";
|
||||
|
||||
interface Prop {
|
||||
item: Order
|
||||
item: TagItem
|
||||
}
|
||||
|
||||
const props = defineProps<Prop>()
|
||||
@@ -34,8 +34,11 @@ async function ok() {
|
||||
let obj = {
|
||||
id: props.item.id,
|
||||
key: props.item.key,
|
||||
value: value.value,
|
||||
description: props.item.description
|
||||
value: `${value.value}`,
|
||||
type:props.item.type,
|
||||
title_fa:props.item.name,
|
||||
description: props.item.description,
|
||||
is_active: props.item.is_active,
|
||||
}
|
||||
try {
|
||||
loading.value = true
|
||||
@@ -48,5 +51,7 @@ async function ok() {
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => (value.value = props.item.value === 'true'))
|
||||
onMounted(() => {
|
||||
value.value = props.item.value === 'true'
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -57,7 +57,10 @@ async function ok() {
|
||||
id: props.item.id,
|
||||
key: props.item.key,
|
||||
value: value.value,
|
||||
description: props.item.description
|
||||
title_fa:props.item.name,
|
||||
type:props.item.type,
|
||||
description: props.item.description,
|
||||
is_active: props.item.is_active
|
||||
}
|
||||
try {
|
||||
loading.value = true
|
||||
|
||||
@@ -82,6 +82,7 @@ import TextConfigs from '@/pages/menuPages/configuration/components/TextConfigs.
|
||||
import LongtextConfigs from '@/pages/menuPages/configuration/components/LongtextConfigs.vue'
|
||||
import { loading } from '@/utils'
|
||||
import { getConfiguration, setConfiguration } from '@/api/configuration'
|
||||
import SwitchConfigs from "@/pages/menuPages/configuration/components/SwitchConfigs.vue";
|
||||
|
||||
//data Arrays
|
||||
const items = ref<Array<any>>()
|
||||
@@ -287,6 +288,7 @@ const groupedItems = computed(() => {
|
||||
const type = item.type && result[item.type] ? item.type : 'text'
|
||||
result[type].push(item)
|
||||
})
|
||||
console.log(result)
|
||||
return result
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user