如何从AngularJS中具有自己的范围*的自定义指令*中访问父作用域?

本文翻译自:How to access parent scope from within a custom directive *with own scope* in AngularJS?

I'm looking for any manner of accessing the "parent" scope within a directive. 我正在寻找任何方式访问指令中的“父”范围。 Any combination of scope, transclude, require, passing in variables (or the scope itself) from above, etc. I'm totally willing to bend over backwards, but I want to avoid something totally hacky or unmaintainable. 范围,转换,要求的任何组合,从上面传递变量(或范围本身)等。我完全愿意向后弯腰,但我想避免一些完全hacky或不可维护的东西。 For example, I know I could do it right now by taking the $scope from the preLink parameters and iterating over it's $sibling scopes to find the conceptual "parent". 例如,我知道我现在可以通过从preLink参数获取$scope并迭代它的$sibling范围来找到概念性的“parent”。

What I really want is to be able to $watch an expression in the parent scope. 我真正想要的是能够在父范围内$watch表达式。 If I can do that, then I can accomplish what I'm trying to do over here: AngularJS - How to render a partial with variables? 如果我能做到这一点,那么我可以完成我在这里要做的事情: AngularJS - 如何使用变量渲染部分?

An important note is that the directive must be re-usable within the same parent scope. 重要的一点是,该指令必须可以在同一父范围内重复使用。 Therefore the default behavior (scope: false) doesn't work for me. 因此默认行为(范围:false)对我不起作用。 I need an individual scope per instance of the directive, and then I need to $watch a variable that lives in the parent scope. 我需要每个指令实例都有一个单独的范围,然后我需要$watch一个存在于父范围内的变量。

A code sample is worth 1000 words, so: 代码示例值1000个单词,因此:

app.directive('watchingMyParentScope', function() {
    return {
        require: /* ? */,
        scope: /* ? */,
        transclude: /* ? */,
        controller: /* ? */,
        compile: function(el,attr,trans) {
            // Can I get the $parent from the transclusion function somehow?
            return {
                pre: function($s, $e, $a, parentControl) {
                    // Can I get the $parent from the parent controller?
                    // By setting this.$scope = $scope from within that controller?

                    // Can I get the $parent from the current $scope?

                    // Can I pass the $parent scope in as an attribute and define
                    // it as part of this directive's scope definition?

                    // What don't I understand about how directives work and
                    // how their scope is related to their parent?
                },
                post: function($s, $e, $a, parentControl) {
                    // Has my situation improved by the time the postLink is called?
                }
            }
        }
    };
});

#1楼

参考:https://stackoom.com/question/1D6ev/如何从AngularJS中具有自己的范围-的自定义指令-中访问父作用域


#2楼

 scope: false
 transclude: false

and you will have the same scope(with parent element) 你将拥有相同的范围(与父元素)

