Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: The style configuration binding variable component reads the configurator configuration #949

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions packages/settings/styles/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<div class="line-style">
<span class="line-text"> 行内样式 </span>
<div class="inline-style">
<code-configurator
<component
:is="CodeConfigurator"
v-if="state.lineStyleDisable"
:buttonShowContent="true"
:modelValue="state.styleContent"
Expand All @@ -12,17 +13,18 @@
language="css"
single
@save="save"
/>
></component>
<div v-if="!state.lineStyleDisable">
<tiny-input v-model="state.propertiesList" class="inline-bind-style"> </tiny-input>
</div>
<variable-configurator
<component
:is="VariableConfigurator"
ref="bindVariable"
:model-value="state.bindModelValue"
name="advance"
@update:modelValue="setConfig"
>
</variable-configurator>
</component>
</div>
</div>
</div>
Expand Down Expand Up @@ -67,8 +69,7 @@
<script>
import { watch, inject, ref } from 'vue'
import { Collapse, CollapseItem, Input } from '@opentiny/vue'
import { useHistory, useCanvas, useProperties } from '@opentiny/tiny-engine-meta-register'
import { CodeConfigurator, VariableConfigurator } from '@opentiny/tiny-engine-configurator'
import { useHistory, useCanvas, useProperties, getConfigurator } from '@opentiny/tiny-engine-meta-register'
import {
SizeGroup,
LayoutGroup,
Expand All @@ -88,7 +89,6 @@

export default {
components: {
CodeConfigurator,
SizeGroup,
LayoutGroup,
FlexBox,
Expand All @@ -102,11 +102,17 @@
ClassNamesContainer,
TinyCollapse: Collapse,
TinyCollapseItem: CollapseItem,
TinyInput: Input,
VariableConfigurator
TinyInput: Input
},
props: {},
setup() {
props: {
isCollapsed: {
type: Boolean,
default: false
}
},
setup(props) {

Check failure on line 113 in packages/settings/styles/src/Main.vue

View workflow job for this annotation

GitHub Actions / push-check

'props' is defined but never used. Allowed unused args must match /^_/u
const CodeConfigurator = getConfigurator('CodeConfigurator')
const VariableConfigurator = getConfigurator('VariableConfigurator')
const styleCategoryGroup = [
'layout',
'spacing',
Expand Down Expand Up @@ -208,6 +214,8 @@
)

return {
CodeConfigurator,
VariableConfigurator,
state,
activeNames,
CSS_TYPE,
Expand All @@ -217,7 +225,7 @@
close,
updateStyle,
setConfig,
isCollapsed

Check failure on line 228 in packages/settings/styles/src/Main.vue

View workflow job for this annotation

GitHub Actions / push-check

Duplicated key 'isCollapsed'
}
}
}
Expand Down
Loading