$emit('resize', e)" color="#fff"
+ v-if="!props.isView && !props.isHideHandle && props.selected"
@resize="resize" />
+ :style="{backgroundColor:props.data.options.backgroundColor,color:'#fff',width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px',pointerEvents:props.isView?'auto': 'none'}">
@@ -70,10 +72,21 @@ const emit = defineEmits(['resize']);
const resize = (e) => {
emit('resize', e, props.id);
};
-watch(() => [JSON.parse(JSON.stringify(props.data?.options?.number)), JSON.parse(JSON.stringify(props.inputData?.value || ''))], (obj1, obj2) => {
+const padArray = (arr,x,value=0)=>{
+ if (arr.length > x) {
+ return arr.slice(-x);
+ } else if (arr.length < x) {
+ const padding = new Array(x - arr.length).fill(value);
+ return [...padding, ...arr];
+ } else {
+ // 正好 x 位
+ return arr;
+ }
+}
+watch(() => [JSON.parse(JSON.stringify(props.data?.options?.numQuantity)),JSON.parse(JSON.stringify(props.data?.options?.number)), JSON.parse(JSON.stringify(props.inputData?.value || ''))], (obj1, obj2) => {
if (JSON.stringify(obj1) !== JSON.stringify(obj2)) {
let value = props.inputData?.value || props.data.options.number || '';
- list.value = value.toString().split('');
+ list.value = padArray(value.toString().split(''),props.data.options.numQuantity)
}
}, { deep: true, immediate: true });
diff --git a/src/views/boardGenerate/tool.js b/src/views/boardGenerate/tool.js
index da4d23f..4990c19 100644
--- a/src/views/boardGenerate/tool.js
+++ b/src/views/boardGenerate/tool.js
@@ -356,7 +356,7 @@ const getOption = (e) => {
return { pageSizeField: 'pageSize', currentPageField: 'pageNum' };
} else if (e === 'digitalFlop') {
return {
- field: '', number: 1111, backgroundColor: 'rgba(180, 180, 180, 0.2)', isBorder: true, borderColor: '#fff'
+ field: '', color: '#fff',fontSize: 22,number: 123,numQuantity:3, backgroundColor: 'rgba(180, 180, 180, 0.2)', isBorder: true, borderColor: '#fff'
};
} else {
return {};
diff --git a/src/views/wms/instockPrint/index.vue b/src/views/wms/instockPrint/index.vue
index 241ebee..27fa02c 100644
--- a/src/views/wms/instockPrint/index.vue
+++ b/src/views/wms/instockPrint/index.vue
@@ -112,7 +112,7 @@