refactor(mobile): remove @opentiny/mobile-utils package, and add alia… (#2767)
* refactor(mobile): remove @opentiny/mobile-utils package, and add alias to utils * refactor(mobile): fix pnpm dev
This commit is contained in:
parent
6eb80f11fd
commit
35024662ea
|
@ -51,6 +51,7 @@ module.exports = {
|
|||
'@typescript-eslint/restrict-template-expressions': 'off',
|
||||
'@typescript-eslint/no-invalid-this': 'off',
|
||||
'vue/no-deprecated-dollar-scopedslots-api': 'off',
|
||||
'@typescript-eslint/lines-between-class-members': 'off'
|
||||
'@typescript-eslint/lines-between-class-members': 'off',
|
||||
'@typescript-eslint/no-this-alias': 'off'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,6 +135,7 @@ export default defineConfig((config) => {
|
|||
resolve: {
|
||||
extensions: ['.js', '.ts', '.tsx', '.vue'],
|
||||
alias: {
|
||||
'@mobile-root': pathFromWorkspaceRoot('packages/mobile'),
|
||||
'@': path.resolve('src'),
|
||||
'@demos': path.resolve(`${demosPath}`),
|
||||
'@menu': menuPath,
|
||||
|
|
|
@ -92,6 +92,7 @@ export default defineConfig((config) => {
|
|||
resolve: {
|
||||
extensions: ['.js', '.ts', '.tsx', '.vue'],
|
||||
alias: {
|
||||
'@mobile-root': pathFromWorkspaceRoot('packages/mobile'),
|
||||
'vue': path.resolve('node_modules/vue/dist/vue.esm-bundler.js'),
|
||||
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
|
||||
'@': pathFromWorkspaceRoot('examples/docs/newsrc'),
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import '@opentiny/vue-theme-mobile/action-sheet/index.less'
|
||||
import BScroll from '@better-scroll/core'
|
||||
import { actionSheetProps } from './action-sheet'
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { iconClose, iconSuccess, iconError, iconHelp, iconWarningTriangle } from '@opentiny/vue-icon'
|
||||
import type { IAlertApi } from './alert'
|
||||
import { alertProps } from './alert'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
-->
|
||||
<script lang="tsx">
|
||||
import { $prefix, setup, h, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, h, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import '@opentiny/vue-theme-mobile/avatar/index.less'
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { badgeProps } from './badge'
|
||||
import '@opentiny/vue-theme-mobile/badge/index.less'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
import { computedContent, computedValueRef, computedTransform } from './index'
|
||||
import { xss } from '@opentiny/mobile-utils/xss'
|
||||
import { xss } from '@mobile-root/utils/xss'
|
||||
import type { IBadgeState, IBadgeProps, IBadgeApi, IBadgeRenderlessParams } from '../badge'
|
||||
|
||||
export const api = ['state']
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { buttonProps } from './button'
|
||||
import '@opentiny/vue-theme-mobile/button/index.less'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
import type { IButtonRenderlessParams, IButtonState } from '../button'
|
||||
import { xss } from '@opentiny/mobile-utils'
|
||||
import { xss } from '@mobile-root/utils'
|
||||
|
||||
export const handleClick =
|
||||
({ emit, props, state }: Pick<IButtonRenderlessParams, 'emit' | 'props' | 'state'>) =>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import Checkbox from '../../checkbox'
|
||||
import { CheckboxGroupProps } from './checkbox-group'
|
||||
import '@opentiny/vue-theme-mobile/checkbox-group/index.less'
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import { $prefix } from '../../../vue-common'
|
||||
import type { PropType } from '../../../vue-common'
|
||||
import { $prefix } from '@mobile-root/vue-common'
|
||||
import type { PropType } from '@mobile-root/vue-common'
|
||||
import type { ExtractPropTypes, ComputedRef } from 'vue'
|
||||
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { checkboxProps } from './checkbox'
|
||||
import '@opentiny/vue-theme-mobile/checkbox/index.less'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
import type { ICheckboxRenderlessParams, ICheckboxState, ICheckboxChangeEvent, ICheckboxProps } from '../checkbox'
|
||||
import { isNull } from '@opentiny/mobile-utils/type'
|
||||
import { isNull } from '@mobile-root/utils/type'
|
||||
|
||||
export const addToStore =
|
||||
({ state, props }: Pick<ICheckboxRenderlessParams, 'state' | 'props'>) =>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { containerProps } from './container'
|
||||
import '@opentiny/vue-theme-mobile/container/index.less'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { isNumber } from '@opentiny/mobile-utils/type'
|
||||
import { isNumber } from '@mobile-root/utils/type'
|
||||
|
||||
export const computedShowHeader =
|
||||
({ constants, props }) =>
|
||||
|
@ -128,7 +128,7 @@ export const computedLeftStyle =
|
|||
export const computedShowRight =
|
||||
({ constants, props }) =>
|
||||
() => {
|
||||
return props.pattern === constants.DEFAULT ? false : true
|
||||
return props.pattern !== constants.DEFAULT
|
||||
}
|
||||
|
||||
export const computedRightStyle =
|
||||
|
|
|
@ -9,10 +9,11 @@
|
|||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import type { PropType } from '../../../vue-common'
|
||||
import type { PropType } from '@mobile-root/vue-common'
|
||||
import { iconClose } from '@opentiny/vue-icon'
|
||||
import type { ComputedRef, ExtractPropTypes } from 'vue'
|
||||
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
|
||||
|
||||
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
|
||||
|
||||
const currentYear = new Date().getFullYear()
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { props, setup, defineComponent } from '../../../vue-common'
|
||||
import { props, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import MiniPicker from '../../mini-picker'
|
||||
import Input from '../../input'
|
||||
|
|
|
@ -27,7 +27,7 @@ import {
|
|||
onChange,
|
||||
updateColumnValue
|
||||
} from './index'
|
||||
import { DATE } from '@opentiny/mobile-utils'
|
||||
import { DATE } from '@mobile-root/utils'
|
||||
import type {
|
||||
IDatePickerApi,
|
||||
IDatePickerProps,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { $prefix } from '../../../vue-common'
|
||||
import { $prefix } from '@mobile-root/vue-common'
|
||||
import type { ExtractPropTypes } from 'vue'
|
||||
import type {
|
||||
handleCancel,
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { dialogBoxProps } from './dialog-box'
|
||||
import '@opentiny/vue-theme-mobile/dialog-box/index.less'
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { on, off, addClass, removeClass } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { emitEvent } from '@opentiny/mobile-utils/event'
|
||||
import { getDomNode } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { on, off, addClass, removeClass } from '@mobile-root/utils/deps/dom'
|
||||
import { emitEvent } from '@mobile-root/utils/event'
|
||||
import { getDomNode } from '@mobile-root/utils/deps/dom'
|
||||
import type { IDialogBoxRenderlessParams, IDialogBoxStyle } from '../dialog-box'
|
||||
|
||||
export const computedAnimationName =
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
hideScrollbar,
|
||||
computedBodyStyle
|
||||
} from './index'
|
||||
import usePopup from '@opentiny/mobile-utils/deps/vue-popup'
|
||||
import usePopup from '@mobile-root/utils/deps/vue-popup'
|
||||
import type {
|
||||
IDialogBoxApi,
|
||||
IDialogBoxProps,
|
||||
|
|
|
@ -99,11 +99,11 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent, directive } from '../../../vue-common'
|
||||
import { setup, defineComponent, directive } from '@mobile-root/vue-common'
|
||||
import { iconYes } from '@opentiny/vue-icon'
|
||||
import Popup from '../../popup'
|
||||
import Button from '../../button'
|
||||
import Clickoutside from '@opentiny/mobile-utils/deps/clickoutside'
|
||||
import Clickoutside from '@mobile-root/utils/deps/clickoutside'
|
||||
import '@opentiny/vue-theme-mobile/dropdown-item/index.less'
|
||||
import { dropdownItemProps } from './dropdown-item'
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import type {
|
|||
IDropdownItemTag,
|
||||
IDropdownItemOptionStyle
|
||||
} from '../dropdown-item'
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
export const getTitle = (props: IDropdownItemRenderlessParams['props']) => (): string => {
|
||||
if (props.title) {
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
item.type === 'filter'
|
||||
? 'IconUnfilter'
|
||||
: item.type === 'selection' && item.state.showPopup
|
||||
? 'IconUp'
|
||||
: 'IconDown'
|
||||
? 'IconUp'
|
||||
: 'IconDown'
|
||||
"
|
||||
:class="[item.type === 'filter' ? 'filter-icon' : '']"
|
||||
/>
|
||||
|
@ -68,10 +68,10 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent, directive } from '../../../vue-common'
|
||||
import { setup, defineComponent, directive } from '@mobile-root/vue-common'
|
||||
import { iconUp, iconDown, iconUnfilter, iconSort, iconDeltaDown, iconDeltaUp } from '@opentiny/vue-icon'
|
||||
import { dropdownMenuProps } from './dropdown-menu'
|
||||
import Clickoutside from '@opentiny/mobile-utils/deps/clickoutside'
|
||||
import Clickoutside from '@mobile-root/utils/deps/clickoutside'
|
||||
import '@opentiny/vue-theme-mobile/dropdown-menu/index.less'
|
||||
|
||||
export default defineComponent({
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
import type { IDropdownMenuRenderlessParams, IDropdownMenuPopperParams, IDropdownItemVm } from '../dropdown-menu'
|
||||
import userPopper from '@opentiny/mobile-utils/deps/vue-popper'
|
||||
import userPopper from '@mobile-root/utils/deps/vue-popper'
|
||||
|
||||
export const toggleItem =
|
||||
(state: IDropdownMenuRenderlessParams['state']) =>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
<script>
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, $prefix, defineComponent } from '../../../vue-common'
|
||||
import { setup, $prefix, defineComponent } from '@mobile-root/vue-common'
|
||||
import Button from '../../button'
|
||||
import { exceptionProps } from './exception'
|
||||
import '@opentiny/vue-theme-mobile/exception/index.less'
|
||||
|
|
|
@ -85,7 +85,7 @@ import type {
|
|||
} from './renderless'
|
||||
import type { downloadFile as ordinaryDownload } from '../../upload-list/src/upload-list'
|
||||
import type { IUploadFormData } from '../../upload/src/upload'
|
||||
import { $props } from '../../../vue-common'
|
||||
import { $props } from '@mobile-root/vue-common'
|
||||
|
||||
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
-->
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, h, defineComponent } from '../../../vue-common'
|
||||
import { setup, h, defineComponent } from '@mobile-root/vue-common'
|
||||
import UploadList from '../../upload-list'
|
||||
import Upload from '../../upload'
|
||||
import { iconUpload } from '@opentiny/vue-icon'
|
||||
|
|
|
@ -29,11 +29,11 @@ import type {
|
|||
IFileUploadLargeDocumentDownload
|
||||
} from '../file-upload'
|
||||
|
||||
import { extend } from '@opentiny/mobile-utils/object'
|
||||
import { xss, log } from '@opentiny/mobile-utils/xss'
|
||||
import uploadAjax from '@opentiny/mobile-utils/deps/upload-ajax'
|
||||
import { isObject } from '@opentiny/mobile-utils/type'
|
||||
import { isEmptyObject } from '@opentiny/mobile-utils/type'
|
||||
import { extend } from '@mobile-root/utils/object'
|
||||
import { xss, log } from '@mobile-root/utils/xss'
|
||||
import uploadAjax from '@mobile-root/utils/deps/upload-ajax'
|
||||
import { isObject } from '@mobile-root/utils/type'
|
||||
import { isEmptyObject } from '@mobile-root/utils/type'
|
||||
|
||||
let initTokenPromise = null
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import type {
|
|||
IFileUploadStreamsaver
|
||||
} from '../file-upload'
|
||||
import { downloadFile as ordinaryDownload } from '../../../upload-list/src/renderless'
|
||||
import { formatFileSize } from '@opentiny/mobile-utils/string'
|
||||
import { formatFileSize } from '@mobile-root/utils/string'
|
||||
|
||||
import {
|
||||
initService,
|
||||
|
@ -96,7 +96,7 @@ import {
|
|||
closeRecordPanel,
|
||||
getTipMessage
|
||||
} from './index'
|
||||
import { isEmptyObject } from '@opentiny/mobile-utils/type'
|
||||
import { isEmptyObject } from '@mobile-root/utils/type'
|
||||
|
||||
export const api = [
|
||||
'state',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { setup, h, $props, defineComponent } from '../../../vue-common'
|
||||
import { setup, h, $props, defineComponent } from '@mobile-root/vue-common'
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
-->
|
||||
<script lang="tsx">
|
||||
import { $prefix, setup, parseVnode, h, defineComponent, isVue2 } from '../../../vue-common'
|
||||
import { $prefix, setup, parseVnode, h, defineComponent, isVue2 } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import LabelWrap from './label-wrap'
|
||||
import Tooltip from '../../tooltip'
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { POSITION, VALIDATE_STATE } from '@opentiny/mobile-utils'
|
||||
import { omitText } from '@opentiny/mobile-utils/string'
|
||||
import { merge } from '@opentiny/mobile-utils/object'
|
||||
import Validator from '@opentiny/mobile-utils/validate'
|
||||
import { isNull } from '@opentiny/mobile-utils/type'
|
||||
import debounce from '@opentiny/mobile-utils/deps/debounce'
|
||||
import { POSITION, VALIDATE_STATE } from '@mobile-root/utils'
|
||||
import { omitText } from '@mobile-root/utils/string'
|
||||
import { merge } from '@mobile-root/utils/object'
|
||||
import Validator from '@mobile-root/utils/validate'
|
||||
import { isNull } from '@mobile-root/utils/type'
|
||||
import debounce from '@mobile-root/utils/deps/debounce'
|
||||
import type {
|
||||
IFormItemRenderlessParams,
|
||||
IFormItemDisplayedValueParam,
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import type { IFormApi } from '@opentiny/vue-renderless/types/form.type'
|
||||
import { formProps } from './form'
|
||||
import '@opentiny/vue-theme-mobile/form/index.less'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { merge } from '@opentiny/mobile-utils/object'
|
||||
import { merge } from '@mobile-root/utils/object'
|
||||
|
||||
import type { IFormRenderlessParams } from '../form'
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { props, setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import {
|
||||
iconClose,
|
||||
iconChevronLeft,
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import { directive } from '../../../vue-common'
|
||||
import { isObject } from '@opentiny/mobile-utils/type'
|
||||
import { directive } from '@mobile-root/vue-common'
|
||||
import { isObject } from '@mobile-root/utils/type'
|
||||
|
||||
class TinyTouch {
|
||||
constructor(element, tinyBinding, type) {
|
||||
|
@ -49,7 +49,7 @@ class TinyTouch {
|
|||
|
||||
this.time = setTimeout(() => {
|
||||
if (this.tinyVueLeave && this.tinyVueMoves) {
|
||||
this.touchType == 'longtap' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.touchType === 'longtap' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.tinyLongTouch = false
|
||||
}
|
||||
}, 1000)
|
||||
|
@ -66,28 +66,28 @@ class TinyTouch {
|
|||
clearTimeout(this.time)
|
||||
|
||||
if (Math.abs(disX) > 10 || Math.abs(disY) > 100) {
|
||||
this.touchType == 'swipe' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.touchType === 'swipe' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
|
||||
if (Math.abs(disX) > Math.abs(disY)) {
|
||||
if (disX > 10) {
|
||||
this.touchType == 'swiperight' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.touchType === 'swiperight' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
}
|
||||
|
||||
if (disX < -10) {
|
||||
this.touchType == 'swipeleft' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.touchType === 'swipeleft' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
}
|
||||
} else {
|
||||
if (disY > 10) {
|
||||
this.touchType == 'swipedown' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.touchType === 'swipedown' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
}
|
||||
|
||||
if (disY < -10) {
|
||||
this.touchType == 'swipeup' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.touchType === 'swipeup' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.tinyLongTouch && this.tinyVueMoves) {
|
||||
this.touchType == 'tap' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.touchType === 'tap' && this.tinyVueCallBack(this.tinyBinding.value, e)
|
||||
this.tinyVueLeave = false
|
||||
}
|
||||
}
|
||||
|
@ -106,6 +106,7 @@ const mapDirective = () => {
|
|||
deactives[name] = directive({
|
||||
vTouch: {
|
||||
bind(el, tinyBinding) {
|
||||
// eslint-disable-next-line no-new
|
||||
new TinyTouch(el, tinyBinding, name)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { KEY_CODE } from '@opentiny/mobile-utils'
|
||||
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
|
||||
import { xss } from '@opentiny/mobile-utils/xss'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
import { KEY_CODE } from '@mobile-root/utils'
|
||||
import PopupManager from '@mobile-root/utils/deps/popup-manager'
|
||||
import { xss } from '@mobile-root/utils/xss'
|
||||
|
||||
const isFirefox = () => !!window.navigator.userAgent.match(/firefox/i)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import '@opentiny/vue-theme-mobile/index-bar-anchor/index.less'
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
|
||||
import '@opentiny/vue-theme-mobile/index-bar/index.less'
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import type { PropType } from '../../../vue-common'
|
||||
import type { PropType } from '@mobile-root/vue-common'
|
||||
import type { ExtractPropTypes, ComputedRef } from 'vue'
|
||||
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { props, setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { iconClose, iconEyeopen, iconEyeclose, iconChevronRight } from '@opentiny/vue-icon'
|
||||
import ActionSheet from '../../action-sheet'
|
||||
import { inputProps } from './input'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { omitText } from '@opentiny/mobile-utils/string'
|
||||
import { omitText } from '@mobile-root/utils/string'
|
||||
import type {
|
||||
IInputApi,
|
||||
IInputClassPrefixConstants,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { KEY_CODE } from '@opentiny/mobile-utils'
|
||||
import { KEY_CODE } from '@mobile-root/utils'
|
||||
|
||||
export const mousedown = (event) => {
|
||||
if (event && event.preventDefault) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { labelProps } from './label'
|
||||
import '@opentiny/vue-theme-mobile/label/index.less'
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import '@opentiny/vue-theme-mobile/list/index.less'
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import afterLeave from '@opentiny/mobile-utils/deps/after-leave'
|
||||
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
|
||||
import { addClass, getStyle, removeClass } from '@opentiny/mobile-utils/deps/dom'
|
||||
import afterLeave from '@mobile-root/utils/deps/after-leave'
|
||||
import PopupManager from '@mobile-root/utils/deps/popup-manager'
|
||||
import { addClass, getStyle, removeClass } from '@mobile-root/utils/deps/dom'
|
||||
import Loading from './mobile.vue'
|
||||
import { hooks, directive, createComponent, appProperties } from '../../../vue-common'
|
||||
import { hooks, directive, createComponent, appProperties } from '@mobile-root/vue-common'
|
||||
import { constants, defaults } from './service'
|
||||
|
||||
const insertDom = (parent, el, binding) => {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { $prefix, setup, $props, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, $props, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import loadingImg from '@opentiny/vue-theme-mobile/images/loading.png'
|
||||
import '@opentiny/vue-theme-mobile/loading/index.less'
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
*/
|
||||
|
||||
import type { ILoadingRenderlessParamUtils, ILoadingRenderlessParams, ILoadingState } from '../loading'
|
||||
import afterLeave from '@opentiny/mobile-utils/deps/after-leave'
|
||||
import { removeClass } from '@opentiny/mobile-utils/deps/dom'
|
||||
import afterLeave from '@mobile-root/utils/deps/after-leave'
|
||||
import { removeClass } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
export const handleAfterLeave = (emit: ILoadingRenderlessParamUtils['emit']) => (): void => {
|
||||
emit('after-leave')
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
|
||||
import { getStyle, addClass } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { createComponent, hooks, appProperties } from '../../../vue-common'
|
||||
import PopupManager from '@mobile-root/utils/deps/popup-manager'
|
||||
import { getStyle, addClass } from '@mobile-root/utils/deps/dom'
|
||||
import { createComponent, hooks, appProperties } from '@mobile-root/vue-common'
|
||||
import Loading from './mobile.vue'
|
||||
|
||||
export const defaults = {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { props, setup, defineComponent, $prefix } from '../../../vue-common'
|
||||
import { props, setup, defineComponent, $prefix } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import '@opentiny/vue-theme-mobile/mask/index.less'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Modal from '../modal'
|
||||
import { extend } from '@opentiny/mobile-utils/object'
|
||||
import { $prefix } from '../../../vue-common'
|
||||
import { extend } from '@mobile-root/utils/object'
|
||||
import { $prefix } from '@mobile-root/vue-common'
|
||||
|
||||
const Message = extend(true, { props: { componentName: { type: String, default: 'Message' } } }, Modal, {
|
||||
name: $prefix + 'Message'
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<script lang="tsx">
|
||||
import { t } from '@opentiny/vue-locale'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import PickerColumn from '../../picker-column'
|
||||
import '@opentiny/vue-theme-mobile/mini-picker/index.less'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
-->
|
||||
<script lang="tsx">
|
||||
import { props, setup, h, defineComponent } from '../../../vue-common'
|
||||
import { setup, h, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import Button from '../../button'
|
||||
import { iconFullscreenLeft, iconMinscreenLeft } from '@opentiny/vue-icon'
|
||||
|
@ -19,9 +19,6 @@ import '@opentiny/vue-theme-mobile/modal/index.less'
|
|||
|
||||
export default defineComponent({
|
||||
props: modalProps,
|
||||
components: {
|
||||
Button
|
||||
},
|
||||
provide() {
|
||||
return { dialog: this }
|
||||
},
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { KEY_CODE } from '@opentiny/mobile-utils'
|
||||
import { on, off, addClass, hasClass, removeClass } from '@opentiny/mobile-utils/deps/dom'
|
||||
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
|
||||
import { getDomNode } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { getViewportWindow } from '@opentiny/mobile-utils/global'
|
||||
import { KEY_CODE } from '@mobile-root/utils'
|
||||
import { on, off, addClass, hasClass, removeClass } from '@mobile-root/utils/deps/dom'
|
||||
import PopupManager from '@mobile-root/utils/deps/popup-manager'
|
||||
import { getDomNode } from '@mobile-root/utils/deps/dom'
|
||||
import { getViewportWindow } from '@mobile-root/utils/global'
|
||||
|
||||
import type {
|
||||
IModalProps,
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { iconChevronDown } from '@opentiny/vue-icon'
|
||||
import Button from '../../button'
|
||||
|
|
|
@ -116,8 +116,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import type { PropType } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent, directive } from '../../../vue-common'
|
||||
import type { PropType } from '@mobile-root/vue-common'
|
||||
import { $prefix, setup, defineComponent, directive } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { iconChevronDown, iconSearch } from '@opentiny/vue-icon'
|
||||
import Button from '../../button'
|
||||
|
@ -125,9 +125,8 @@ import Input from '../../input'
|
|||
import Mask from '../../mask'
|
||||
import MultiSelectItem from '../../multi-select-item'
|
||||
import Wheel from '../../wheel'
|
||||
import Clickoutside from '@opentiny/mobile-utils/deps/clickoutside'
|
||||
import Clickoutside from '@mobile-root/utils/deps/clickoutside'
|
||||
import { t } from '@opentiny/vue-locale'
|
||||
import { multiSelectProps } from './multi-select'
|
||||
import '@opentiny/vue-theme-mobile/multi-select/index.less'
|
||||
|
||||
export default defineComponent({
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import type { PropType } from '../../../vue-common'
|
||||
import type { PropType } from '@mobile-root/vue-common'
|
||||
|
||||
export const multiSelectProps = {
|
||||
dataSource: {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { cloneDeep } from '@opentiny/mobile-utils/object'
|
||||
import { cloneDeep } from '@mobile-root/utils/object'
|
||||
|
||||
export const initValue =
|
||||
({ props, emit }) =>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
-->
|
||||
<script lang="tsx">
|
||||
import { $prefix, h, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, h, defineComponent } from '@mobile-root/vue-common'
|
||||
|
||||
// 此处引入 h 是为了防止打包后 h 被重命名导致组件报错的问题
|
||||
import { iconChevronLeft, iconPlus } from '@opentiny/vue-icon'
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { props, setup, directive, defineComponent } from '../../../vue-common'
|
||||
import bind from '@opentiny/mobile-utils/deps/repeat-click'
|
||||
import { setup, directive, defineComponent } from '@mobile-root/vue-common'
|
||||
import bind from '@mobile-root/utils/deps/repeat-click'
|
||||
import { iconChevronDown, iconChevronUp, iconMinus, iconPlus } from '@opentiny/vue-icon'
|
||||
import { numericProps } from './numeric'
|
||||
import '@opentiny/vue-theme-mobile/numeric/index.less'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
import type { ExtractPropTypes } from 'vue'
|
||||
import type { BigIntDecimal } from '@opentiny/mobile-utils/bigInt'
|
||||
import type { BigIntDecimal } from '@mobile-root/utils/bigInt'
|
||||
import type {
|
||||
focus,
|
||||
select,
|
||||
|
@ -42,6 +42,7 @@ import type {
|
|||
handleChange
|
||||
} from './renderless'
|
||||
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
|
||||
|
||||
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
|
||||
|
||||
export const $constants = {
|
||||
|
|
|
@ -18,12 +18,12 @@ import type {
|
|||
INumericGetEmitValueParams,
|
||||
INumericUnitPrecision
|
||||
} from '../numeric'
|
||||
import type { BigIntDecimal } from '@opentiny/mobile-utils/bigInt'
|
||||
import { formatNumber, roundFixed } from '@opentiny/mobile-utils/decimal'
|
||||
import { getMiniDecimal, lessEquals, equalsDecimal } from '@opentiny/mobile-utils/bigInt'
|
||||
import { isNumber, isNull } from '@opentiny/mobile-utils/type'
|
||||
import { MOUSEDELTA } from '@opentiny/mobile-utils'
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import type { BigIntDecimal } from '@mobile-root/utils/bigInt'
|
||||
import { formatNumber, roundFixed } from '@mobile-root/utils/decimal'
|
||||
import { getMiniDecimal, lessEquals, equalsDecimal } from '@mobile-root/utils/bigInt'
|
||||
import { isNumber, isNull } from '@mobile-root/utils/type'
|
||||
import { MOUSEDELTA } from '@mobile-root/utils'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
export const initService = (
|
||||
service: INumericRenderlessParamUtils['service']
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import '@opentiny/vue-theme-mobile/picker-column/index.less'
|
||||
|
||||
export default defineComponent({
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
export const computedWrapperStyle = (state) => () => {
|
||||
const wrapperStyle = {
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { props, setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { popoverProps } from './popover'
|
||||
import '@opentiny/vue-theme-mobile/popover/index.less'
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
*
|
||||
*/
|
||||
import type { IPopoverRenderlessParams, IPopoverState } from '../popover'
|
||||
import { on, off, addClass, removeClass } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { guid } from '@opentiny/mobile-utils/string'
|
||||
import { KEY_CODE } from '@opentiny/mobile-utils'
|
||||
import { on, off, addClass, removeClass } from '@mobile-root/utils/deps/dom'
|
||||
import { guid } from '@mobile-root/utils/string'
|
||||
import { KEY_CODE } from '@mobile-root/utils'
|
||||
|
||||
const processTrigger = ({
|
||||
api,
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
handleItemClick,
|
||||
observeCallback
|
||||
} from './index'
|
||||
import userPopper from '@opentiny/mobile-utils/deps/vue-popper'
|
||||
import userPopper from '@mobile-root/utils/deps/vue-popper'
|
||||
import type {
|
||||
IPopoverApi,
|
||||
IPopoverProps,
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { setup, $prefix, $props, defineComponent } from '../../../vue-common'
|
||||
import { setup, $prefix, $props, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { iconClose } from '@opentiny/vue-icon'
|
||||
import '@opentiny/vue-theme-mobile/popup/index.less'
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { touchStart, touchMove } from '@opentiny/mobile-utils/deps/touch'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
import { touchStart, touchMove } from '@mobile-root/utils/deps/touch'
|
||||
import { getScroller } from '../../../dropdown-menu/src/renderless'
|
||||
import { isNull } from '@opentiny/mobile-utils/type'
|
||||
import { isNull } from '@mobile-root/utils/type'
|
||||
|
||||
export const getStyle = (props) => () => {
|
||||
const style = { ...props.popupStyle }
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { iconClose, iconSuccessful, iconError, iconYes, iconWarning } from '@opentiny/vue-icon'
|
||||
import '@opentiny/vue-theme-mobile/progress/index.less'
|
||||
import { progressProps } from './progress'
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="tsx">
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { pullRefreshProps } from './pull-refresh'
|
||||
import '@opentiny/vue-theme-mobile/pull-refresh/index.less'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
// 上拉触发事件超时时间
|
||||
const PULL_UP_TIME_OUT = 300
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import Radio from '../../radio'
|
||||
import { radioGroupProps } from './radio-group'
|
||||
import type { IRadioGroupApi } from './radio-group'
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
import type { IRadioGroupRenderlessParams } from '../radio-group'
|
||||
import { KEY_CODE } from '@opentiny/mobile-utils'
|
||||
import { KEY_CODE } from '@mobile-root/utils'
|
||||
|
||||
export const handleKeydown =
|
||||
(parent: IRadioGroupRenderlessParams['parent']) =>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { props, setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { radioProps } from './radio'
|
||||
import '@opentiny/vue-theme-mobile/radio/index.less'
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { iconSearch, iconClose } from '@opentiny/vue-icon'
|
||||
import '@opentiny/vue-theme-mobile/search/index.less'
|
||||
import type { ISearchApi } from './search'
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
*
|
||||
*/
|
||||
import type { ISearchRenderlessParams, ISearchValue } from '../search'
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
|
||||
import { isObject, typeOf } from '@opentiny/mobile-utils/type'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
import PopupManager from '@mobile-root/utils/deps/popup-manager'
|
||||
import { isObject, typeOf } from '@mobile-root/utils/type'
|
||||
|
||||
export const emitInput =
|
||||
({ emit }: Pick<ISearchRenderlessParams, 'emit'>) =>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import type { ISliderApi } from './slider'
|
||||
import { sliderProps } from './slider'
|
||||
import '@opentiny/vue-theme-mobile/slider/index.less'
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { KEY_CODE } from '@opentiny/mobile-utils'
|
||||
import { emitEvent } from '@opentiny/mobile-utils/event'
|
||||
import { on, off, hasClass } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { toNumber } from '@opentiny/mobile-utils/string'
|
||||
import { KEY_CODE } from '@mobile-root/utils'
|
||||
import { emitEvent } from '@mobile-root/utils/event'
|
||||
import { on, off, hasClass } from '@mobile-root/utils/deps/dom'
|
||||
import { toNumber } from '@mobile-root/utils/string'
|
||||
import type { ISliderApi, ISliderRenderlessParams, ISliderState } from '../slider'
|
||||
|
||||
export const bindEvent = (api: ISliderApi) => () => {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import '@opentiny/vue-theme-mobile/switch/index.less'
|
||||
import { switchProps } from './switch'
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import type { ITabItemApi } from '@opentiny/vue-renderless/types/tab-item.type'
|
||||
import { tabItemProps } from './tab-item'
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { $props, $prefix, setup, defineComponent } from '../../../vue-common'
|
||||
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { tabbarItemProps } from './tabbar-item'
|
||||
import '@opentiny/vue-theme-mobile/tabbar-item/index.less'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { isObject, isNull } from '@opentiny/mobile-utils/type'
|
||||
import { isObject, isNull } from '@mobile-root/utils/type'
|
||||
|
||||
export const getRouteActive =
|
||||
({ props, route }) =>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
import { getRouteActive, onClick, bindChildren, routeTab, getTabbarItemsWidth } from './index'
|
||||
import { xss } from '@opentiny/mobile-utils'
|
||||
import { xss } from '@mobile-root/utils'
|
||||
|
||||
export const api = ['state', 'onClick', 'getTabbarItemsWidth']
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { setup, $prefix, defineComponent } from '../../../vue-common'
|
||||
import { setup, $prefix, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { tabbarProps } from './tabbar'
|
||||
import '@opentiny/vue-theme-mobile/tabbar/index.less'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { off } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
export const setActiveItem =
|
||||
({ props, state }) =>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
import { setActiveItem, onChange, getChildrens, getItems, beforeDestroy, initPage } from './index'
|
||||
import { on } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { on } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
export const api = ['state', 'onChange', 'getChildrens']
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { iconRadioselected, iconRadio, iconCheck, iconCheckedSur, iconHalfselect } from '@opentiny/vue-icon'
|
||||
import { tableProps } from './table'
|
||||
import '@opentiny/vue-theme-mobile/table/index.less'
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
-->
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, h, defineComponent } from '../../../vue-common'
|
||||
import { setup, h, defineComponent } from '@mobile-root/vue-common'
|
||||
import TabNav from './tab-nav/mb.vue'
|
||||
import { iconPlus } from '@opentiny/vue-icon'
|
||||
import { touchStart, touchMove } from '@opentiny/mobile-utils/deps/touch'
|
||||
import { touchStart, touchMove } from '@mobile-root/utils/deps/touch'
|
||||
import '@opentiny/vue-theme-mobile/tabs/index.less'
|
||||
import type { ITabsApi } from './tabs'
|
||||
import { tabsProps } from './tabs'
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
*
|
||||
*/
|
||||
import type { ITabNavRenderlessParams } from '../tab-nav'
|
||||
import { KEY_CODE, POSITION } from '@opentiny/mobile-utils'
|
||||
import { capitalize } from '@opentiny/mobile-utils/string'
|
||||
import { addResizeListener, removeResizeListener } from '@opentiny/mobile-utils/deps/resize-event'
|
||||
import { on, off } from '@opentiny/mobile-utils/deps/dom'
|
||||
import { KEY_CODE, POSITION } from '@mobile-root/utils'
|
||||
import { capitalize } from '@mobile-root/utils/string'
|
||||
import { addResizeListener, removeResizeListener } from '@mobile-root/utils/deps/resize-event'
|
||||
import { on, off } from '@mobile-root/utils/deps/dom'
|
||||
|
||||
export const computedNavStyle = (state: ITabNavRenderlessParams['state']): { transform: string; width?: string } => {
|
||||
const dir = ~[POSITION.Top, POSITION.Bottom].indexOf(state.rootTabs.position) ? 'X' : 'Y'
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { props, setup, h, defineComponent } from '../../../vue-common'
|
||||
import { setup, h, defineComponent } from '@mobile-root/vue-common'
|
||||
import { tagProps } from './tag'
|
||||
import type { ITagApi } from '@opentiny/vue-renderless/types/tag.type'
|
||||
import '@opentiny/vue-theme-mobile/tag/index.less'
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
|
||||
<script lang="tsx">
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import { setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { iconYes } from '@opentiny/vue-icon'
|
||||
import { timelineProps } from './time-line'
|
||||
import '@opentiny/vue-theme-mobile/steps/index.less'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { format } from '@opentiny/mobile-utils/date'
|
||||
import { format } from '@mobile-root/utils/date'
|
||||
import type {
|
||||
ITimelineProps,
|
||||
ITimelineRenderlessParams,
|
||||
|
|
|
@ -9,10 +9,11 @@
|
|||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import type { PropType } from '../../../vue-common'
|
||||
import type { PropType } from '@mobile-root/vue-common'
|
||||
import type { ExtractPropTypes } from 'vue'
|
||||
import type { toggleFold } from './renderless'
|
||||
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
|
||||
|
||||
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
|
||||
|
||||
export const $constants = {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { props, setup, defineComponent } from '../../../vue-common'
|
||||
import { setup, defineComponent } from '@mobile-root/vue-common'
|
||||
import { renderless, api } from './renderless/vue'
|
||||
import '@opentiny/vue-theme-mobile/toast/index.less'
|
||||
import { IconMobileErrorWhite, IconMobileSuccessWhite } from '@opentiny/vue-icon'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import { createComponent } from '../../../vue-common'
|
||||
import { createComponent } from '@mobile-root/vue-common'
|
||||
import Toast from './mobile.vue'
|
||||
|
||||
const defaults = {
|
||||
|
|
|
@ -22,7 +22,7 @@ import {
|
|||
defineComponent,
|
||||
isEmptyVnode,
|
||||
hooks
|
||||
} from '../../../vue-common'
|
||||
} from '@mobile-root/vue-common'
|
||||
import type { ITooltipApi, ITinyVm } from './tooltip'
|
||||
import { tooltipProps } from './tooltip'
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue