Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
63 changes: 27 additions & 36 deletions examples/sites/demos/mobile/app/actionsheet/clickfn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,38 @@
</div>
</template>

<script lang="jsx">
<script setup lang="jsx">
import { ref } from 'vue'
import { TinyActionSheet, TinyButton } from '@opentiny/vue-mobile'

export default {
components: {
TinyActionSheet,
TinyButton
const activeName = ref('')
const boxVisibility = ref(false)
const menus = ref([
{
id: 1,
label: '我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
data() {
return {
activeName: '',
boxVisibility: false,
menus: [
{
id: 1,
label: '我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
{
id: 2,
label: '我是小树'
},
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
}
]
}
{
id: 2,
label: '我是小树'
},
methods: {
fn() {
this.boxVisibility = true
},
clickItem(value) {
console.log(value, '获取了当前点击的返回值')
}
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
}
])

function fn() {
boxVisibility.value = true
}

function clickItem(value) {
console.log(value, '获取了当前点击的返回值')
}
</script>

Expand Down
58 changes: 24 additions & 34 deletions examples/sites/demos/mobile/app/actionsheet/ellipsis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,35 @@
</div>
</template>

<script lang="jsx">
<script setup lang="jsx">
import { ref } from 'vue'
import { TinyActionSheet, TinyButton } from '@opentiny/vue-mobile'

export default {
components: {
TinyActionSheet,
TinyButton
const activeName = ref('')
const boxVisibility = ref(false)
const menus = ref([
{
id: 1,
label:
'我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
data() {
return {
activeName: '',
boxVisibility: false,
menus: [
{
id: 1,
label:
'我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
{
id: 2,
label: '我是小树'
},
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
}
]
}
{
id: 2,
label: '我是小树'
},
methods: {
fn() {
this.boxVisibility = true
}
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
}
])

function fn() {
boxVisibility.value = true
}
</script>

Expand Down
96 changes: 44 additions & 52 deletions examples/sites/demos/mobile/app/actionsheet/slot-action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,63 +22,55 @@
</div>
</template>

<script lang="jsx">
<script setup lang="jsx">
import { ref } from 'vue'
import { TinyActionSheet, TinyButton } from '@opentiny/vue-mobile'

export default {
components: {
TinyActionSheet,
TinyButton
const activeName = ref(1)
const boxVisibility = ref(false)
const menus = ref([
{
id: 1,
label: '我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
data() {
return {
activeName: 1,
boxVisibility: false,
menus: [
{
id: 1,
label: '我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
{
id: 2,
label: '我是小树'
},
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
},
{
id: 5,
label: '我是小茎'
},
{
id: 6,
label: '我是小根'
},
{
id: 7,
label: '我是小枝'
},
{
id: 8,
label: '我是小木'
}
]
}
{
id: 2,
label: '我是小树'
},
methods: {
visibleHandle() {
this.$refs.action.visibleHandle()
},
fn() {
this.boxVisibility = true
}
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
},
{
id: 5,
label: '我是小茎'
},
{
id: 6,
label: '我是小根'
},
{
id: 7,
label: '我是小枝'
},
{
id: 8,
label: '我是小木'
}
])
const actionRef = ref()

function visibleHandle() {
actionRef.value.visibleHandle()
}

function fn() {
boxVisibility.value = true
}
</script>

Expand Down
56 changes: 23 additions & 33 deletions examples/sites/demos/mobile/app/actionsheet/slot-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,34 @@
</div>
</template>

<script lang="jsx">
<script setup lang="jsx">
import { ref } from 'vue'
import { TinyActionSheet, TinyButton } from '@opentiny/vue-mobile'

export default {
components: {
TinyActionSheet,
TinyButton
const activeName = ref(1)
const boxVisibility = ref(false)
const menus = ref([
{
id: 1,
label: '我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
data() {
return {
activeName: 1,
boxVisibility: false,
menus: [
{
id: 1,
label: '我是小花,我是小花,我是小花,我是小花,我是小花,我是小花,我是小花'
},
{
id: 2,
label: '我是小树'
},
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
}
]
}
{
id: 2,
label: '我是小树'
},
methods: {
fn() {
this.boxVisibility = true
}
{
id: 3,
label: '我是小草'
},
{
id: 4,
label: '我是小叶',
warn: true
}
])

function fn() {
boxVisibility.value = true
}
</script>

Expand Down
8 changes: 2 additions & 6 deletions examples/sites/demos/mobile/app/alert/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@
</div>
</template>

<script>
<script setup>
import { TinyAlert } from '@opentiny/vue-mobile'

export default {
components: {
TinyAlert
}
}

</script>

<style scoped>
Expand Down
8 changes: 2 additions & 6 deletions examples/sites/demos/mobile/app/alert/center.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
<tiny-alert center description="文字居中"></tiny-alert>
</template>

<script>
<script setup>
import { TinyAlert } from '@opentiny/vue-mobile'

export default {
components: {
TinyAlert
}
}

</script>
30 changes: 10 additions & 20 deletions examples/sites/demos/mobile/app/alert/custom-close.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,18 @@
</div>
</template>

<script>
<script setup>
import { ref } from 'vue'
import { TinyAlert, TinySwitch, TinyToast } from '@opentiny/vue-mobile'

export default {
components: {
TinyAlert,
TinySwitch
},
data() {
return {
autoHide: false,
closeText: '自定义关闭'
}
},
methods: {
close() {
TinyToast.service({
text: 'close事件!',
time: 100000
})
}
}
const autoHide = ref(false)
const closeText = ref('自定义关闭')

function close() {
TinyToast.service({
text: 'close事件!',
time: 100000
})
}
</script>

Expand Down
Loading
Loading