$scope.$watch(...

There are a lot of ways how to access parent scope depending on this two options scope& transclude. 根据这两个选项范围和转换​​,有很多方法可以访问父作用域。


#3楼

See What are the nuances of scope prototypal / prototypical inheritance in AngularJS? 请参阅AngularJS中范围原型/原型继承的细微差别是什么?

To summarize: the way a directive accesses its parent ( $parent ) scope depends on the type of scope the directive creates: 总结一下:指令访问其父( $parent )范围的方式取决于指令创建的范围类型:

  1. default ( scope: false ) - the directive does not create a new scope, so there is no inheritance here. default( scope: false ) - 指令不创建新范围,因此这里没有继承。 The directive's scope is the same scope as the parent/container. 该指令的作用域与父/容器的作用域相同。 In the link function, use the first parameter (typically scope ). 在link函数中,使用第一个参数(通常是scope )。

  2. scope: true - the directive creates a new child scope that prototypically inherits from the parent scope. scope: true - 该指令创建一个原型继承自父作用域的新子作用域。 Properties that are defined on the parent scope are available to the directive scope (because of prototypal inheritance). 在父作用域上定义的属性可用于指令scope (因为原型继承)。 Just beware of writing to a primitive scope property -- that will create a new property on the directive scope (that hides/shadows the parent scope property of the same name). 只要注意写入原始范围属性 - 这将在指令范围上创建一个新属性(隐藏/隐藏同名的父范围属性)。

  3. scope: { ... } - the directive creates a new isolate/isolated scope. scope: { ... } - 该指令创建一个新的隔离/隔离范围。 It does not prototypically inherit the parent scope. 它没有原型继承父作用域。 You can still access the parent scope using $parent , but this is not normally recommended. 您仍然可以使用$parent访问父作用域,但通常不建议这样做。 Instead, you should specify which parent scope properties (and/or function) the directive needs via additional attributes on the same element where the directive is used, using the = , @ , and & notation. 相反,您应该使用=@& notation通过使用指令的同一元素上的附加属性指定指令需要哪些父作用域属性(和/或函数)。

  4. transclude: true - the directive creates a new "transcluded" child scope, which prototypically inherits from the parent scope. transclude: true - 该指令创建一个新的“transcluded”子作用域,它原型继承自父作用域。 If the directive also creates an isolate scope, the transcluded and the isolate scopes are siblings. 如果该指令还创建了隔离范围,则transcluded和隔离范围是兄弟。 The $parent property of each scope references the same parent scope. 每个范围的$parent属性引用相同的父范围。
    Angular v1.3 update : If the directive also creates an isolate scope, the transcluded scope is now a child of the isolate scope. Angular v1.3 update :如果该指令还创建了隔离范围,则transcluded范围现在是隔离范围的子代。 The transcluded and isolate scopes are no longer siblings. 被抄袭和隔离的范围不再是兄弟姐妹。 The $parent property of the transcluded scope now references the isolate scope. transcluded范围的$parent属性现在引用隔离范围。

The above link has examples and pictures of all 4 types. 以上链接包含所有4种类型的示例和图片。

You cannot access the scope in the directive's compile function (as mentioned here: https://github.com/angular/angular.js/wiki/Understanding-Directives ). 您无法访问指令编译函数中的作用域(如此处所述: https//github.com/angular/angular.js/wiki/Understanding-Directives )。 You can access the directive's scope in the link function. 您可以在链接功能中访问指令的范围。

Watching: 观看:

For 1. and 2. above: normally you specify which parent property the directive needs via an attribute, then $watch it: 对于1.和2.上面:通常你通过属性指定指令需要哪个父属性,然后$ watch it:

<div my-dir attr1="prop1"></div>

scope.$watch(attrs.attr1, function() { ... });

If you are watching an object property, you'll need to use $parse: 如果您正在观看对象属性,则需要使用$ parse:

<div my-dir attr2="obj.prop2"></div>

var model = $parse(attrs.attr2);
scope.$watch(model, function() { ... });

For 3. above (isolate scope), watch the name you give the directive property using the @ or = notation: 对于3. above(隔离范围),请使用@=表示法查看指定属性的名称:

<div my-dir attr3="{{prop3}}" attr4="obj.prop4"></div>

scope: {
  localName3: '@attr3',
  attr4:      '='  // here, using the same name as the attribute
},
link: function(scope, element, attrs) {
   scope.$watch('localName3', function() { ... });
   scope.$watch('attr4',      function() { ... });

#4楼

Here's a trick I used once: create a "dummy" directive to hold the parent scope and place it somewhere outside the desired directive. 这是我曾经使用过的一个技巧:创建一个“虚拟”指令来保存父范围并将其放在所需指令之外的某个位置。 Something like: 就像是:

module.directive('myDirectiveContainer', function () {
    return {
        controller: function ($scope) {
            this.scope = $scope;
        }
    };
});

module.directive('myDirective', function () {
    return {
        require: '^myDirectiveContainer',
        link: function (scope, element, attrs, containerController) {
            // use containerController.scope here...
        }
    };
});

and then 然后

<div my-directive-container="">
    <div my-directive="">
    </div>
</div>

Maybe not the most graceful solution, but it got the job done. 也许不是最优雅的解决方案,但它完成了工作。


#5楼

Accessing controller method means accessing a method on parent scope from directive controller/link/scope. 访问控制器方法意味着从指令控制器/链接/范围访问父作用域上的方法。

If the directive is sharing/inheriting the parent scope then it is quite straight forward to just invoke a parent scope method. 如果指令是共享/继承父作用域,则只需调用父作用域方法就可以了。

Little more work is required when you want to access parent scope method from Isolated directive scope. 当您想要从Isolated指令范围访问父范围方法时,需要做更多的工作。

There are few options (may be more than listed below) to invoke a parent scope method from isolated directives scope or watch parent scope variables ( option#6 specially). 从隔离指令范围调用父作用域方法或监视父作用域变量(特别是选项#6 ),几乎没有选项(可能比下面列出的更多)。

Note that I used link function in these examples but you can use a directive controller as well based on requirement. 请注意 ,我在这些示例中使用了link function ,但您也可以根据需要使用directive controller

Option#1. 选项1。 Through Object literal and from directive html template 通过Object文字和指令html模板

index.html

<!DOCTYPE html>
<html ng-app="plunker">

  <head>
    <meta charset="utf-8" />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <link rel="stylesheet" href="style.css" />
    <script data-require="angular.js@1.3.x" src="https://code.angularjs.org/1.3.9/angular.js" data-semver="1.3.9"></script>
    <script src="app.js"></script>
  </head>

  <body ng-controller="MainCtrl">
    <p>Hello {{name}}!</p>

    <p> Directive Content</p>
    <sd-items-filter selected-items="selectedItems" selected-items-changed="selectedItemsChanged(selectedItems)" items="items"> </sd-items-filter>


    <P style="color:red">Selected Items (in parent controller) set to: {{selectedItemsReturnedFromDirective}} </p>

  </body>

</html>

itemfilterTemplate.html

<select ng-model="selectedItems" multiple="multiple" style="height: 200px; width: 250px;" ng-change="selectedItemsChanged({selectedItems:selectedItems})" ng-options="item.id as item.name group by item.model for item in items | orderBy:'name'">
  <option>--</option>
</select>

app.js

var app = angular.module('plunker', []);

app.directive('sdItemsFilter', function() {
  return {
    restrict: 'E',
    scope: {
      items: '=',
      selectedItems: '=',
      selectedItemsChanged: '&'
    },
    templateUrl: "itemfilterTemplate.html"
  }
})

app.controller('MainCtrl', function($scope) {
  $scope.name = 'TARS';

  $scope.selectedItems = ["allItems"];

  $scope.selectedItemsChanged = function(selectedItems1) {
    $scope.selectedItemsReturnedFromDirective = selectedItems1;
  }

  $scope.items = [{
    "id": "allItems",
    "name": "All Items",
    "order": 0
  }, {
    "id": "CaseItem",
    "name": "Case Item",
    "model": "PredefinedModel"
  }, {
    "id": "Application",
    "name": "Application",
    "model": "Bank"
    }]

});

working plnkr: http://plnkr.co/edit/rgKUsYGDo9O3tewL6xgr?p=preview 工作plnkr: http ://plnkr.co/edit/rgKUsYGDo9O3tewL6xgr?p=preview

Option#2. 选项#2。 Through Object literal and from directive link/scope 通过Object文字和指令链接/范围

index.html

<!DOCTYPE html>
<html ng-app="plunker">

  <head>
    <meta charset="utf-8" />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <link rel="stylesheet" href="style.css" />
    <script data-require="angular.js@1.3.x" src="https://code.angularjs.org/1.3.9/angular.js" data-semver="1.3.9"></script>
    <script src="app.js"></script>
  </head>

  <body ng-controller="MainCtrl">
    <p>Hello {{name}}!</p>

    <p> Directive Content</p>
    <sd-items-filter selected-items="selectedItems" selected-items-changed="selectedItemsChanged(selectedItems)" items="items"> </sd-items-filter>


    <P style="color:red">Selected Items (in parent controller) set to: {{selectedItemsReturnedFromDirective}} </p>

  </body>

</html>

itemfilterTemplate.html

<select ng-model="selectedItems" multiple="multiple" style="height: 200px; width: 250px;" 
 ng-change="selectedItemsChangedDir()" ng-options="item.id as item.name group by item.model for item in items | orderBy:'name'">
  <option>--</option>
</select>

app.js

var app = angular.module('plunker', []);

app.directive('sdItemsFilter', function() {
  return {
    restrict: 'E',
    scope: {
      items: '=',
      selectedItems: '=',
      selectedItemsChanged: '&'
    },
    templateUrl: "itemfilterTemplate.html",
    link: function (scope, element, attrs){
      scope.selectedItemsChangedDir = function(){
        scope.selectedItemsChanged({selectedItems:scope.selectedItems});  
      }
    }
  }
})

app.controller('MainCtrl', function($scope) {
  $scope.name = 'TARS';

  $scope.selectedItems = ["allItems"];

  $scope.selectedItemsChanged = function(selectedItems1) {
    $scope.selectedItemsReturnedFromDirective = selectedItems1;
  }

  $scope.items = [{
    "id": "allItems",
    "name": "All Items",
    "order": 0
  }, {
    "id": "CaseItem",
    "name": "Case Item",
    "model": "PredefinedModel"
  }, {
    "id": "Application",
    "name": "Application",
    "model": "Bank"
    }]
});

working plnkr: http://plnkr.co/edit/BRvYm2SpSpBK9uxNIcTa?p=preview 工作plnkr: http ://plnkr.co/edit/BRvYm2SpSpBK9uxNIcTa?p=preview

Option#3. 选项#3。 Through Function reference and from directive html template 通过Function参考和指令html模板

index.html

<!DOCTYPE html>
<html ng-app="plunker">

  <head>
    <meta charset="utf-8" />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <link rel="stylesheet" href="style.css" />
    <script data-require="angular.js@1.3.x" src="https://code.angularjs.org/1.3.9/angular.js" data-semver="1.3.9"></script>
    <script src="app.js"></script>
  </head>

  <body ng-controller="MainCtrl">
    <p>Hello {{name}}!</p>

    <p> Directive Content</p>
    <sd-items-filter selected-items="selectedItems" selected-items-changed="selectedItemsChanged" items="items"> </sd-items-filter>


    <P style="color:red">Selected Items (in parent controller) set to: {{selectedItemsReturnFromDirective}} </p>

  </body>

</html>

itemfilterTemplate.html

<select ng-model="selectedItems" multiple="multiple" style="height: 200px; width: 250px;" 
 ng-change="selectedItemsChanged()(selectedItems)" ng-options="item.id as item.name group by item.model for item in items | orderBy:'name'">
  <option>--</option>
</select>

app.js

var app = angular.module('plunker', []);

app.directive('sdItemsFilter', function() {
  return {
    restrict: 'E',
    scope: {
      items: '=',
      selectedItems:'=',
      selectedItemsChanged: '&'
    },
    templateUrl: "itemfilterTemplate.html"
  }
})

app.controller('MainCtrl', function($scope) {
  $scope.name = 'TARS';

  $scope.selectedItems = ["allItems"];

  $scope.selectedItemsChanged = function(selectedItems1) {
    $scope.selectedItemsReturnFromDirective = selectedItems1;
  }

  $scope.items = [{
    "id": "allItems",
    "name": "All Items",
    "order": 0
  }, {
    "id": "CaseItem",
    "name": "Case Item",
    "model": "PredefinedModel"
  }, {
    "id": "Application",
    "name": "Application",
    "model": "Bank"
    }]
});

working plnkr: http://plnkr.co/edit/Jo6FcYfVXCCg3vH42BIz?p=preview 工作plnkr: http ://plnkr.co/edit/Jo6FcYfVXCCg3vH42BIz?p =preview

Option#4. 第4个选项。 Through Function reference and from directive link/scope 通过函数引用和指令链接/范围

index.html

<!DOCTYPE html>
<html ng-app="plunker">

  <head>
    <meta charset="utf-8" />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <link rel="stylesheet" href="style.css" />
    <script data-require="angular.js@1.3.x" src="https://code.angularjs.org/1.3.9/angular.js" data-semver="1.3.9"></script>
    <script src="app.js"></script>
  </head>

  <body ng-controller="MainCtrl">
    <p>Hello {{name}}!</p>

    <p> Directive Content</p>
    <sd-items-filter selected-items="selectedItems" selected-items-changed="selectedItemsChanged" items="items"> </sd-items-filter>


    <P style="color:red">Selected Items (in parent controller) set to: {{selectedItemsReturnedFromDirective}} </p>

  </body>

</html>

itemfilterTemplate.html

<select ng-model="selectedItems" multiple="multiple" style="height: 200px; width: 250px;" ng-change="selectedItemsChangedDir()" ng-options="item.id as item.name group by item.model for item in items | orderBy:'name'">
  <option>--</option>
</select>

app.js

var app = angular.module('plunker', []);

app.directive('sdItemsFilter', function() {
  return {
    restrict: 'E',
    scope: {
      items: '=',
      selectedItems: '=',
      selectedItemsChanged: '&'
    },
    templateUrl: "itemfilterTemplate.html",
    link: function (scope, element, attrs){
      scope.selectedItemsChangedDir = function(){
        scope.selectedItemsChanged()(scope.selectedItems);  
      }
    }
  }
})

app.controller('MainCtrl', function($scope) {
  $scope.name = 'TARS';

  $scope.selectedItems = ["allItems"];

  $scope.selectedItemsChanged = function(selectedItems1) {
    $scope.selectedItemsReturnedFromDirective = selectedItems1;
  }

  $scope.items = [{
    "id": "allItems",
    "name": "All Items",
    "order": 0
  }, {
    "id": "CaseItem",
    "name": "Case Item",
    "model": "PredefinedModel"
  }, {
    "id": "Application",
    "name": "Application",
    "model": "Bank"
    }]

});

working plnkr: http://plnkr.co/edit/BSqx2J1yCY86IJwAnQF1?p=preview 工作plnkr: http ://plnkr.co/edit/BSqx2J1yCY86IJwAnQF1?p = preview

Option#5: Through ng-model and two way binding, you can update parent scope variables. 选项#5:通过ng-model和双向绑定,您可以更新父范围变量。 . So, you may not require to invoke parent scope functions in some cases. 因此,在某些情况下,您可能不需要调用父作用域函数。

index.html

<!DOCTYPE html>
<html ng-app="plunker">

  <head>
    <meta charset="utf-8" />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <link rel="stylesheet" href="style.css" />
    <script data-require="angular.js@1.3.x" src="https://code.angularjs.org/1.3.9/angular.js" data-semver="1.3.9"></script>
    <script src="app.js"></script>
  </head>

  <body ng-controller="MainCtrl">
    <p>Hello {{name}}!</p>

    <p> Directive Content</p>
    <sd-items-filter ng-model="selectedItems" selected-items-changed="selectedItemsChanged" items="items"> </sd-items-filter>


    <P style="color:red">Selected Items (in parent controller) set to: {{selectedItems}} </p>

  </body>

</html>

itemfilterTemplate.html

<select ng-model="selectedItems" multiple="multiple" style="height: 200px; width: 250px;" 
 ng-options="item.id as item.name group by item.model for item in items | orderBy:'name'">
  <option>--</option>
</select>

app.js

var app = angular.module('plunker', []);

app.directive('sdItemsFilter', function() {
  return {
    restrict: 'E',
    scope: {
      items: '=',
      selectedItems: '=ngModel'
    },
    templateUrl: "itemfilterTemplate.html"
  }
})

app.controller('MainCtrl', function($scope) {
  $scope.name = 'TARS';

  $scope.selectedItems = ["allItems"];

  $scope.items = [{
    "id": "allItems",
    "name": "All Items",
    "order": 0
  }, {
    "id": "CaseItem",
    "name": "Case Item",
    "model": "PredefinedModel"
  }, {
    "id": "Application",
    "name": "Application",
    "model": "Bank"
    }]
});

working plnkr: http://plnkr.co/edit/hNui3xgzdTnfcdzljihY?p=preview 工作plnkr: http ://plnkr.co/edit/hNui3xgzdTnfcdzljihY?p =preview

Option#6: Through $watch and $watchCollection It is two way binding for items in all above examples, if items are modified in parent scope, items in directive would also reflect the changes. 选项#6:通过$watch$watchCollection它是上述所有示例中items双向绑定,如果在父作用域中修改了项目,则指令中的项目也会反映更改。

If you want to watch other attributes or objects from parent scope, you can do that using $watch and $watchCollection as given below 如果要从父作用域中观察其他属性或对象,可以使用$watch$watchCollection执行此操作,如下所示

html HTML

<!DOCTYPE html>
<html ng-app="plunker">

<head>
  <meta charset="utf-8" />
  <title>AngularJS Plunker</title>
  <script>
    document.write('<base href="' + document.location + '" />');
  </script>
  <link rel="stylesheet" href="style.css" />
  <script data-require="angular.js@1.3.x" src="https://code.angularjs.org/1.3.9/angular.js" data-semver="1.3.9"></script>
  <script src="app.js"></script>
</head>

<body ng-controller="MainCtrl">
  <p>Hello {{user}}!</p>
  <p>directive is watching name and current item</p>
  <table>
    <tr>
      <td>Id:</td>
      <td>
        <input type="text" ng-model="id" />
      </td>
    </tr>
    <tr>
      <td>Name:</td>
      <td>
        <input type="text" ng-model="name" />
      </td>
    </tr>
    <tr>
      <td>Model:</td>
      <td>
        <input type="text" ng-model="model" />
      </td>
    </tr>
  </table>

  <button style="margin-left:50px" type="buttun" ng-click="addItem()">Add Item</button>

  <p>Directive Contents</p>
  <sd-items-filter ng-model="selectedItems" current-item="currentItem" name="{{name}}" selected-items-changed="selectedItemsChanged" items="items"></sd-items-filter>

  <P style="color:red">Selected Items (in parent controller) set to: {{selectedItems}}</p>
</body>

</html>

script app.js 脚本app.js

var app = angular.module('plunker', []); var app = angular.module('plunker',[]);

app.directive('sdItemsFilter', function() {
  return {
    restrict: 'E',
    scope: {
      name: '@',
      currentItem: '=',
      items: '=',
      selectedItems: '=ngModel'
    },
    template: '<select ng-model="selectedItems" multiple="multiple" style="height: 140px; width: 250px;"' +
      'ng-options="item.id as item.name group by item.model for item in items | orderBy:\'name\'">' +
      '<option>--</option> </select>',
    link: function(scope, element, attrs) {
      scope.$watchCollection('currentItem', function() {
        console.log(JSON.stringify(scope.currentItem));
      });
      scope.$watch('name', function() {
        console.log(JSON.stringify(scope.name));
      });
    }
  }
})

 app.controller('MainCtrl', function($scope) {
  $scope.user = 'World';

  $scope.addItem = function() {
    $scope.items.push({
      id: $scope.id,
      name: $scope.name,
      model: $scope.model
    });
    $scope.currentItem = {};
    $scope.currentItem.id = $scope.id;
    $scope.currentItem.name = $scope.name;
    $scope.currentItem.model = $scope.model;
  }

  $scope.selectedItems = ["allItems"];

  $scope.items = [{
    "id": "allItems",
    "name": "All Items",
    "order": 0
  }, {
    "id": "CaseItem",
    "name": "Case Item",
    "model": "PredefinedModel"
  }, {
    "id": "Application",
    "name": "Application",
    "model": "Bank"
  }]
});

You can always refer AngularJs documentation for detailed explanations about directives. 您可以随时参考AngularJs文档以获取有关指令的详细说明。


#6楼

If you are using ES6 Classes and ControllerAs syntax , you need to do something slightly different. 如果您使用的是ES6 Classes和ControllerAs语法 ,则需要执行稍微不同的操作。

See the snippet below and note that vm is the ControllerAs value of the parent Controller as used in the parent HTML 请参阅下面的代码段,并注意vm是父HTML中使用的父控制器的ControllerAs

myApp.directive('name', function() {
  return {
    // no scope definition
    link : function(scope, element, attrs, ngModel) {

        scope.vm.func(...)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值