Skip to content

Commit

Permalink
feat(mobile): optimize the mobile common package name and import path…
Browse files Browse the repository at this point in the history
… and improve xss dependency (#2777)

* feat(mobile): optimize the mobile common package name and import path, and improve xss dependency

* feat(mobile): optimize the mobile common package name and import path, and improve xss dependency
  • Loading branch information
zzcr authored Jan 10, 2025
1 parent 3502466 commit 478c7e3
Show file tree
Hide file tree
Showing 78 changed files with 74 additions and 74 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/mobile/components/action-sheet/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import '@opentiny/vue-theme-mobile/action-sheet/index.less'
import BScroll from '@better-scroll/core'
import { actionSheetProps } from './action-sheet'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/alert/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { iconClose, iconSuccess, iconError, iconHelp, iconWarningTriangle } from '@opentiny/vue-icon'
import type { IAlertApi } from './alert'
import { alertProps } from './alert'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/avatar/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { $prefix, setup, h, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, h, defineComponent } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/avatar/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/badge/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { badgeProps } from './badge'
import '@opentiny/vue-theme-mobile/badge/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/button/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { buttonProps } from './button'
import '@opentiny/vue-theme-mobile/button/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/checkbox-group/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import Checkbox from '../../checkbox'
import { CheckboxGroupProps } from './checkbox-group'
import '@opentiny/vue-theme-mobile/checkbox-group/index.less'
Expand Down
4 changes: 2 additions & 2 deletions packages/mobile/components/checkbox/src/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { $prefix } from '@mobile-root/vue-common'
import type { PropType } from '@mobile-root/vue-common'
import { $prefix } from '@mobile-root/common'
import type { PropType } from '@mobile-root/common'
import type { ExtractPropTypes, ComputedRef } from 'vue'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/checkbox/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import { checkboxProps } from './checkbox'
import '@opentiny/vue-theme-mobile/checkbox/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/container/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { containerProps } from './container'
import '@opentiny/vue-theme-mobile/container/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/date-picker/src/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import type { PropType } from '@mobile-root/vue-common'
import type { PropType } from '@mobile-root/common'
import { iconClose } from '@opentiny/vue-icon'
import type { ComputedRef, ExtractPropTypes } from 'vue'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/date-picker/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</template>

<script lang="ts">
import { props, setup, defineComponent } from '@mobile-root/vue-common'
import { props, setup, defineComponent } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import MiniPicker from '../../mini-picker'
import Input from '../../input'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/dialog-box/src/dialog-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/

import { $prefix } from '@mobile-root/vue-common'
import { $prefix } from '@mobile-root/common'
import type { ExtractPropTypes } from 'vue'
import type {
handleCancel,
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/dialog-box/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { dialogBoxProps } from './dialog-box'
import '@opentiny/vue-theme-mobile/dialog-box/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/dropdown-item/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent, directive } from '@mobile-root/vue-common'
import { setup, defineComponent, directive } from '@mobile-root/common'
import { iconYes } from '@opentiny/vue-icon'
import Popup from '../../popup'
import Button from '../../button'
Expand Down
6 changes: 3 additions & 3 deletions packages/mobile/components/dropdown-menu/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
item.type === 'filter'
? 'IconUnfilter'
: item.type === 'selection' && item.state.showPopup
? 'IconUp'
: 'IconDown'
? 'IconUp'
: 'IconDown'
"
:class="[item.type === 'filter' ? 'filter-icon' : '']"
/>
Expand All @@ -68,7 +68,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent, directive } from '@mobile-root/vue-common'
import { setup, defineComponent, directive } from '@mobile-root/common'
import { iconUp, iconDown, iconUnfilter, iconSort, iconDeltaDown, iconDeltaUp } from '@opentiny/vue-icon'
import { dropdownMenuProps } from './dropdown-menu'
import Clickoutside from '@mobile-root/utils/deps/clickoutside'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/exception/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<script>
import { renderless, api } from './renderless/vue'
import { setup, $prefix, defineComponent } from '@mobile-root/vue-common'
import { setup, $prefix, defineComponent } from '@mobile-root/common'
import Button from '../../button'
import { exceptionProps } from './exception'
import '@opentiny/vue-theme-mobile/exception/index.less'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/file-upload/src/file-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '@mobile-root/vue-common'
import { $props } from '@mobile-root/common'

export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/file-upload/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-->
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { setup, h, defineComponent } from '@mobile-root/vue-common'
import { setup, h, defineComponent } from '@mobile-root/common'
import UploadList from '../../upload-list'
import Upload from '../../upload'
import { iconUpload } from '@opentiny/vue-icon'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/form-item/src/label-wrap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setup, h, $props, defineComponent } from '@mobile-root/vue-common'
import { setup, h, $props, defineComponent } from '@mobile-root/common'

export default defineComponent({
props: {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/form-item/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { $prefix, setup, parseVnode, h, defineComponent, isVue2 } from '@mobile-root/vue-common'
import { $prefix, setup, parseVnode, h, defineComponent, isVue2 } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import LabelWrap from './label-wrap'
import Tooltip from '../../tooltip'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/form/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import type { IFormApi } from '@opentiny/vue-renderless/types/form.type'
import { formProps } from './form'
import '@opentiny/vue-theme-mobile/form/index.less'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/image-viewer/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import {
iconClose,
iconChevronLeft,
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/image-viewer/src/mobileTouch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { directive } from '@mobile-root/vue-common'
import { directive } from '@mobile-root/common'
import { isObject } from '@mobile-root/utils/type'

class TinyTouch {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/index-bar-anchor/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</template>

<script lang="ts">
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/index-bar-anchor/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/index-bar/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</template>

<script lang="ts">
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'

import '@opentiny/vue-theme-mobile/index-bar/index.less'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/input/src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import type { PropType } from '@mobile-root/vue-common'
import type { PropType } from '@mobile-root/common'
import type { ExtractPropTypes, ComputedRef } from 'vue'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/input/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { iconClose, iconEyeopen, iconEyeclose, iconChevronRight } from '@opentiny/vue-icon'
import ActionSheet from '../../action-sheet'
import { inputProps } from './input'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/label/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { setup, defineComponent } from '@mobile-root/common'
import { labelProps } from './label'
import '@opentiny/vue-theme-mobile/label/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/list/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</template>

<script lang="ts">
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/list/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/loading/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
import service from './src/service'
import directive from './src/directive'
import { setupComponent } from '../../vue-common'
import { setupComponent } from '@mobile-root/common'

const Loadings: any = {
install(app) {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/loading/src/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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 '@mobile-root/vue-common'
import { hooks, directive, createComponent, appProperties } from '@mobile-root/common'
import { constants, defaults } from './service'

const insertDom = (parent, el, binding) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/loading/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>

<script lang="ts">
import { $prefix, setup, $props, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, $props, defineComponent } from '@mobile-root/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'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/loading/src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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 { createComponent, hooks, appProperties } from '@mobile-root/common'
import Loading from './mobile.vue'

export const defaults = {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/mask/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</template>

<script lang="ts">
import { props, setup, defineComponent, $prefix } from '@mobile-root/vue-common'
import { props, setup, defineComponent, $prefix } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/mask/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/message/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Modal from '../modal'
import { extend } from '@mobile-root/utils/object'
import { $prefix } from '@mobile-root/vue-common'
import { $prefix } from '@mobile-root/common'

const Message = extend(true, { props: { componentName: { type: String, default: 'Message' } } }, Modal, {
name: $prefix + 'Message'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/mini-picker/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<script lang="tsx">
import { t } from '@opentiny/vue-locale'
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import PickerColumn from '../../picker-column'
import '@opentiny/vue-theme-mobile/mini-picker/index.less'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/

import { createComponent, setupComponent } from '../../vue-common'
import { createComponent, setupComponent } from '@mobile-root/common'
import { MsgQueue } from './src/renderless'
import TINYModal from './src/mobile.vue'

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/modal/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { setup, h, defineComponent } from '@mobile-root/vue-common'
import { setup, h, defineComponent } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import Button from '../../button'
import { iconFullscreenLeft, iconMinscreenLeft } from '@opentiny/vue-icon'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</template>

<script lang="ts">
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import { iconChevronDown } from '@opentiny/vue-icon'
import Button from '../../button'
Expand Down
4 changes: 2 additions & 2 deletions packages/mobile/components/multi-select/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
</template>

<script lang="ts">
import type { PropType } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent, directive } from '@mobile-root/vue-common'
import type { PropType } from '@mobile-root/common'
import { $prefix, setup, defineComponent, directive } from '@mobile-root/common'
import { renderless, api } from './renderless/vue'
import { iconChevronDown, iconSearch } from '@opentiny/vue-icon'
import Button from '../../button'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import type { PropType } from '@mobile-root/vue-common'
import type { PropType } from '@mobile-root/common'

export const multiSelectProps = {
dataSource: {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/nav-bar/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { $prefix, h, defineComponent } from '@mobile-root/vue-common'
import { $prefix, h, defineComponent } from '@mobile-root/common'

// 此处引入 h 是为了防止打包后 h 被重命名导致组件报错的问题
import { iconChevronLeft, iconPlus } from '@opentiny/vue-icon'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/components/numeric/src/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { setup, directive, defineComponent } from '@mobile-root/vue-common'
import { setup, directive, defineComponent } from '@mobile-root/common'
import bind from '@mobile-root/utils/deps/repeat-click'
import { iconChevronDown, iconChevronUp, iconMinus, iconPlus } from '@opentiny/vue-icon'
import { numericProps } from './numeric'
Expand Down
Loading

0 comments on commit 478c7e3

Please sign in to comment.