config.vue
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
<CollapseItem name="播放器配置" :expanded="true">
<setting-item-box name="源地址" :alone="true">
<setting-item v-for="(item, index) in optionData.dataset" :key="index">
<n-input-group>
<n-input v-model:value="item.url" size="small" placeholder="请输入源地址"></n-input>
<n-button ghost @click="optionData.dataset.splice(index, 1)"> - </n-button>
</n-input-group>
</setting-item>
<setting-item>
<n-button v-if="optionData.dataset.length < 9" size="small" @click="optionData.dataset.push({ url: '' })">
+
</n-button>
</setting-item>
</setting-item-box>
<setting-item-box name="排布">
<setting-item>
<n-select v-model:value="optionData.displayMode" size="small" :options="displayModeOptions"></n-select>
</setting-item>
</setting-item-box>
</CollapseItem>
</template>
<script setup lang="ts">
import { PropType } from 'vue'
import { option } from './config'
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
defineProps({
optionData: {
type: Object as PropType<typeof option>,
required: true
}
})
// 旋转方式
const displayModeOptions = [
{
value: 'singleGrid',
label: '默认'
},
{
value: 'fourGrid',
label: '四宫格'
},
{
value: 'nineGrid',
label: '九宫格'
}
]
</script>