Commit 1e5ebe7a authored by zhengke's avatar zhengke

可创建排序

parent 489298c1
......@@ -99,7 +99,7 @@
<LinkDialog @close="linkDialogVisible = false" />
</Modal>
</div>
<SourceCard scroll-id="canvas-view-wrap"></SourceCard>
<SourceCard v-if="model!=1" scroll-id="canvas-view-wrap"></SourceCard>
</template>
<script lang="ts" setup>
......
......@@ -6,6 +6,7 @@
<el-table
:data="dataArray"
style="width: 100%"
height="100%"
border
>
<el-table-column
......@@ -28,9 +29,19 @@
<el-table-column
prop=""
label="排序" v-if="datas.DataSource.pageType!=1">
<template #header>
<div class="row items-center">
<span>排序</span>
</div>
</template>
<template #default="scope">
<div v-if="scope.row.TemplateList">
<!-- <el-input style="width: 214px;" type="number" v-model="scope.row.TemplateDataSource.index"
@change="setTemplateDataSource(scope.row.TemplateDataSource.Id,scope.$index,1)"
clearable></el-input> -->
<el-select v-model="scope.row.TemplateDataSource.index"
filterable
allow-create
clearable class="m-2"
placeholder="请选择排序"
@change="setTemplateDataSource(scope.row.TemplateDataSource.Id,scope.$index,1)">
......@@ -76,14 +87,15 @@
import { getHtmlPlainText } from '@/utils/common'
import useEditor from '@/utils/Editor/index'
import { Plus, Top, Bottom, Delete, Edit, View } from "@element-plus/icons-vue";
const datas = reactive({
sortList:[],
maxSort:11 as number,
DataSource:{} as any,
loading: false,//是否更新数据源
})
for(let i=0;i<11;i++){
datas.sortList.push(i)
}
datas.DataSource = inject(injectKeyDataSource)
const slidesStore = useSlidesStore()
const sourceLoadingStore = useScreenStore()
......@@ -100,6 +112,15 @@
}
})
const addSort = () => {
datas.sortList = []
for(let i=0;i<=datas.maxSort;i++){
datas.sortList.push(i)
}
}
addSort()
const setType = (x) =>{
if(x.type=="image"){
return x.TemplateList.filter(item=>{ return item.Name.indexOf('图')!=-1})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment