mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 04:46:31 +08:00
fix(eslint): fix eslint globals
This commit is contained in:
parent
e3055c16b6
commit
04932ec0f5
|
@ -11,6 +11,10 @@
|
||||||
"jest": true,
|
"jest": true,
|
||||||
"es6": true
|
"es6": true
|
||||||
},
|
},
|
||||||
|
"globals": {
|
||||||
|
"defineProps": "readonly",
|
||||||
|
"defineEmits": "readonly"
|
||||||
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"vue",
|
"vue",
|
||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"qrcode.vue": "^3.2.2",
|
"qrcode.vue": "^3.2.2",
|
||||||
"tdesign-icons-vue-next": "^0.0.6",
|
"tdesign-icons-vue-next": "^0.0.6",
|
||||||
"tdesign-vue-next": "0.7.0-alpha.0",
|
"tdesign-vue-next": "^0.8.0",
|
||||||
"tvision-color": "^1.3.1",
|
"tvision-color": "^1.3.1",
|
||||||
"vue": "^3.1.5",
|
"vue": "^3.2.31",
|
||||||
"vue-color-kit": "^1.0.5",
|
"vue-color-kit": "^1.0.5",
|
||||||
"vue-router": "^4.0.11",
|
"vue-router": "^4.0.11",
|
||||||
"vue3-clipboard": "^1.0.0",
|
"vue3-clipboard": "^1.0.0",
|
||||||
|
|
|
@ -9,21 +9,15 @@
|
||||||
<user-avatar-icon v-if="product.type === 4" />
|
<user-avatar-icon v-if="product.type === 4" />
|
||||||
<laptop-icon v-if="product.type === 5" />
|
<laptop-icon v-if="product.type === 5" />
|
||||||
</div>
|
</div>
|
||||||
<t-tag :theme="product.isSetup ? 'success' : 'default'" :disabled="!product.isSetup">{{
|
<t-tag :theme="product.isSetup ? 'success' : 'default'" :disabled="!product.isSetup">
|
||||||
product.isSetup ? '已启用' : '已停用'
|
{{ product.isSetup ? '已启用' : '已停用' }}
|
||||||
}}</t-tag>
|
</t-tag>
|
||||||
</t-row>
|
</t-row>
|
||||||
<p class="list-card-item_detail--name">
|
<p class="list-card-item_detail--name">{{ product.name }}</p>
|
||||||
{{ product.name }}
|
<p class="list-card-item_detail--desc">{{ product.description }}</p>
|
||||||
</p>
|
|
||||||
<p class="list-card-item_detail--desc">
|
|
||||||
{{ product.description }}
|
|
||||||
</p>
|
|
||||||
<t-row justify="space-between" align="middle" :class="cardControlClass">
|
<t-row justify="space-between" align="middle" :class="cardControlClass">
|
||||||
<div>
|
<div>
|
||||||
<t-button shape="circle" :disabled="!product.isSetup">
|
<t-button shape="circle" :disabled="!product.isSetup">{{ typeMap[product.type - 1] }}</t-button>
|
||||||
{{ typeMap[product.type - 1] }}
|
|
||||||
</t-button>
|
|
||||||
<t-button shape="circle" :disabled="!product.isSetup">
|
<t-button shape="circle" :disabled="!product.isSetup">
|
||||||
<add-icon />
|
<add-icon />
|
||||||
</t-button>
|
</t-button>
|
||||||
|
@ -53,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, defineProps, PropType, defineEmits } from 'vue';
|
import { computed, PropType } from 'vue';
|
||||||
import {
|
import {
|
||||||
ShopIcon,
|
ShopIcon,
|
||||||
CalendarIcon,
|
CalendarIcon,
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: String,
|
title: String,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div :style="style" class="color-container" />
|
<div :style="style" class="color-container" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from 'vuex';
|
||||||
import { getBrandColor } from '@/config/color';
|
import { getBrandColor } from '@/config/color';
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import Result403Icon from '@/assets/assets-result-403.svg?component';
|
import Result403Icon from '@/assets/assets-result-403.svg?component';
|
||||||
import Result404Icon from '@/assets/assets-result-404.svg?component';
|
import Result404Icon from '@/assets/assets-result-404.svg?component';
|
||||||
import Result500Icon from '@/assets/assets-result-500.svg?component';
|
import Result500Icon from '@/assets/assets-result-500.svg?component';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<img :class="className" :src="url" />
|
<img :class="className" :src="url" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, defineProps } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
url: String,
|
url: String,
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps, PropType, computed } from 'vue';
|
import { PropType, computed } from 'vue';
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from 'vuex';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRouter, useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, defineProps } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const layout = defineProps({
|
const layout = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
</t-dialog>
|
</t-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineComponent, ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
|
|
||||||
const INITIAL_DATA = {
|
const INITIAL_DATA = {
|
||||||
|
@ -53,8 +53,7 @@ const SELECT_OPTIONS = [
|
||||||
{ label: 'CVM', value: '3' },
|
{ label: 'CVM', value: '3' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default defineComponent({
|
const props = defineProps({
|
||||||
props: {
|
|
||||||
visible: {
|
visible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -65,8 +64,8 @@ export default defineComponent({
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
});
|
||||||
setup(props, ctx) {
|
|
||||||
const formVisible = ref(false);
|
const formVisible = ref(false);
|
||||||
const formData = ref(props.data);
|
const formData = ref(props.data);
|
||||||
const textareaValue = ref('');
|
const textareaValue = ref('');
|
||||||
|
@ -86,10 +85,10 @@ export default defineComponent({
|
||||||
formData.value = { ...INITIAL_DATA };
|
formData.value = { ...INITIAL_DATA };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:visible']);
|
||||||
watch(
|
watch(
|
||||||
() => formVisible.value,
|
() => formVisible.value,
|
||||||
(val) => {
|
(val) => {
|
||||||
const { emit } = ctx;
|
|
||||||
emit('update:visible', val);
|
emit('update:visible', val);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -108,17 +107,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
const rules = {
|
||||||
SELECT_OPTIONS,
|
|
||||||
formVisible,
|
|
||||||
formData,
|
|
||||||
textareaValue,
|
|
||||||
onSubmit,
|
|
||||||
onClickCloseBtn,
|
|
||||||
rules: {
|
|
||||||
name: [{ required: true, message: '请输入产品名称', type: 'error' }],
|
name: [{ required: true, message: '请输入产品名称', type: 'error' }],
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineEmits, ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
import { useCounter } from '@/hooks';
|
import { useCounter } from '@/hooks';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user