删除模块,移到efms里面,修改样式

This commit is contained in:
hyyy
2025-02-14 17:31:19 +08:00
parent 5463bff63b
commit b117fde8c3
15 changed files with 36 additions and 346 deletions

View File

@@ -0,0 +1,3 @@
.model-viewer-in-list {
width: 150px;
}

View File

@@ -63,11 +63,16 @@ StepViewer.supportedTypes = ["binary"];
StepViewer.props = {
...standardFieldProps,
url: {type: String, optional: true},
isInList: {type: Boolean, optional: true},
};
StepViewer.extractProps = ({attrs}) => {
const modifiedAttrs = JSON.parse(attrs.modifiers || '{}');
return {
url: attrs.options.url,
isInList: modifiedAttrs.isInList,
};
};

View File

@@ -5,6 +5,7 @@
<t t-if="props.value">
<model-viewer
t-att-class="props.isInList ? 'model-viewer-in-list' : ''"
t-att-src='props.url'
name="3D model"
alt="3D model"