+
+
+
@@ -204,7 +210,25 @@ const showPanelList = computed(() => {
return item.filterKeyword().toLowerCase().indexOf(layout.searchKeyword.toLowerCase()) !== -1
})
})
-
+const placeholderItem = ()=>{
+ return {
+ "key": "vue-node_shape_image",
+ "shape": "vue-node_shape_image",
+ "data": {
+ "label": "",
+ "width": 20,
+ "height": 20,
+ "shape": 10,
+ "style": {
+ "shape": {
+ "href": ""
+ }
+ }
+ },
+ "icon": "http://m.silverprinting.com.hk/admin-api/admin-api/infra/file/23/get/92b64f8c3cf664a8e69312bf0777ebc2fa84dc55a078155ae64441d6b33585e1.png",
+ "label": "占位符"
+ }
+}
const imageList = computed(() => {
return that.imageUrlList.filter(item => {
@@ -225,30 +249,40 @@ const queryImage = async () => {
that.imageUrlList = [];
that.imageKeySet = [];
for (let i = 0; i < data.list.length; i++) {
- let config = JSON.parse(data.list[i].initData)
- config.filterKeyword = function () {
- return this.label
- }
- config.key = `${config.key}_${data.list[i].id}`
- if (that.imageKeySet.includes(config.key)) {
- continue;
+ const d = {
+ label: '',
+ filterKeyword:function () {
+ return this.label || ''
+ },
+ ...JSON.parse(data.list[i].initData)
}
+ that.imageUrlList.push(toShape(data.list[i].id,d,domain))
+ }
+ console.log(toShape('1',placeholderItem(),domain))
+ that.imageUrlList.unshift(toShape('1',placeholderItem(),domain))
+ that.imgLoading = false
+ // that.imageUrlList = data.list
+}
+const toShape =(id,config,domain) =>{
+ config.filterKeyword = function () {
+ return this.label || ''
+ }
+ config.key = `${config.key}_${id}`
+ if (!that.imageKeySet.includes(config.key)) {
that.imageKeySet.push(config.key)
// 替换域名
config.icon = replaceDomain(domain, config.icon)
config.data.style.shape.href = replaceDomain(domain, config.data.style.shape.href)
config.data.style.shape.label= config.label
- that.imageUrlList.push(config)
}
- that.imgLoading = false
- // that.imageUrlList = data.list
+ return config
}
const allList = computed(() => {
let arr = [];
let typeSet = shapeList.value.map(item => {return item.shape});
for (let i = 0; i < layout.leftBtnList.length; i++) {
- if (['shape_image', 'shape_set'].includes(layout.leftBtnList[i].key)) {
+ if (['shape_image', 'shape_set','vue-node_shape_image_Placeholder'].includes(layout.leftBtnList[i].key)) {
continue;
}
if(typeSet.includes(layout.leftBtnList[i].shape)){
@@ -370,6 +404,27 @@ const layout = reactive({
return this.label
}
},
+ {
+ shape: ShapeType.vueShapeImage,
+ "key": "vue-node_shape_image_Placeholder",
+ "data": {
+ "label": "",
+ "width": 20,
+ "height": 20,
+ "shape": 10,
+ "style": {
+ "shape": {
+ "href": "",
+ "label": ""
+ }
+ }
+ },
+ icon: "http://m.silverprinting.com.hk/admin-api/admin-api/infra/file/23/get/92b64f8c3cf664a8e69312bf0777ebc2fa84dc55a078155ae64441d6b33585e1.png",
+ label: 'Placeholder占位符',
+ filterKeyword: function () {
+ return this.label
+ }
+ },
]
})
onMounted(() => {
diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/layout/index.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/layout/index.vue
index 3799b28..af4c67c 100644
--- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/layout/index.vue
+++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/layout/index.vue
@@ -1062,7 +1062,6 @@ const fontFamilyList = computed(() => {
icon: 'font-FangSong',
label: '仿宋'
},
-
{
value: '黑体',
icon: 'font-SimHei',
@@ -1143,62 +1142,30 @@ const fontSizeList = computed(() => {
const arr = [{
value: 2,
label: `2`
+ },{
+ value: 3,
+ label: `3`
}]
let i = 4;
- while (i < 20) {
- i += 2
- arr.push({
- value: i,
- label: `${i}`
- })
- }
- while (i < 80) {
- i += 4
- arr.push({
- value: i,
- label: `${i}`
- })
- }
- while (i < 100) {
- i += 8
- arr.push({
- value: i,
- label: `${i}`
- })
- }
- while (i < 200) {
- i += 20
- arr.push({
- value: i,
- label: `${i}`
- })
- }
- while (i < 300) {
- i += 40
- arr.push({
- value: i,
- label: `${i}`
- })
- }
- while (i < 500) {
- i += 80
+ while (i < 600) {
+ i ++
arr.push({
value: i,
label: `${i}`
})
}
+
return arr
})
const sizeModeList = [
- {
- value: '15_50',
- label: '洗水唛15 *50'
+ {
+ value: '30_100',
+ label: '洗水唛30 *10'
},
{
- value: '20_50',
- label: '洗水唛20 *50'
+ value: '62_100',
+ label: '洗水唛62 *100'
},
-
{
value: '75_100',
label: '吊牌75 *50'
@@ -1211,10 +1178,6 @@ const sizeModeList = [
value: '200_200',
label: 'LOGO设计200 * 200'
},
- {
- value: '200_200',
- label: 'LOGO设计200 * 200'
- },
{
value: '90_54',
label: '名片90 * 54'
@@ -1273,18 +1236,18 @@ const that = reactive({
color: ''
},
editArea: {
- width: 100,
- height: 300,
+ width: 30,
+ height: 100,
}
},
cellInfo: {
size: {
- width: 100,
- height: 300,
+ width: 30,
+ height: 100,
},
data: {}
},
- testFontSizeVal: 12,
+ testFontSizeVal: 10,
btnState: {
canUndo: false,
canRedo: false,
diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue
index 7db4643..5549ce6 100644
--- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue
+++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue
@@ -3,12 +3,15 @@
{{ item.label }}
-