Skip to content

Commit

Permalink
chore: remove unuse import
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangmo8 committed Apr 18, 2024
1 parent a44af6d commit 98b4a3b
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 143 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
}
7 changes: 7 additions & 0 deletions playground/components/Myinput.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<div>
<div>
<input>
</div>
</div>
</template>
12 changes: 6 additions & 6 deletions playground/pages/component/action-sheet.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script setup>
import { ActionSheet, Snackbar } from '@varlet/ui'
async function createBasic () {
async function createBasic() {
const action = await ActionSheet({
actions: [
{
Expand All @@ -16,13 +14,15 @@ async function createBasic () {
name: 'Item 03',
icon: 'wifi',
},
]
],
})
action !== 'close' && Snackbar(`您选择的是:${action.name}`)
}
</script>

<template>
<var-button type="primary" block @click="createBasic">基本使用</var-button>
</template>
<var-button type="primary" block @click="createBasic">
基本使用
</var-button>
</template>
10 changes: 4 additions & 6 deletions playground/pages/component/dialog.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script setup>
import { Dialog } from '@varlet/ui'
</script>

<template>
<var-button type="primary" block @click="Dialog('兰亭临帖 行书如行云流水')">基本使用</var-button>
</template>
<var-button type="primary" block @click="Dialog('兰亭临帖 行书如行云流水')">
基本使用
</var-button>
</template>
21 changes: 13 additions & 8 deletions playground/pages/component/fab.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<script setup lang="ts">
import type { FabPosition } from '@varlet/ui';
import { ref } from 'vue'
const position = ref<FabPosition>('left-top')
</script>

<template>
<var-radio-group v-model="position" style="margin-top: 80px;">
<var-radio checked-value="left-top">left-top</var-radio>
<var-radio checked-value="right-top">right-top</var-radio>
<var-radio checked-value="left-bottom">left-bottom</var-radio>
<var-radio checked-value="right-bottom">right-bottom</var-radio>
<var-radio checked-value="left-top">
left-top
</var-radio>
<var-radio checked-value="right-top">
right-top
</var-radio>
<var-radio checked-value="left-bottom">
left-bottom
</var-radio>
<var-radio checked-value="right-bottom">
right-bottom
</var-radio>
</var-radio-group>
<var-fab :position="position" />
</template>
</template>
10 changes: 5 additions & 5 deletions playground/pages/component/image-preview.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script setup>
import { ImagePreview } from '@varlet/ui'
function preview () {
function preview() {
ImagePreview('https://varlet.gitee.io/varlet-ui/cat.jpg')
}
</script>

<template>
<var-button type="primary" block @click="preview">基本使用</var-button>
</template>
<var-button type="primary" block @click="preview">
基本使用
</var-button>
</template>
24 changes: 12 additions & 12 deletions playground/pages/component/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ const value11 = ref('')

<template>
<var-space direction="column" size="large">
<var-input placeholder="请输入文本" v-model="value" />
<var-input placeholder="只读" readonly v-model="value2" />
<var-input placeholder="禁用" disabled v-model="value3" />
<var-input placeholder="可清除" clearable v-model="value4" />
<var-input clearable placeholder="使用插槽自定义清除图标" v-model="value5">
<var-input v-model="value" placeholder="请输入文本" />
<var-input v-model="value2" placeholder="只读" readonly />
<var-input v-model="value3" placeholder="禁用" disabled />
<var-input v-model="value4" placeholder="可清除" clearable />
<var-input v-model="value5" clearable placeholder="使用插槽自定义清除图标">
<template #clear-icon="{ clear }">
<var-icon name="error" @click="clear" />
</template>
</var-input>
<var-input placeholder="字段校验" :rules="[(v) => v.length > 6 || '文本长度必须大于6']" v-model="value6" />
<var-input placeholder="显示图标" v-model="value7">
<var-input v-model="value6" placeholder="字段校验" :rules="[(v) => v.length > 6 || '文本长度必须大于6']" />
<var-input v-model="value7" placeholder="显示图标">
<template #prepend-icon>
<var-icon class="prepend-icon" name="github" />
</template>
<template #append-icon>
<var-icon class="append-icon" name="github" />
</template>
</var-input>
<var-input placeholder="自定义图标尺寸" v-model="value8">
<var-input v-model="value8" placeholder="自定义图标尺寸">
<template #prepend-icon>
<var-icon class="prepend-icon" name="github" :size="28" />
</template>
<template #append-icon>
<var-icon class="append-icon" name="github" :size="42" />
</template>
</var-input>
<var-input placeholder="最大长度" :maxlength="10" v-model="value9" />
<var-input placeholder="文本域" textarea v-model="value10" />
<var-input placeholder="小尺寸" size="small" v-model="value11" />
<var-input v-model="value9" placeholder="最大长度" :maxlength="10" />
<var-input v-model="value10" placeholder="文本域" textarea />
<var-input v-model="value11" placeholder="小尺寸" size="small" />
</var-space>
</template>

Expand All @@ -56,4 +56,4 @@ const value11 = ref('')
.append-icon {
margin-left: 6px;
}
</style>
</style>
22 changes: 13 additions & 9 deletions playground/pages/component/loading-bar.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<script setup>
import { ref } from 'vue'
import { LoadingBar } from '@varlet/ui'
const hasCustomStyle = ref(false)
function setStyle () {
function setStyle() {
if (hasCustomStyle.value) {
LoadingBar.resetDefaultOptions()
} else {
}
else {
LoadingBar.setDefaultOptions({
errorColor: '#ff8800',
color: '#10afef',
Expand All @@ -26,11 +24,17 @@ function setStyle () {

<template>
<var-space direction="column" size="large">
<var-button type="primary" block @click="LoadingBar.start()">开始</var-button>
<var-button type="primary" block @click="LoadingBar.finish()">结束</var-button>
<var-button type="primary" block @click="LoadingBar.error()">错误</var-button>
<var-button type="primary" block @click="LoadingBar.start()">
开始
</var-button>
<var-button type="primary" block @click="LoadingBar.finish()">
结束
</var-button>
<var-button type="primary" block @click="LoadingBar.error()">
错误
</var-button>
<var-button type="primary" block @click="setStyle">
{{ hasCustomStyle ? '清除样式' : '设置样式' }}
</var-button>
</var-space>
</template>
</template>
16 changes: 8 additions & 8 deletions playground/pages/component/picker.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script setup>
import { Picker, Snackbar } from '@varlet/ui'
async function picker () {
async function picker() {
// eslint-disable-next-line unused-imports/no-unused-vars
const { state, values, indexes, options } = await Picker({
columns: [
Expand All @@ -10,16 +8,18 @@ async function picker () {
{ text: 'B' },
{ text: 'C' },
{ text: 'D' },
{ text: 'E' }
]
{ text: 'E' },
],
],
onChange (values, indexes) {
onChange(values, indexes) {
Snackbar(`values: ${values.toString()}, indexes: ${indexes.toString()}`)
},
})
}
</script>

<template>
<var-button type="primary" block @click="picker">单列选择</var-button>
</template>
<var-button type="primary" block @click="picker">
单列选择
</var-button>
</template>
Loading

0 comments on commit 98b4a3b

Please sign in to comment.