fix(select-optimize-demo-code): Unify Investigation Optimize Demo Code (#634)

* fix(select-optimize-demo-code): Unify Investigation Optimize Demo Code

* fix(select-optimize-demo-code): Unify Investigation Optimize Demo Code
This commit is contained in:
Xppp0217 2023-10-25 11:40:28 +08:00 committed by GitHub
parent 9cb3a06a85
commit 1abad36b09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
111 changed files with 140 additions and 139 deletions

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -7,7 +7,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption, Button as TinyButton } from '@opentiny/vue'
@ -21,7 +21,7 @@ const options = ref([
const value = ref('')
const selectDomRef = ref()
function onFocus() {
selectDomRef.value.focus()
const onFocus = () => {
selectDomRef.value.focus()
}
</script>

View File

@ -7,7 +7,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option, Button } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -9,7 +9,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -9,7 +9,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -14,7 +14,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'
@ -30,8 +30,7 @@ const options = ref([
{ value: '选项5', label: '北京烤鸭' }
])
const value = ref('选项3')
function cacheChange() {
const cacheChange = () => {
cacheValue.value = window.localStorage.getItem(`tiny_memorize_${cacheOp.value.key}`)
}
</script>

View File

@ -14,7 +14,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -9,7 +9,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -9,7 +9,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -7,7 +7,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
import { iconShare } from '@opentiny/vue-icon'

View File

@ -7,15 +7,15 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
import { IconShare } from '@opentiny/vue-icon'
import { iconShare } from '@opentiny/vue-icon'
export default {
components: {
TinySelect: Select,
TinyOption: Option,
IconShare: IconShare()
IconShare: iconShare()
},
data() {
return {

View File

@ -7,7 +7,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
import { iconSetting } from '@opentiny/vue-icon'

View File

@ -7,7 +7,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
import { iconSetting } from '@opentiny/vue-icon'

View File

@ -25,7 +25,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'

View File

@ -25,7 +25,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -12,7 +12,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption, Modal } from '@opentiny/vue'
@ -25,25 +25,25 @@ const options = ref([
])
const value = ref('')
function change() {
const change = () => {
Modal.message({
message: 'changes事件'
})
}
function clear() {
const clear = () => {
Modal.message({
message: 'clear事件'
})
}
function focus() {
const focus = () => {
Modal.message({
message: 'focus事件'
})
}
function blur() {
const blur = () => {
Modal.message({
message: 'blur事件'
})

View File

@ -12,7 +12,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option, Modal } from '@opentiny/vue'
export default {

View File

@ -24,13 +24,13 @@ const options = ref([
])
const value = ref('')
function removeTag() {
const removeTag = () => {
Modal.message({
message: 'removeTag事件'
})
}
function visibleChange() {
const visibleChange = () => {
Modal.message({
message: 'visibleChange事件'
})

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option, Modal } from '@opentiny/vue'
export default {

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
@ -25,7 +25,7 @@ const options = ref([
const value = ref('')
const selectRef = ref()
function filter(value) {
const filter = (value) => {
const select = selectRef.value
if (value) {

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {
@ -32,6 +32,7 @@ export default {
}
},
methods: {
filter(value) {
const select = this.$refs.select
@ -45,6 +46,7 @@ export default {
})
}
}
}
}
</script>

View File

@ -14,7 +14,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref, onMounted } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
@ -85,7 +85,7 @@ onMounted(() => {
}))
})
function remoteMethod(query) {
const remoteMethod = (query) => {
if (query !== undefined) {
loading.value = true
setTimeout(() => {

View File

@ -14,7 +14,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -15,7 +15,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -15,7 +15,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -11,7 +11,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -12,7 +12,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption, Button as TinyButton } from '@opentiny/vue'
@ -26,11 +26,11 @@ const options = ref([
const value = ref('')
const dropRef = ref()
function click1() {
const click1 = () => {
dropRef.value.focus()
}
function click2() {
const click2 = () => {
dropRef.value.blur()
}
</script>

View File

@ -12,7 +12,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option, Button } from '@opentiny/vue'
export default {

View File

@ -16,7 +16,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
import Memorize from '@opentiny/vue-renderless/common/deps/memorize'
@ -34,7 +34,7 @@ const options = MemorizeInstance.assemble([
const value = ref('选项3')
const cacheValue = ref([])
function clickItem(value) {
const clickItem = (value) => {
MemorizeInstance.updateByKey(value)
cacheValue.value = window.localStorage.getItem('tiny_memorize_test456')
}

View File

@ -16,7 +16,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
import Memorize from '@opentiny/vue-renderless/common/deps/memorize'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -16,7 +16,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'
@ -37,7 +37,7 @@ const gridOpRadio = ref({
]
})
function filter(value) {
const filter = (value) => {
if (!value) {
return gridOpRadio.value.data
}

View File

@ -16,7 +16,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -12,7 +12,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'

View File

@ -12,7 +12,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -12,7 +12,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'

View File

@ -12,7 +12,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -14,7 +14,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'
@ -58,7 +58,7 @@ const treeOp = ref({
]
})
function filter(value, data) {
const filter = (value, data) => {
if (!value) return true
return data.label.includes(value)

View File

@ -14,7 +14,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -35,7 +35,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'
@ -68,7 +68,7 @@ allData.value = Array.from({ length: 10000 }, (a, i) => {
}
})
function remoteMethod(value) {
const remoteMethod = (value) => {
let allData = Array.from({ length: 1000 }, (a, i) => {
return {
id: '00' + i,
@ -89,7 +89,7 @@ function remoteMethod(value) {
})
}
function filter(value) {
const filter = (value) => {
return allData.value.filter((item) => {
return !item.city.includes(value)
})

View File

@ -35,7 +35,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -12,7 +12,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'

View File

@ -13,7 +13,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref, onMounted } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'

View File

@ -13,7 +13,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -12,7 +12,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -11,7 +11,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -33,7 +33,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'
@ -201,7 +201,7 @@ const gridOpRadio = ref({
})
let loading
function remoteMethod(query) {
const remoteMethod = (query) => {
if (query !== undefined) {
loading = true

View File

@ -33,7 +33,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select } from '@opentiny/vue'
export default {

View File

@ -12,7 +12,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -12,7 +12,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -17,7 +17,7 @@
</tiny-form>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Form as TinyForm, FormItem as TinyFormItem, Select as TinySelect, Modal } from '@opentiny/vue'
@ -28,7 +28,7 @@ const value1 = ref('')
const value2 = ref('')
const options = ref(buildOptions())
function onChange(value) {
const onChange = (value) => {
Modal.message(JSON.stringify(value))
}
</script>

View File

@ -17,7 +17,7 @@
</tiny-form>
</template>
<script lang="jsx">
<script>
import { Form, FormItem, Select, Modal } from '@opentiny/vue'
const buildOptions = () =>

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption, OptionGroup as TinyOptionGroup } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption, OptionGroup as TinyOptionGroup } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option, OptionGroup } from '@opentiny/vue'
export default {

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option, OptionGroup } from '@opentiny/vue'
export default {

View File

@ -13,7 +13,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -13,7 +13,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -14,7 +14,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref, onMounted } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
@ -81,7 +81,7 @@ onMounted(() => {
})
})
function remoteMethod(query) {
const remoteMethod = (query) => {
if (query !== undefined) {
loading.value = true
setTimeout(() => {

View File

@ -14,7 +14,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -16,7 +16,7 @@
<input class="custom" type="text" />
</template>
<script setup lang="jsx">
<script setup>
import { ref, onMounted } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
@ -83,7 +83,7 @@ onMounted(() => {
})
})
function remoteMethod(query) {
const remoteMethod = (query) => {
if (query !== undefined) {
loading.value = true
setTimeout(() => {

View File

@ -16,7 +16,7 @@
<input class="custom" type="text" />
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -24,7 +24,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'
@ -38,7 +38,7 @@ const options = ref([
const value = ref('')
const selectRef = ref()
function filter(value) {
const filter = (value) => {
const select = selectRef.value
if (value) {

View File

@ -24,7 +24,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -11,7 +11,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -7,7 +7,7 @@
</div>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption, Button as TinyButton } from '@opentiny/vue'
@ -20,7 +20,7 @@ const options = ref([
])
const value = ref('')
function click() {
const click = () => {
value.value = ['选项4']
}
</script>

View File

@ -7,7 +7,7 @@
</div>
</template>
<script lang="jsx">
<script>
import { Select, Option, Button } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Select, Option } from '@opentiny/vue'
export default {

View File

@ -2,7 +2,7 @@
<tiny-select v-model="value" placeholder="请选择" size="medium" multiple :options="options"></tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect } from '@opentiny/vue'

View File

@ -11,7 +11,7 @@
</tiny-select>
</template>
<script lang="jsx">
<script>
import { Option, Select } from '@opentiny/vue'
export default {

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

View File

@ -4,7 +4,7 @@
</tiny-select>
</template>
<script setup lang="jsx">
<script setup>
import { ref } from 'vue'
import { Select as TinySelect, Option as TinyOption } from '@opentiny/vue'

Some files were not shown because too many files have changed in this diff Show More