|
@@ -153,7 +153,7 @@
|
|
|
/>
|
|
|
</t-dropdown-item>
|
|
|
<t-dropdown-item
|
|
|
- v-for="prop in a.props"
|
|
|
+ v-for="prop in cprops"
|
|
|
:key="prop.value"
|
|
|
:value="prop.value"
|
|
|
>
|
|
@@ -253,7 +253,7 @@
|
|
|
/>
|
|
|
</t-dropdown-item>
|
|
|
<t-dropdown-item
|
|
|
- v-for="prop in a.props"
|
|
|
+ v-for="prop in cprops"
|
|
|
:key="prop.value"
|
|
|
:value="prop.value"
|
|
|
>
|
|
@@ -460,45 +460,84 @@ const onChangeAction = (action: any) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+let cprops = [
|
|
|
+ {
|
|
|
+ value: 'x',
|
|
|
+ label: 'X',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'y',
|
|
|
+ label: 'Y',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'width',
|
|
|
+ label: '宽',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'height',
|
|
|
+ label: '高',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'visible',
|
|
|
+ label: '显示',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'text',
|
|
|
+ label: '文字',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'progress',
|
|
|
+ label: '进度',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'showChild',
|
|
|
+ label: '状态',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'rotate',
|
|
|
+ label: '旋转',
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
const getProps = (c: any) => {
|
|
|
- c.props = [
|
|
|
- {
|
|
|
- value: 'x',
|
|
|
- label: 'X',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'y',
|
|
|
- label: 'Y',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'width',
|
|
|
- label: '宽',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'height',
|
|
|
- label: '高',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'visible',
|
|
|
- label: '显示',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'text',
|
|
|
- label: '文字',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'progress',
|
|
|
- label: '进度',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'showChild',
|
|
|
- label: '状态',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'rotate',
|
|
|
- label: '旋转',
|
|
|
- },
|
|
|
- ];
|
|
|
+ // c.props = [
|
|
|
+ // {
|
|
|
+ // value: 'x',
|
|
|
+ // label: 'X',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'y',
|
|
|
+ // label: 'Y',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'width',
|
|
|
+ // label: '宽',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'height',
|
|
|
+ // label: '高',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'visible',
|
|
|
+ // label: '显示',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'text',
|
|
|
+ // label: '文字',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'progress',
|
|
|
+ // label: '进度',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'showChild',
|
|
|
+ // label: '状态',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 'rotate',
|
|
|
+ // label: '旋转',
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
|
|
|
let target: any;
|
|
|
if (c.params) {
|
|
@@ -508,9 +547,9 @@ const getProps = (c: any) => {
|
|
|
}
|
|
|
if (target?.realTimes) {
|
|
|
for (const item of target.realTimes) {
|
|
|
- const found = c.props.findIndex((elem: any) => elem.value === item.key);
|
|
|
+ const found = cprops.findIndex((elem: any) => elem.value === item.key);
|
|
|
if (found < 0) {
|
|
|
- c.props.push({
|
|
|
+ cprops.push({
|
|
|
value: item.key,
|
|
|
label: item.label,
|
|
|
});
|
|
@@ -520,7 +559,7 @@ const getProps = (c: any) => {
|
|
|
};
|
|
|
|
|
|
const getPropDesc = (a: any, key: any) => {
|
|
|
- const found = a.props.find((elem: any) => elem.value === key);
|
|
|
+ const found = cprops.find((elem: any) => elem.value === key);
|
|
|
if (found) {
|
|
|
return found.label;
|
|
|
}
|