This commit is contained in:
ZaneYork 2020-10-27 13:54:31 +08:00
parent 3260eac063
commit f0b78d86d8
2 changed files with 4 additions and 9 deletions

View File

@ -6,7 +6,7 @@
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'" "i18n:report": "vue-cli-service i18n:report --src \"./src/**/*.?(js|vue)\" --locales \"./src/locales/**/*.json\""
}, },
"dependencies": { "dependencies": {
"core-js": "^3.6.5", "core-js": "^3.6.5",

View File

@ -31,7 +31,7 @@
</v-group> </v-group>
</v-layer> </v-layer>
<v-layer v-if="!isEmpty(currentButtonId)"> <v-layer v-if="!isEmpty(currentButtonId)">
<v-rect :config="getButtonConfig(currentButton, 'lightcyan')" ref="currentButtonRect"></v-rect> <v-rect :config="getButtonConfig(currentButton, 'lightcyan')"></v-rect>
<v-text :config="getTextConfig(currentButton, firstNotEmpty(currentButton.alias, currentButton.key))"></v-text> <v-text :config="getTextConfig(currentButton, firstNotEmpty(currentButton.alias, currentButton.key))"></v-text>
</v-layer> </v-layer>
</v-stage> </v-stage>
@ -41,7 +41,7 @@
direction="rtl" direction="rtl"
size="40%" size="40%"
:with-header="true"> :with-header="true">
<el-form ref="form" label-width="50px"> <el-form label-width="50px">
<el-form-item :label="$t('X')"> <el-form-item :label="$t('X')">
<el-slider <el-slider
v-model="currentButton.rectangle.X" v-model="currentButton.rectangle.X"
@ -75,7 +75,7 @@
<el-button v-if="landscape && !isEmpty(currentButtonId)" <el-button v-if="landscape && !isEmpty(currentButtonId)"
type="primary" icon="el-icon-edit" circle @click="drawer=true" type="primary" icon="el-icon-edit" circle @click="drawer=true"
class="button-float"></el-button> class="button-float"></el-button>
<el-form ref="form" label-width="80px"> <el-form label-width="80px">
<el-form-item :label="$t('key')"> <el-form-item :label="$t('key')">
<el-autocomplete <el-autocomplete
class="inline-input" class="inline-input"
@ -160,7 +160,6 @@
drawer: false, drawer: false,
landscape: false, landscape: false,
currentButtonId: '', currentButtonId: '',
cachedCurrentButtonId: '',
currentButton: { currentButton: {
key: '', key: '',
alias: '', alias: '',
@ -266,10 +265,6 @@
event.cancelBubble = true; event.cancelBubble = true;
}, },
onActivated: function (button) { onActivated: function (button) {
if (this.currentButtonId !== this.cachedCurrentButtonId && this.$refs.currentButtonRect != null) {
this.$refs.currentButtonRect.getNode().cache();
this.cachedCurrentButtonId = this.currentButtonId;
}
this.currentButton = button; this.currentButton = button;
this.currentButtonId = button.id; this.currentButtonId = button.id;
}, },