Improve MisskeyPages

This commit is contained in:
syuilo 2019-05-02 17:55:59 +09:00
parent 2fdec27ab0
commit 2d1f50303d
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
21 changed files with 248 additions and 176 deletions

View file

@ -15,10 +15,11 @@ import XSwitch from './page.switch.vue';
import XIf from './page.if.vue';
import XTextarea from './page.textarea.vue';
import XPost from './page.post.vue';
import XCounter from './page.counter.vue';
export default Vue.extend({
components: {
XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf
XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter
},
props: {

View file

@ -0,0 +1,47 @@
<template>
<div>
<ui-button class="llumlmnx" @click="click()">{{ script.interpolate(value.text) }}</ui-button>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
props: {
value: {
required: true
},
script: {
required: true
}
},
data() {
return {
v: 0,
};
},
watch: {
v() {
this.script.aiScript.updatePageVar(this.value.name, this.v);
this.script.eval();
}
},
methods: {
click() {
this.v = this.v + (this.value.inc || 1);
}
}
});
</script>
<style lang="stylus" scoped>
.llumlmnx
display inline-block
min-width 300px
max-width 450px
margin 8px 0
</style>