该回去
This commit is contained in:
parent
cd1a1f68ca
commit
e3dbce8b86
@ -170,14 +170,8 @@ watch(visible, (newVal) => {
|
|||||||
const getCategoryOptions = async () => {
|
const getCategoryOptions = async () => {
|
||||||
try {
|
try {
|
||||||
let categories;
|
let categories;
|
||||||
if (Type.value = '汇总') {
|
|
||||||
// 如果是汇总标签页,调用getCategory接口但不传递类型参数
|
|
||||||
categories = await TemplateApi.getAllCategories()
|
|
||||||
} else {
|
|
||||||
// 否则按模板类型获取相应的部位
|
|
||||||
categories = await TemplateApi.getCategory(Type.value)
|
categories = await TemplateApi.getCategory(Type.value)
|
||||||
}
|
console.log(categories)
|
||||||
|
|
||||||
categoryOptions.value = categories.map(category => ({
|
categoryOptions.value = categories.map(category => ({
|
||||||
label: category,
|
label: category,
|
||||||
value: category
|
value: category
|
||||||
|
Loading…
Reference in New Issue
Block a user