diff --git a/.prettierrc.json b/.prettierrc.json
index 79b8168..a5c69cf 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -1,5 +1,7 @@
{
"tabWidth": 2,
"semi": false,
- "singleQuote": true
+ "singleQuote": true,
+ "trailingComma": "none",
+ "printWidth": 80
}
\ No newline at end of file
diff --git a/src/components/DynamicForm.vue b/src/components/DynamicForm.vue
index 6f9c245..1e66eae 100644
--- a/src/components/DynamicForm.vue
+++ b/src/components/DynamicForm.vue
@@ -1,7 +1,10 @@
@@ -35,22 +93,17 @@ function getItems() {}
-
+
+
-
+ OnFileListChange(item.key, file)" :max="item.imageLimit" im>
上传图片
- 提交
+ 提交
diff --git a/src/components/SongList.vue b/src/components/SongList.vue
index 8359e45..9270618 100644
--- a/src/components/SongList.vue
+++ b/src/components/SongList.vue
@@ -50,7 +50,7 @@ const props = defineProps<{
songs: SongsInfo[]
canEdit?: boolean
isSelf: boolean
- extraButtom?: (song: SongsInfo) => VNodeChild[]
+ extraButton?: (song: SongsInfo) => VNodeChild[]
}>()
watch(
() => props.songs,
@@ -380,7 +380,7 @@ function createColumns(): DataTableColumns {
}),
]
: null,
- props.extraButtom?.(data),
+ props.extraButton?.(data),
],
)
},
diff --git a/src/data/TemplateTypes.ts b/src/data/TemplateTypes.ts
new file mode 100644
index 0000000..d0040be
--- /dev/null
+++ b/src/data/TemplateTypes.ts
@@ -0,0 +1,23 @@
+import {
+ ScheduleWeekInfo,
+ Setting_LiveRequest,
+ SongRequestInfo,
+ SongsInfo,
+ UserInfo
+} from '@/api/api-models'
+
+export interface SongListConfigType {
+ userInfo: UserInfo | undefined
+ biliInfo: any | undefined
+ songRequestSettings: Setting_LiveRequest
+ songRequestActive: SongRequestInfo[]
+ data: SongsInfo[] | undefined
+}
+export interface SongListConfigTypeWithConfig extends SongListConfigType {
+ config?: T
+}
+export interface ScheduleConfigType {
+ userInfo: UserInfo | undefined
+ biliInfo: any | undefined
+ data: ScheduleWeekInfo[] | undefined
+}
diff --git a/src/data/VTsuruTypes.ts b/src/data/VTsuruTypes.ts
index 8542106..94ed84c 100644
--- a/src/data/VTsuruTypes.ts
+++ b/src/data/VTsuruTypes.ts
@@ -23,10 +23,11 @@ type DataAccessor = {
}
// 扩展 CommonProps 以包含额外的共有属性
-export type TemplateConfigItemWithType = CommonProps & { data: DataAccessor }
+export type TemplateConfigItemWithType = CommonProps & { data?: DataAccessor }
export type TemplateConfigStringItem = TemplateConfigItemWithType & {
type: 'string'
+ key: string //将被保存到指定key中
}
export type TemplateConfigStringArrayItem = TemplateConfigItemWithType & {
type: 'stringArray'
@@ -42,8 +43,19 @@ export type TemplateConfigRenderItem = TemplateConfigBase & {
type: 'render'
render: (arg0: T) => VNode
}
+
+/**
+ *
+ * @template T - The type of the associated data model.
+ */
export type TemplateConfigImageItem = TemplateConfigBase & {
- type: 'image'
- imageLimit: number
- onUploaded: (arg0: string | string[], arg1: T) => void
+ type: 'image' // Specifies the type of configuration item as 'image'.
+ imageLimit: number // The maximum number of images allowed.
+ key: string //图片将被保存到指定key中, 类型为字符串数组
+ /**
+ * Callback function triggered upon image upload.
+ * @param {string[]} uploadedImages - The uploaded image or array of images.
+ * @param {T} config - The configuration data model.
+ */
+ onUploaded?: (uploadedImages: string[], config: T) => void
}
diff --git a/src/data/constants.ts b/src/data/constants.ts
index c224597..c66b25b 100644
--- a/src/data/constants.ts
+++ b/src/data/constants.ts
@@ -70,6 +70,10 @@ export const SongListTemplateMap = {
name: '简单',
compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/SimpleSongListTemplate.vue')),
},
+ traditional: {
+ name: '传统',
+ compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/TraditionalSongListTemplate.vue')),
+ },
} as { [key: string]: { name: string; compoent: any } }
export const IndexTemplateMap = {
'': { name: '默认', compoent: DefaultIndexTemplateVue },
diff --git a/src/views/IndexView.vue b/src/views/IndexView.vue
index 9abef25..61bbe7e 100644
--- a/src/views/IndexView.vue
+++ b/src/views/IndexView.vue
@@ -86,11 +86,6 @@ const functions = [
desc: '绑定账号后查看粉丝 舰长 观看数 等数据的历史记录',
icon: AnalyticsSharp,
},
- {
- name: '绝不收米!',
- desc: '为爱发电, 所有功能都免费并提供技术支持 (当然你想赞助的话也可以捏',
- icon: MoneyOff24Filled,
- },
{
name: '还有更多',
desc: '更多功能仍在开发中. 有其他合理需求或者建议, 或者有想要添加的样式? 向我提出!',
diff --git a/src/views/manage/SettingsManageView.vue b/src/views/manage/SettingsManageView.vue
index aa59704..39c75f9 100644
--- a/src/views/manage/SettingsManageView.vue
+++ b/src/views/manage/SettingsManageView.vue
@@ -55,7 +55,7 @@ import {
SelectOption,
useMessage,
} from 'naive-ui'
-import { computed, h, nextTick, onActivated, onMounted, ref } from 'vue'
+import { computed, h, nextTick, onActivated, onMounted, ref, watch } from 'vue'
import { useRoute } from 'vue-router'
interface TemplateDefineTypes {
@@ -247,7 +247,6 @@ const selectedTemplateConfig = computed(() => {
}
return undefined
})
-
const biliUserInfo = ref()
const settingModalVisiable = ref(false)
const showAddVideoModal = ref(false)
@@ -547,19 +546,15 @@ onMounted(async () => {
收到新提问时发送邮件
-
+
提问收到回复时发送邮件
提问箱
-
+
允许未注册用户提问
@@ -649,28 +644,22 @@ onMounted(async () => {
- 页面
+ 页面
+
模板
@@ -679,29 +668,13 @@ onMounted(async () => {
-
+
只是测试, 没用
-
+
-
+
添加视频
diff --git a/src/views/pointViews/PointGoodsView.vue b/src/views/pointViews/PointGoodsView.vue
index f4d453d..6ca6934 100644
--- a/src/views/pointViews/PointGoodsView.vue
+++ b/src/views/pointViews/PointGoodsView.vue
@@ -2,35 +2,36 @@
import { NavigateToNewTab } from '@/Utils'
import { useAccount } from '@/api/account'
import {
-AddressInfo,
-GoodsTypes,
-ResponsePointGoodModel,
-ResponsePointOrder2UserModel,
-UserInfo,
+ AddressInfo,
+ GoodsTypes,
+ ResponsePointGoodModel,
+ ResponsePointOrder2UserModel,
+ UserInfo,
} from '@/api/api-models'
import AddressDisplay from '@/components/manage/AddressDisplay.vue'
import PointGoodsItem from '@/components/manage/PointGoodsItem.vue'
import { POINT_API_URL } from '@/data/constants'
import { useAuthStore } from '@/store/useAuthStore'
import {
-NAlert,
-NButton,
-NCard,
-NDivider,
-NEmpty,
-NFlex,
-NForm,
-NFormItem,
-NInputNumber,
-NModal,
-NSelect,
-NSpin,
-NTag,
-NText,
-NTooltip,
-SelectOption,
-useDialog,
-useMessage
+ NAlert,
+ NButton,
+ NCard,
+ NCheckbox,
+ NDivider,
+ NEmpty,
+ NFlex,
+ NForm,
+ NFormItem,
+ NInputNumber,
+ NModal,
+ NSelect,
+ NSpin,
+ NTag,
+ NText,
+ NTooltip,
+ SelectOption,
+ useDialog,
+ useMessage
} from 'naive-ui'
import { computed, h, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
@@ -65,11 +66,12 @@ const tags = computed(() => {
})
const selectedTag = ref()
const selectedItems = computed(() => {
- return selectedTag.value
- ? goods.value.filter((g) => g.tags.includes(selectedTag.value))
- : goods.value
+ return goods.value.filter((item) => selectedTag.value ? item.tags.includes(selectedTag.value) : true).filter((item) => !onlyCanBuy.value || getTooltip(item) == '开始兑换').filter((item) => !ignoreGuard.value || item.allowGuardLevel == 0)
})
+const onlyCanBuy = ref(false)
+const ignoreGuard = ref(false)
+
const addressOptions = computed(() => {
if (!biliAuth.value.id) return []
return (
@@ -86,7 +88,7 @@ const canBuy = computed(() => {
if (!biliAuth.value.id) return false
return true
})
-function getTooltip(goods: ResponsePointGoodModel) {
+function getTooltip(goods: ResponsePointGoodModel): '开始兑换' | '当前积分不足' | '请先进行账号认证' | '库存不足' {
if ((currentPoint.value ?? 0) < goods.price) {
return '当前积分不足'
} else if (!biliAuth.value.id) return '请先进行账号认证'
@@ -215,34 +217,29 @@ onMounted(async () => {
你在 {{ userInfo.extra?.streamerInfo?.name ?? userInfo.name }} 的直播间的积分为 {{ currentPoint }}
-
+
-
- {{ tag }}
-
+
+ {{ tag }}
+
+
+ 只显示可兑换的礼物
+ 忽略需要舰长的礼物
暂无礼物
-
+
- 兑换
+ 兑换
+
{{ getTooltip(item) }}
@@ -262,13 +259,8 @@ onMounted(async () => {
-
+
@@ -281,32 +273,16 @@ onMounted(async () => {
选项
-
+
+
-
-
+
+
管理收货地址
diff --git a/src/views/view/SongListView.vue b/src/views/view/SongListView.vue
index a8f6e7c..f74dcdb 100644
--- a/src/views/view/SongListView.vue
+++ b/src/views/view/SongListView.vue
@@ -1,25 +1,19 @@
-
+
-
+
diff --git a/src/views/view/scheduleTemplate/PinkySchedule.vue b/src/views/view/scheduleTemplate/PinkySchedule.vue
index 94eb6df..67fc4c3 100644
--- a/src/views/view/scheduleTemplate/PinkySchedule.vue
+++ b/src/views/view/scheduleTemplate/PinkySchedule.vue
@@ -1,6 +1,6 @@
@@ -151,7 +146,7 @@ function loadMore() {
/>
-
+
- 加载更多
+ 加载更多
diff --git a/src/views/view/songListTemplate/TraditionalSongListTemplate.vue b/src/views/view/songListTemplate/TraditionalSongListTemplate.vue
new file mode 100644
index 0000000..e25560e
--- /dev/null
+++ b/src/views/view/songListTemplate/TraditionalSongListTemplate.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
\ No newline at end of file